skni-kod / MicrOS

32-bit operating system with kernel written in C. Created by SKNI "KOD".
GNU General Public License v3.0
56 stars 8 forks source link

Hard drive (and other devices) access for processes. #135

Open MinusPL opened 1 year ago

MinusPL commented 1 year ago

Currently MicrOS is not allowing people to use devices for everyone. For example when we have two processes A and B, and A requests data to be read (let's say 100 MB) it will block hard drive completely for some time. If however process B also requests data from drive it will send yet another command to drive. With one sector reads it was fine, but now it can and most likely will cause alot of problems with synchronization of many processes. Suggested fix for that problem is to create read/write operation queue for disk devices. Some part of kernel or driver will then dequeue such operations and focus on them also blocking other processes from requesting data while operation is in progress. Otherwise we might end up with incomplete data or even load data that we're not supposed to get.

Other devices which are also not designed for multiple access should implement such things.

Any suggestions are welcome. Target for this issue is MicrOS 1.4 Release. That's because right now there is no process that should read from disks built in.