CST334 - Week 7
Week 7 Reflection This week, we covered a lot about persistence, and how the OS interacts with files, directories, and I/O devices. I/O devices can range from memory buses to hard drives to keyboards. For a canonical I/O device, the canonical protocol is: While (STATUS == BUSY) ; // wait until device is not busy (polling the device) Write data to DATA register Write command to COMMAND register (Doing so starts the device and executes the command) While (STATUS == BUSY) ; // wait until device is done with your request The basic protocol to interact with an IDE disk is: Wait for drive to be ready (polling). Write parameters to command registers. Start the I/O. Data transfer. Handle interrupts. Error handling. I/O time, or T I/O , is calculated by the seek delay + rotational delay + transfer delay. In other words, T I/O = T seek + T rotation + T transfer The rate of I/O is the size of the transfer divided by the I/O time, or Size transfer /...