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.


Find the number of readings retained in persistent storage, the number of readings lost from RAM, and the number of saved data bytes. Give all three answers as exact integers in the units named.


Sensor readings enter RAM, and completed saves move buffered readings into persistent storage.


Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More How a Computer Works Questions: