# Recent questions tagged input-output

1
Match $\text{List I}$ with $\text{List II}$ ... C-III, D-IVA-II, B-IV, C-III, D-IA-II, B-IV, C-I, D-IIIA-IV, B-III, C-II, D-I$Match$
2
Match the following w.r.t Input/Output management : ...
3
Write a program to implement multiple timers using a single clock. Input for this program consists of a sequence of four types of commands $(S<int> , T<int>, E<int> , P<int>): S<int>$ sets the current time to $<int>; T$ ... out the values of Current time, Next signal, and Clock header. Your program should also print out a statement whenever it is time to raise a signal.
4
Write a program to implement the three disk-arm scheduling algorithms. Write a driver program that generates a sequence of cylinder numbers $(0–999)$ at random, runs the three algorithms for this sequence and prints out the total distance (number of cylinders) the arm needs to traverse in the three algorithms.
5
Write a program that simulates stable storage. Use two large fixed-length files on your disk to simulate the two disks.
6
A notebook computer is set up to take maximum advantage of power saving features including shutting down the display and the hard disk after periods of inactivity. A user sometimes runs UNIX programs in text mode, and at other times uses the $X$ Window System. She is surprised to find that battery life is significantly better when she uses text-only programs. Why?
7
If a CPU's maximum voltage, $V,$ is cut to $V/n,$ its power consumption drops to $1/n^{2}$ of its original value and its clock speed drops to $1/n$ of its original value. Suppose that a user is typing at $1\: char/sec,$ but the CPU time ... value of $n$ and what is the corresponding energy saving in percent compared to not cutting the voltage? Assume that an idle CPU consumes no energy at all.
8
9
It has been observed that a thin-client system works well with a $1$-Mbps network in a test. Are any problems likely in a multiuser situation? (Hint: Consider a large number of users watching a scheduled TV show and the same number of users browsing the World Wide Web.)
10
A thin-client terminal is used to display a Web page containing an animated cartoon of size $400\: \text{pixels} \times 160\: \text{pixels}$ running at $10\: \text{frames/sec.}$ What fraction of a $100$-Mbps Fast Ethernet is consumed by displaying the cartoon?
11
In the text we gave an example of how to draw a rectangle on the screen using the Windows GDI: Rectangle(hdc, xleft, ytop, xright, ybottom); Is there any real need for the first parameter (hdc), and if so, what? After all, the coordinates of the rectangle are explicitly specified as parameters.
12
In Fig. 5-36 there is a class to RegisterClass. In the corresponding $X$ Window code, in Fig. 5-34, there is no such call or anything like it. Why not?
13
Assuming that it takes $2\: nsec$ to copy a byte, how much time does it take to completely rewrite the screen of an $80\: \text{character} \times \text{25}$ line text mode memory-mapped screen? What about a $1024 \times 768$ pixel graphics screen with $24$-bit color?
14
One way to place a character on a bitmapped screen is to use BitBlt from a font table. Assume that a particular font uses characters that are $16 × 24$ pixels in true RGB color. How much font table space does each character take? If copying a byte takes $100\: nsec,$ including overhead, what is the output rate to the screen in characters/sec?
15
The primary additive colors are red, green, and blue, which means that any color can be constructed from a linear superposition of these colors. Is it possible that someone could have a color photograph that cannot be represented using full $24$-bit color?
16
The designers of a computer system expected that the mouse could be moved at a maximum rate of $20\: cm/sec.$ If a mickey is $0.1 \:mm$ and each mouse message is $3$ bytes, what is the maximum data rate of the mouse assuming that each mickey is reported separately?
17
A user at a terminal issues a command to an editor to delete the word on line $5$ occupying character positions $7$ through and including $12.$ Assuming the cursor is not on line $5$ when the command is given, what ANSI escape sequence should the editor emit to delete the word?
18
After receiving a DEL (SIGINT) character, the display driver discards all output currently queued for that display. Why?
19
A bitmap terminal contains $1600$ by $1200$ pixels. To scroll a window, the CPU (or controller) must move all the lines of text upward by copying their bits from one part of the video RAM to another. If a particular window is $80$ lines high by $80$ characters ... baud rate of the terminal? Putting a character on the screen takes $5\: \mu sec.$ How many lines per second can be displayed?
20
Many versions of UNIX use an unsigned $32$-bit integer to keep track of the time as the number of seconds since the origin of time. When will these systems wrap around (year and month)? Do you expect this to actually happen?
21
A system simulates multiple clocks by chaining all pending clock requests together as shown in Fig. 5-30. Suppose the current time is $5000$ and there are pending clock requests for time $5008, 5012, 5015, 5029,4$ and $5037.$ Show the values of Clock header, Current ... pending) signal arrives at time $5017$ for $5033.$ Show the values of Clock header, Current time and Next signal at time $5023.$
22
A computer uses a programmable clock in square-wave mode. If a $500\:MHz$ crystal is used, what should be the value of the holding register to achieve a clock resolution of a millisecond (a clock tick once every millisecond)? $100$ microseconds?
1 vote
23
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?
24
In the discussion on stable storage, a key assumption is that a CPU crash that corrupts a sector leads to an incorrect ECC. What problems might arise in the five crash-recovery scenarios shown in Figure 5-27 if this assumption does not hold?
25
In the discussion on stable storage, it was shown that the disk can be recovered to a consistent state (a write either completes or does not take place at all) if a CPU crash occurs during a write. Does this property hold if the CPU crashes again during a recovery procedure. Explain your answer.
26
In the discussion of stable storage using nonvolatile RAM, the following point was glossed over. What happens if the stable write completes but a crash occurs before the operating system can write an invalid block number in the nonvolatile RAM? Does this race condition ruin the abstraction of stable storage? Explain your answer.
27
A personal computer salesman visiting a university in South-West Amsterdam remarked during his sales pitch that his company had devoted substantial effort to making their version of UNIX very fast. As an example, he noted that their disk driver used the elevator ... the performance that he measured was identical to what would be expected from first-come, first-served. Was the salesman lying?
Disk requests come in to the disk driver for cylinders $10, 22, 20, 2, 40, 6,$ and $38,$ in that order. A seek takes $6\: msec$ per cylinder. How much seek time is needed for First-come, first served. Closest cylinder next. Elevator algorithm (initially moving upward). In all cases, the arm is initially at cylinder 20.