What is context switching in an Operating System?

Options

  • A. The process of saving the state of one process and restoring the state of another
  • B. The process of permanently deleting a process from memory
  • C. The process of converting source code into machine code
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. The process of saving the state of one process and restoring the state of another

Detailed Explanation

Explanation: During context switching, the OS saves the execution context of the currently running process or thread and restores the context of another. Context switching enables multitasking but introduces overhead.