[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Just a couple of things.
Claus Brod writes:
> > hmm, sure? if we just want IO to halt only processes which are in a
> > disk IO systemcall (as opposed to `halt _every_ process' like its now...)
> > then we don't need real multithreaded filesystems yet, and i don't think
> > the kernel needs much more reentrancy than now like when a process
> > sleeps for tty IO. and the SCSI interrupt handler could just reset
> > its in-service bit and ipl and then addroottimeout()?
> - Process A calls GEMDOS to read a file.
>
> - GEMDOS calls BIOS to read a block.
s/GEMDOS/filesystem/; s/BIOS/diskdriver/; ok :)
>
> - HD driver initiates transfer, puts process A to sleep. Note that
> process A is now sleeping *inside* GEMDOS.
>
> - Process B makes a GEMDOS call.
>
> Similar scenarios are possible for VDI and AES calls which in turn
> call GEMDOS (vst_loadfonts, rsrc_load...).
>
> The most simple solution would be to block any GEMDOS call when
> another process already is in GEMDOS.
yes thats what i ment, GEMDOS is a single-threaded filesystem...
> This would at least allow
> other processes to use the CPU or call (X)BIOS.
and to do any other systemcalls, those that end up calling filesystems
(and GEM if process A was in GEM?) just go to sleep until its their turn.
> Better than
> nothing.
!!
ok what about this: add a flag for multithreaded to struct filesys,
if clear (tosfs, current minixfs... the kernels others are `multithreaded'
alreay) do
while (diskdriver sleeping for IO)
sleep (IO_Q, IO_SINGLE);
before fs calls, and when the diskdriver is done make it call
wake (IO_Q, IO_SINGLE);
before it returns. for GEM in trap #2 do the same
while (diskdriver sleeping for IO and request came from inside GEM)
...
then you can still type in windows etc. when processes do normal disk IO
not thru GEM calls. (hmm or does the blitter confuse DMA?)
so whats left now? GEMDOS calls outside tosfs... (maybe that was your
problem?) there are a few in initialisation and when leaving MiNT,
other than that i see only Sversion and some regular calls to the time
funtions. ok if we don't want the sleep thing there MiNT has to keep
its time itself...
thats the idea, now what did i miss? :) cheers
Juergen
PS: and then make real devices for /dev and with readv/writev, use them
in minixfs, make minixfs multithreaded, port the BSD fs... :-)
--
J"urgen Lock / nox@jelal.north.de / UUCP: ..!uunet!unido!uniol!jelal!nox
...ohne Gewehr
PGP public key fingerprint = 8A 18 58 54 03 7B FC 12 1F 8B 63 C7 19 27 CF DA