Subject: Re: POSIX.4 real-time extensions?
To: None <email@example.com>
From: Jaromír <firstname.lastname@example.org>
Date: 07/06/2001 15:00:03
Bill Sommerfeld wrote:
> my understanding based on second-hand information is that aio requests
> are simply queued for a separate thread and handled synchronously (one
> at a time) by that worker thread.
I suppose there is aio kthread per process in FreeBSD, right?
> a real aio implementation would expose maximum parallelism to the
> underlying hardware i/o system.
Yeah, though since the aio concept is quite alien to BSD kernel,
nontrivial changes are needed to make it possible to not require
process context for each aio request. Of course, a possible side-step
would be to use global pool of aio kthreads instead of single thread.
Other possible solution would be to have something to copy context
from one thread to other. Then, it would be possible to e.g. only
use a kthread until biowait(), there save the context and release
the kthread. Once the i/o would be done, biodone() would get a kthread
from pool, give it the context saved in biowait() and let it return
to the code calling biowait(). Something similar to setjmp()/longjmp()
in concept, though the stack size would probably be a problem.
How do other OS manage this, e.g. Solaris? (It seems Linux doesn't support
this, at least I can't find any mention of aio in 2.3.49 kernel sources).
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!