7etsuo / TinyOS

2 stars 1 forks source link

HIGH LEVEL INSTRUCTIONS #27

Open 7etsuo opened 9 months ago

7etsuo commented 9 months ago

Develop the Disk Driver:

Write the low-level functions that directly interact with the hardware, such as issuing commands to the Floppy Disk Controller (FDC), setting up DMA transfers, handling interrupts, and reading/writing sectors. Ensure that you correctly handle the hardware protocol for the FDC and DMA, respecting the timing and sequence of operations. Implement error-checking and error-handling mechanisms to manage retries, read/write verification, etc. Test the Disk Driver Independently:

Create tests for the disk driver that verify its functionality without involving the complexity of process scheduling or concurrency. Test reading/writing to various sectors, including edge cases like boundary sectors of the disk. Develop Basic I/O Scheduling and Concurrency Control:

Once the disk driver is functional, you can start working on the I/O scheduling, making sure that requests are serviced in an orderly manner. Implement basic concurrency control mechanisms, such as a mutual exclusion lock to prevent multiple processes from initiating disk operations simultaneously. Integration Testing:

Integrate the disk driver with the basic I/O scheduler and conduct tests that involve multiple processes making disk requests. Validate that the locking mechanism allows disk operations to complete without conflict, and ensure that processes are properly blocked and unblocked. Enhance I/O Scheduling:

As the system matures, improve the I/O scheduling algorithm beyond basic serialization, taking into account priorities, fairness, seek optimization (to minimize disk head movements), and other factors. Implement more advanced features such as request merging, batching, or deadlocking prevention if necessary. Optimization and Robustness:

Once everything is working as expected, you can optimize the disk driver and the scheduler for performance and robustness. Consider adding caching, handling special cases such as disk full or disk change events, and fine-tuning the driver for ideal performance under your system's typical workload.