Context switching in an operating system refers to the process of:

2025

Context switching in an operating system refers to the process of:

  1. A.

    Switching between user and kernel modes

  2. B.

    Switching between processes to allow multitasking

  3. C.

    Switching between different file systems

  4. D.

    Switching between different operating systems

Attempted by 229 students.

Show answer & explanation

Correct answer: B

Context switching is a fundamental concept in operating systems that allows a single CPU to handle multiple processes by rapidly switching between them.

When the OS performs a context switch, it saves the current state (context) of the running process—including CPU registers, program counter, and stack pointer—into its Process Control Block (PCB). It then loads the saved state of the next process to be executed. This happens so quickly that it creates the illusion of multiple programs running simultaneously (multitasking).

Explore the full course: Bpsc