Experimental OS development using D

Harry Vennik htvennik at zonnet.nl
Thu Jan 4 04:09:46 PST 2007


BCS wrote:
> Put the security in stetting up the shared buffers and that should do
> it I'd think.
> Read access lets you map it in in a read only page, read/write... etc.
>
> One thought I had on this issue is that it allows much of the IO to
> run without system calls/context switches if the stream access and
> whatnot is all run as part of the standard system lib. Plus, while you
> can mess with your stream meta data, it only hoses you.

I have been thinking that way too, but it is difficult to see how much it really
prevents context switches. It may just obscure them by having them occur only in
response to certain events (which may occur regularly), instead of having the
predictable context switch for every read/write/whatever you do.
Memory-mapping the file will prevent this, but is costly for bigger files, so this
needs some thought. Anyway, if a way is found to have a reliable shared-buffer
implementation that will not compensate its lower number of context switches by
having more of another unwanted side-effect (e.g. excessive memory usage), than
that would certainly be the way to go.

Harry



More information about the Digitalmars-d-announce mailing list