A simplified computer using Von Neumann Architecture executes exactly seven iterations of the following loop. Every iteration executes all four instructions once, including the branch in the final iteration.
Instruction
Data-memory transfers during execution
LOAD a value from memory
One read
ADD a second value from memory
STORE the result in memory
One write
BRANCH if another iteration is required
None
Every executed instruction also requires one instruction-fetch transfer. All transfers use one shared path, occur one at a time and take exactly 30 ns each. During the measured interval, an input device occupies that path for one additional 180 ns interval, during which the processor makes no transfers.
Assume all processing time other than these transfers and this interruption is negligible. There are no additional instructions or transfers. Find the elapsed time from the start of the first fetch to completion of the final branch, in ns, to the nearest whole ns.
Unlock full course notes by signing up
Determining what survives a power failure
A monitoring computer receives exactly 25 sensor readings per second, with the first reading arriving at 0.04 s. Each reading occupies 24 bytes. The program temporarily collects readings in a RAM buffer.
Starting with an empty buffer and no saved readings at time zero, the program saves all buffered readings to persistent storage at 6 s, 12 s, 18 s and so on. Each save includes the reading arriving at that time, finishes before the next reading arrives, and then empties the buffer. Saved readings remain in persistent storage.
Power fails immediately after the reading arriving at 17 s enters the buffer. RAM loses its contents, while persistent storage retains completed saves. Ignore file headers and other storage overhead.