Is it normal that a user can take down the whole system by using too much memory?
frank2 at fjl.co.uk
Fri Jun 8 14:18:33 UTC 2018
On 2018-06-04 10:43, Steve O'Hara-Smith wrote:
> On Sat, 02 Jun 2018 19:25:31 -0400
> Brennan Vincent <brennan at umanwizard.com> wrote:
>> Thanks John for the response -- this should help me solve my practical
>> I'm also curious, however, to learn more from an OS design
> Best way to do that is look at the code.
>> Why isn't it possible for the kernel to realize it should kill
>> rather than make the system unusable?
> The code in vm_pageout.c that handles out of swap conditions tries
> to kill the biggest process - by that it means the one estimated to
> the most memory. To that end it skips processes in various states -
> protected, system, non-running and then picks the biggest of the
> processes to kill.
> One thing that may cause the random chaos you see is that killing a
> process takes time, especially if that process has swapped out pages,
> something else calls for memory it has finished dying then the next
> process will get killed even though the process responsible has already
> been killed (after all it might be locked up and failing to die).
You might want to look at this:
More information about the freebsd-questions