SYS 140 Week 8 Journal - ryanm292002/Ryans-Repository GitHub Wiki
7.4.1 I/O Control Methods
I/O modules are used to make the connection between the CPU and a computer's peripherals work. The five main I/O methods are programmed I/O, interrupt-driven I/O, memory-mapped I/O, direct memory access, and channel-attached I/O. Each of these methods can be deployed at any time depending on the appropriate method needed to let the system run how the user wants. Programmed I/O is basically the easiest way for the CPU to process the data, it includes the CPU taking polls on registers relating to an I/O port. Interrupt-Driven, in this method instead of having the CPU constantly monitor I/O ports, the device itself instead sends an alert to the CPU which activates the control line on the system bus. Memory-Mapped I/O allows for I/O devices and the device's main memory to share the same address space. The memory address is already mapped to each device so when data transfer requests can be quicker. Direct Memory Access allows for the CPU to get rid of extra, not needed I/O instructions, making the data transfer more efficient. To do this the CPU provides the DMA with information such as the location of where the bytes are being transferred, the number of bytes transferred, and the destination device or memory address. Channel I/O is often looked at as a more efficient DMA controller. Channel I/O has paths that have specifications for each data transfer to make it the easiest and quickest transfer.
7.4.2
Each key on a keyboard controls a switch that connects to basically a bunch of conductors that transfer your keystroke into data that can be output back to the user, every time one of those switches goes off the circuitry knows to read the scan code that is produced. Block I/O is the method used to manage disk and tape I/Os, each block has a distinct size depending on what data is being processed.
Difference between Serial and Parallel Transmission
In serial connections, data is sent one bit in one clock pulse at a time, 8 bits are transferred with each bit having its own transfer. Parallel Transmissions are different in the fact that the 8 bits that are transferred can all transfer simultaneously in multiple channels instead of having to wait for the bits to use a single-channel like in Serial Connections.
Pick an I/O device (keyboard, scanner, USB thumb drive, etc.). Describe what I/O control method would be best for the device and whether it should use character or block I/O.
A keyboard would be best utilized with the interrupt I/O method. When one or more key is being pressed it's best for the interrupt method to be in place because when there's constant scanning it can tell what key is being pressed when. I think it should be a character I/O because each keystroke is one single byte of data instead of chunks of data like block i/o uses
Based on the "Difference between Serial and Parallel Transmission" table in the web link, give an example of an I/O scenario where the serial transmission would be better than parallel transmission. Justify your answer.
A government has a modem or some type of device that is sending and receiving data you probably would want to have serial because it works with transferring over 1 single channel so there's less of a chance the data would be compromised when it's up in the air transferring.