User programs, often called jobs, use the main ALU for a while and then they start an I/O command. For example, job A may do a couple thousand additions and multiplications and then wish to write the result out to a file on the disk drive. Input and Output are often enormously slow compared to regular instructions, so a mechanism is used to offload the actual work of writing bytes on spinning disks, drums and tapes. Special-purpose computers, called controllers or channels, do the actual work of communicating with these devices. They are capable of also moving data from the I/O device into main memory while the main computer (the ALU) is doing other instructions. (Later we will investigate how it is that main memory can seemingly be used by different masters simultaneously. It actually can't but there are tricks to make it look like that.) |