[plt-scheme] Re: Shared resources for servlets

From: Keith Frost (keithf at amnis.com)
Date: Tue Sep 9 16:40:59 EDT 2003

Dor Kleiman wrote:

> I'm not sure that would work.
> Consider this:
> 3 readers are reading. A writer comes and blocks. Then a reader comes 
> and joins in, blocking the writer even longer. This could block 
> indefinitely, which won't be very good, would it?

Well, this is a simple model.  You point out that it has the problem
that writers can be denied service indefinitely, if there is a sufficient
volume of readers.  This is true.  One can devise a more complex
model, such as one where (for example) a writer sends a request,
and new readers are blocked until that request is satisfied.  But first,
I just want to know how to implement the simple model!


Posted on the users mailing list.