TAOCP 1.4.4: Input and Output
Section 1.4.4 exercises: 19/19 solved.
Section 1.4.4. Input and Output
Exercises from TAOCP Volume 1 Section 1.4.4: 19/19 solved.
| # | Rating | Category | Status | Time |
|---|---|---|---|---|
| 1 | [05] | simple | solved | - |
| 2 | [10] | simple | verified | 44s |
| 3 | [22] | medium | verified | 50s |
| 4 | [M20] | math-medium | solved | - |
| 5 | [M21] | math-medium | solved | - |
| 6 | [12] | simple | solved | - |
| 7 | [22] | medium | verified | 50s |
| 8 | [11] | simple | verified | 47s |
| 9 | [21] | medium | solved | - |
| 10 | [21] | medium | solved | - |
| 11 | [21] | medium | solved | 46s |
| 12 | [24] | medium | solved | - |
| 13 | [20] | medium | solved | - |
| 14 | [20] | medium | solved | - |
| 15 | [22] | medium | solved | - |
| 16 | [29] | hard | solved | - |
| 17 | [40] | project | verified | 2m06s |
| 18 | [30] | hard | solved | - |
| 19 | [M28] | math-hard | solved | - |
TAOCP 1.4.4 Exercise 1
(a) Yes.
TAOCP 1.4.4 Exercise 2
The output tape is used in two alternating buffer areas, 1000–1099 and 2000–2099.
TAOCP 1.4.4 Exercise 3
Let two buffers for output be \texttt{OUTBUF1}, \quad \texttt{OUTBUF2}, each of length $100$ words.
TAOCP 1.4.4 Exercise 4
Let $T$ denote the time required for one input-output operation on the device, and let $C$ denote the computation time performed between successive input-output requests.
TAOCP 1.4.4 Exercise 5
Let T_i be the total time during which I/O device $i$ is actually transferring data, for $1\le i\le n$, and let
TAOCP 1.4.4 Exercise 6
To initialize the `WORDIN` subroutine (4) correctly, we must ensure that the first call to `WORDIN` will access the first word of the initial buffer and that the subsequent calls will correctly advanc...
TAOCP 1.4.4 Exercise 7
Let each buffer contain exactly $100$ consecutive words.
TAOCP 1.4.4 Exercise 8
Consider the scenario of Fig.
TAOCP 1.4.4 Exercise 9
We are asked to analyze the same program as in Exercise 1.
TAOCP 1.4.4 Exercise 10
Let the three buffers of exercise 9 be denoted by $\mathrm{BUF1}$, $\mathrm{BUF2}$, and $\mathrm{BUF3}$.
TAOCP 1.4.4 Exercise 11
We are asked to repeat exercise 9 under the assumption that there is only _one_ buffer.
TAOCP 1.4.4 Exercise 12
To modify the CONTROL coroutine for card input so that input terminates upon reading a card with a `".
TAOCP 1.4.4 Exercise 13
The COMPUTE coroutine, as described in Section 1.
TAOCP 1.4.4 Exercise 14
In the multiple-buffering scheme described in the text, the computational program and the CONTROL coroutine communicate by means of the operations ASSIGN and RELEASE.
TAOCP 1.4.4 Exercise 15
We are asked to write a complete MIX program to copy 100 blocks from tape unit 0 to tape unit 1 using three buffers, with maximal speed.
TAOCP 1.4.4 Exercise 16
We are asked to formulate the "green-yellow-red-purple" algorithm, illustrated in Fig.
TAOCP 1.4.4 Exercise 17
We model the system as a pool of $N$ indistinguishable buffers.