Swapping Out – GATE 1999- Operating System swapping out using Previous year gate question Paper 1999

Swapping Out – GATE 1999- Operating System swapping out using Previous year gate question Paper 1999



play-rounded-fill play-rounded-outline play-sharp-fill play-sharp-outline
pause-sharp-outline pause-sharp-fill pause-rounded-outline pause-rounded-fill
00:00

In the GATE 1999 examination, a question addressed the typical actions performed by an operating system during a context switch between processes. The question aimed to identify which actions are not usually executed during this process.

Question:

Which of the following actions is/are typically not performed by the operating system when switching context from process A to process B?

a) Saving current register values and restoring saved register values for process B.

b) Changing address translation tables.

c) Swapping out the memory image of process A to the disk.

d) Invalidating the translation look-aside buffer.

Answer: c) Swapping out the memory image of process A to the disk.

Explanation:

During a context switch, the operating system performs several tasks to ensure that the CPU transitions smoothly from executing one process to another. These tasks typically include:

  • Saving and Restoring Registers: The CPU’s current register values are saved so that they can be restored when the process resumes. The registers for the new process are then loaded.

  • Changing Address Translation Tables: The memory management unit updates the address translation tables to reflect the memory space of the new process.

  • Invalidating the Translation Look-aside Buffer (TLB): The TLB, which caches recent address translations, is invalidated to prevent incorrect memory access due to outdated entries.

However, swapping out the memory image of a process to the disk is not a standard action during a context switch. This operation, known as “swapping,” involves moving an entire process from main memory to disk storage to free up RAM. Swapping is typically employed under specific conditions, such as when the system is under heavy memory pressure, and is not part of the routine context-switching mechanism.

Therefore, option c) is the correct answer, as swapping out the memory image of process A to the disk is not typically performed during a context switch.

For further details and similar questions, you can refer to the GATE 1999 question set available on GeeksforGeeks:

Contents [hide]

Swapping Out – GATE 1999- Operating System swapping out using Previous year gate question Paper 1999

Index- Operating System Sl.No. Name of the Topic 1. Process …



Leave a Reply

Your email address will not be published. Required fields are marked *

error: