gsilvis / silvos

half-baked Silvis OS kernel
MIT License
4 stars 2 forks source link

Don't block entire system during disk operations #80

Closed gsilvis closed 5 years ago

gsilvis commented 5 years ago

The IDE implementation used to busy-poll for DMA completion on every operation. This had a number of bad effects:

This commit fixes the latter problem, but not the former problem; now the IDE driver supports doing one operation at a time, but actually deschedules the thread while it's happening, and wakes it up once it receives an interrupt.

In practice, writing a single sector is probably pretty fast, but if a disk seek is involved, this could still free up noticable amount of time. But, in follow-on commits I'm going to allow multiple concurrent operations at once, and probable allow users to start larger operations than a single sector as well.