PC locks up with list operations

John Nagle nagle at animats.com
Thu Sep 15 15:27:58 EDT 2011

On 8/31/2011 5:40 AM, Chris Withers wrote:
> On 31/08/2011 13:33, Steven D'Aprano wrote:
>> I am using Linux desktops; both incidents were with Python 2.5. Do newer
>> versions of Python respond to this sort of situation more gracefully?
> Ironically, Windows does better here and dumps you out with a
> MemoryError before slowly recovering.
> Linux seems to fair badly when programs use more memory than physically
> available.

    Linux virtual memory has some known design problems.  For example,
you can crash many Linux systems with a program which opens large
files and accesses them randomly, combined with another program which
is spawning processes that need a fair amount of memory.  The disk
caching system tries to use all unused memory, and when process
startup is consuming pages, it's possible to get into a situation
where a page is needed, the task requesting it can't block, and
a lock preventing freeing a file cache page is set.

    Arguably, paging to disk is obsolete. RAM is too cheap and
disk is too slow.

					John Nagle

More information about the Python-list mailing list