Serious problem with multithreaded I/O on Linux

Jeff Sturm jsturm@sigma6.com
Thu Jul 15 07:45:00 GMT 1999


Bryce McKinlay wrote:
> Why are blocking IO calls not gc-safe, anyway?

Blocking I/O isn't the problem.  The GC plays tricks with mprotect() for
its incremental mode... by write-protecting a heap address, it can trap
page faults and detect when a heap block is changed.  That works fine in
user mode.  But if the kernel tries to modify a read-only block, such as
during a read() system call, the call will fail without generating a
page fault.

If we don't use incremental mode, I think the wrapped system calls can
safely be removed.

-- 
Jeff Sturm
jsturm@sigma6.com


More information about the Java mailing list