Unix administration - Re: 'kill' does not reclaim the process' resources, causes memory

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > January 2006 > Re: 'kill' does not reclaim the process' resources, causes memory





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: 'kill' does not reclaim the process' resources, causes memory
Daniel C. von Asmuth

2006-01-15, 5:52 pm

Michael Trausch wrote:
> guybas@yahoo.com wrote:
>
Something like??
while :
do
prog &
kill -9 $!
done

I guess adding a 'sleep' command to the loop would thwart your speed
measurements.
[vbcol=seagreen]

Memory leaks in applications cuase the memory consumption to increase
and performance to degrade. We sometimes kill processes and restart the
application to free up leaked memory.

If 'kill' removes all traces of the user process, then the memory leak
could only be in the kernel.
[vbcol=seagreen]

What resources are we talking about? Normal memory should be reclaimed
when a process terminates, and so should open files and sockets. Shared
memory, message queues and semaphores remain in use if the program does
not release them properly.
[vbcol=seagreen]
> What is happening to the process when you kill it? Does it remain in
> the process list as a zombie? Is its parent cleaning up after it? What
> is its parent?


A zombie process uses up no resources except for the process table
entry. However, if a process 'hangs' in a system call that never
completes, the kill signal is not delivered and resources remain in use.

> If you could show or tell more about it, that'd be helpful.
>
> - Mike


Indeed it might,


Daniel

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com