Re: In the Shallow End
- From: "Dan Johnson" <danieljohnson@xxxxxxxxxxxx>
- Date: Sat, 19 Aug 2006 08:43:52 -0400
"GreyCloud" <mist@xxxxxxxxxxx> wrote in message
news:FY-dnTj_LuvZI3vZnZ2dnUVZ_s-dnZ2d@xxxxxxxxxxxxxx
It isn't just the ISAM part, but also how their asynchronous I/O works
with their hard drives coupled with the o/s.
This was a great feature of VMS.
Naturally, MS copied it for NT. :D
And naturally doesn't work well in NT.
Works better, actually. VMS async I/O has
a nasty flaw; the completion procedures act
like interrupts, transfering control to your
callback at an arbitrary point in your thread.
This is very hard to cope with. It's like
thread synchronization- you cannot access
any shared data structures without some kind
of synchronization.
But normal synchronization primitives don't
work, because they are based on blocking;
and obviously interrupt-like code can't block
without deadlocking on the interrupted thread.
I remember when, many years ago, I tried to use
sys$qio; never could get it to work reliably.
I did not then understand why, but this was the
problem.
Windows fixes this by introducing 'alertable
waits'; these are like normal blocking operations
but they- and only they- can be interrupted for
completion procedures. You simply use these
when no locks are being held, and then
completion procedures can synchronize
normally, like threads do.
You can also spin up a thread which does
nothing but enter alertable waits. This
thread will then service your completion
procs immediately, but it can still synchronize
like any other thread.
[snip]
.
- Follow-Ups:
- Re: In the Shallow End
- From: GreyCloud
- Re: In the Shallow End
- References:
- In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: GreyCloud
- Re: In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: GreyCloud
- Re: In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: GreyCloud
- Re: In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: GreyCloud
- Re: In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: GreyCloud
- Re: In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: GreyCloud
- Re: In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: GreyCloud
- Re: In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: GreyCloud
- Re: In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: GreyCloud
- Re: In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: GreyCloud
- Re: In the Shallow End
- From: Dan Johnson
- Re: In the Shallow End
- From: GreyCloud
- In the Shallow End
- Prev by Date: Re: Confession to make
- Next by Date: Re: Windows.. it's like coming home!
- Previous by thread: Re: In the Shallow End
- Next by thread: Re: In the Shallow End
- Index(es):
Relevant Pages
|