Do zombie processes cause memory shortage? Do they get killed by the init process eventually?

I have a zombie process problem.

I read What is a <defunct> process, and why doesn't it get killed? which says

There is no harm in letting such processes be unless there are many of them. Zombie is eventually reaped by its parent (by calling wait(2)). If original parent hasn't reaped it before its own exit then init process (pid == 1) does it at some later time.

I don't understand this.

Does it mean that eventually the zombie process's entry will be deleted from process table and killed successfully by the init process (Pid = 1)?

I think zombie processes causes a memory shortage problem, because they don't return allocated memory space.

Am I right?


Solution 1:

  1. Zombie processes don’t use up any system resources. (Actually, each one uses a very tiny amount of system memory to store its process descriptor.) However, each zombie process retains its process ID (PID)

  2. Linux systems have a finite number of process IDs – 32767 by default on 32-bit systems. If zombies are accumulating at a very quick rate – for example, if improperly programmed server software is creating zombie processes under load — the entire pool of available PIDs will eventually become assigned to zombie processes, preventing other processes from launching.

  3. Getting Rid of Zombie Processes

    kill -s SIGCHLD pid
    

Credit goes to : HTG