You are on page 1of 2

CS 220 Computer Architecture Week 4 Homework John Monnahan Review Questions 6.

2 How are data written onto a magnetic disk? Electricity is passed through the write head of the magnetic disk which produces a magnetic field between the write head and disk. The write head magnetizes the disk and writes the bytes to the disk based upon the positive and negative currents received. 6.3 How are data read from a magnetic disk? Data are read from magnetic disks by the use of a read head. The read head creates a magnetic field between it and the disk. When the head passes over the positive and negative currents on the disk it generates a current of the same polarity. 6.5 Define the terms track, cylinder, and sector. A track is a concentric set of rings the same width as the read/write head. A cylinder is a set of all tracks in the same relative position on a platter. Sectors are contained within tracks and store the data on the disks. 6.7 Define the rems seek time, rotational delay, access time, and transfer time. Seek time is the time it takes to position the head at the requested track. Rotational delay is the time it takes for the beginning of the sector to reach the head. Access time is the sum of the seek time and the rotational delay. Transfer time is the time it takes to read or write the data once it is located. 6.14 What differences between a CD and a DVD account for the larger capacity of the latter. The bits are packed closer on the DVD than on the CD, DVD supports a second layer of pits and lands on top of the first layer and, DVD can be two sided. Problems 6.2 Define the following for a disk system: T(a) = Ts + 1 / 2r + n / rN Review Questions 7.3 What are the major functions of an I/O module? An I/O module has 5 major functions; control and timing, processor communication, device communication, data buffering, and error detection.

7.4 List and briefly define three techniques for performing I/O. Programmed I/O lets the processor execute a program that gives it direct control over the I/O module. When it executes a command it must wait on the I/O to execute it. Interrupt driven I/O is another technique that allows the processor to issue a command to the I/O module and then process other instructions until the module is finished. The final technique is called Direct Memory Access or DMA. It allows the I/O module to directly access main memory. This way the processor is never used for I/O calls. 7.5 What is the difference between memory-mapped I/O and isolated I/O? With memory-mapped I/O there is a single address space for memory locations and I/O devices. A single read line and write line are needed to specify the I/O device. With isolated I/O, the bus has memory read and write and input and output commands. The command line can specify if it is addressing memory or I/O. This keeps I/O and memory seperate. 7.7 When a DMA module takes control of a bus, and while it retains control of the bus, what does the processor do? Control of the bus is passed to the DMA and the processor waits for one bus cycle. It does not get interrupted and store a context of its current instruction, it only pauses. Problems 7.11 In virtually all systems that include DMA modules, DMA access to main memory is given higher priority than CPU access to main memory. Why? The DMA issues a hold on the CPU not an interrupt, if the CPU was accessing memory when the hold is issued its priority would need to be lower than DMA for DMA to access the memory. Also DMA requests are much less frequent and quicker than CPU requests. 7.12 A DMA module is transferring characters to memory using cycle stealing, from a device transmitting at 9600 bps. The processor is fetching instructions at the rat of 1 million instructions per second (1 MIPS). By how much will the processor be slowed down due to the DMA activity? 9600 / 8 = 1200 1/1200 = 8.33 x 10 ^-4 or The DMA will fetch a byte every .000833 seconds. The processor is working at 1/1,000,000 or .000001 seconds per instruction. The processor would run .000833 / .000001 or 833 instructions for every 1 byte for DMA. So the processor would be running at 1/833 or 0.12 % loss of performance.

You might also like