========================= Week 13 Notes for CST8214 ========================= - Ian! D. Allen - idallen@idallen.ca - www.idallen.com Class Notes http://teaching.idallen.com/cst8214/07f/ text_errata.txt Errors and updates for the course textbook ----------------------------------------------------------------------------- Chapter 7 Two big classes of I/O (section 7.4.1): - polled/programmed I/O requires CPU to keep checking the device - interrupt-driven I/O has the device interrupt the CPU between fetch/increment/execute cycles and branch to an Interrupt Service Routine (ISR) to handle the interrupting device - the ISR saves the state of the CPU and handles the device - after the interrupt is handled, the CPU restores its state and resumes the interrupted program where it left off - the CPU can control/prevent by which devices it will be interrupted - called "masking" interrupts - the CPU can be interrupted while it is being interrupted - a high-priority interrupt can interrupt an executing ISR Two big distinctions on who does the I/O (section 7.4.1): - CPU may do the I/O to/from the device itself (non-DMA) - a DMA or channel controller may do the I/O instead of the CPU - separate DMA controller can execute simple I/O programs - more complex "channel" controllers can execute complex I/O programs - DMA needs to take control of the bus to do the I/O, locking out the CPU from memory access temporarily - channel processors may have their own I/O bus, separate from CPU * Amdahl's Law * Two ways I/O is done: polled/programmed vs. interrupt-driven * Two places I/O is done: via CPU or via DMA/channel controller(s) * describe: parallel vs. serial * describe: cylinder, head, sector, platter, parking heads, disk pack * describe: head crash, seek time, rotational latency, access time * describe: transfer time, disk directory (C/H/S map) * Which way are the "tracks" on a compact disks written? (p.354) * describe: RAID-0, RAID-1