Prepare for the A Level Computer Science OCR Exam with comprehensive quizzes that cover essential topics, flashcards, and detailed explanations to help you excel. Ace your exam with confidence!

Practice this question and more.


What happens during disk thrashing?

  1. Data is permanently lost

  2. Data is rapidly moved in and out of virtual memory

  3. Data is compressed to conserve space

  4. Data is systematically backed up

The correct answer is: Data is rapidly moved in and out of virtual memory

Disk thrashing occurs when the operating system spends excessive time swapping data between the physical memory (RAM) and the virtual memory (disk storage). This happens when a system runs out of RAM and cannot keep all the active processes' data in memory, leading to a constant cycle of loading data from the disk to RAM and then back again as new data needs to be loaded in. In this scenario, option B describes the rapid movement of data in and out of virtual memory, which is the hallmark of thrashing. This constant swapping significantly slows down system performance because the CPU spends more time handling memory management than executing processes. The other choices don't accurately represent the effects of thrashing; they either describe processes that do not occur during thrashing or relate to actions that do not pertain to memory management issues. For instance, data being permanently lost or compressed pertains to very different operations that do not inherently involve the thrashing phenomenon.