50 likes | 189 Views
Problems in IO. CS 1550 Recitation December 2 nd /4 th , 2002 The questions in this slide are from Andrew S. Tanenbaum's textbook page 376, 377. CHAP. 5
E N D
Problems in IO CS 1550 RecitationDecember 2nd/4th, 2002 The questions in this slide are from Andrew S. Tanenbaum's textbookpage 376, 377.
CHAP. 5 27. The clock interrupt handler on a certain computer requires 2 msec (including process switching overhead) per clock tick. The clock runs at 60 Hz. What fraction of the CPU is devoted to the clock? 2 * 60 = 120 msec 120 msec / 1 sec = 120 msec / 1000 msec = 12%
CHAP. 5 40. Assuming that it takes 10 nsec to copy a byte, how much time does it take to completely rewrite the screen of an 80 character * 25 line text mode memory-mapped screen? What about a 1024*768 pixel graphics screen with 24-bit color?
A video RAM image simple monochrome display character mode Corresponding screen the xs are attribute bytes from Dr. Amer’s slides How characters are displayed
Text Mode: 2 * 80 *25 = 4000 bytes 4000 * 10 nsec = 40000 nsec = 0.00004sec Graphics: 24 bit color 3 bytes per pixel 1024 * 768 * 3 = 2359296 bytes 2359296 * 10 nsec = 23592960 nsec = 0.02359296 sec