Skip to main content

Operating System

sectionmedium9 MCQ

What is Operating System?

A program in execution.

Key formula / rule: Average Waiting Time

Key points

  • Understand the concept of a process and its lifecycle.
  • Differentiate between process states.
  • Explain the role of the Process Control Block (PCB).
  • Analyze different CPU scheduling algorithms.

Common exam trap

Confusing processes with programs.

Definitions

Term

Process

Meaning

A program in execution.

Term

Process Control Block (PCB)

Meaning

A data structure maintained by the operating system for each process, containing information about its state and resources.

Term

Context Switch

Meaning

The process of storing the state of a currently running process and restoring the state of another process to allow multitasking.

Term

Scheduling Algorithm

Meaning

A method used by the operating system to determine which process in the ready queue should be allocated the CPU next.

Term

Inter-Process Communication (IPC)

Meaning

Mechanisms that allow different processes to communicate with each other and synchronize their actions.

Term

Deadlock

Meaning

A situation where two or more processes are unable to proceed because each is waiting for the other to release a resource.

Learning objectives

  • Understand the concept of a process and its lifecycle.

  • Differentiate between process states.

  • Explain the role of the Process Control Block (PCB).

  • Analyze different CPU scheduling algorithms.

  • Describe context switching and its implications.

  • Identify mechanisms for Inter-Process Communication (IPC).

  • Recognize potential issues like deadlocks.

Formulae

Name

Average Waiting Time

Note

Crucial for evaluating scheduling algorithms.

Expression

Sum of waiting × of all processes / Number of processes

Name

Average Turnaround Time

Note

Turnaround Time = Completion Time - Arrival Time.

Expression

Sum of turnaround × of all processes / Number of processes

Name

Response Time

Note

Measures interactivity.

Expression

First Response Time - Arrival Time

Prerequisites

  • Basic understanding of computer architecture.

  • Familiarity with memory management concepts.

  • Knowledge of concurrency and parallelism.

Common mistakes

  • Confusing processes with programs.

  • Underestimating the overhead of context switching.

  • Not considering synchronization issues in concurrent processes.

  • Incorrectly applying scheduling algorithms.

  • Ignoring potential deadlock scenarios.

Keywords

  • Process

  • Process State

  • PCB

  • CPU Scheduling

  • FCFS

  • SJN

  • Round Robin

  • Priority Scheduling

  • Context Switch

  • IPC

  • Deadlock

  • Process Synchronization

Practice preview

  • Consider three processes P1, P2, P3 with arrival times 0, 1, 2 respectively and burst times 5, 3, 2 respectively. Using the Shortest Remaining Time First (SRTF) scheduling algorithm, what is the average waiting time for

    medium

  • Which of the following is NOT a valid state for a process in an operating system?

    easy

  • Which of the following CPU scheduling criteria aims to maximize the number of processes completed per unit time?

    easy