PadhaikoAll subjects

Past exam question: 2073 (Past Questions), QJ

Operating System · 4 marks

Open in the Padhaiko app

Topic: Introduction

Question

What are the primary purposes of an operating system? Explain. Why should the operating system prevent users from accessing the boot sector?

Solution

Primary Purposes of an Operating System: An operating system serves four fundamental purposes in modern computing environments:

  1. User and Programmer Convenience (Abstraction): The OS transforms bare, complex, and error-prone electronic hardware into an intuitive, high-level "extended machine." It provides programmers with standardized APIs and clean abstractions (files, processes, threads, virtual memory, network sockets), liberating developers from the burden of writing machine-level code for device timing, register addressing, and disk cylinder navigation.
  2. Resource Efficiency and Multiplexing: Computer hardware resources (CPU cores, physical RAM, disk channels, network bandwidth) are finite and expensive. The OS acts as a resource manager that schedules and multiplexes these hardware assets among multiple competing processes fairly and optimally, maximizing throughput and eliminating hardware idle times.
  3. Protection, Security, and Process Isolation: In multi-tasking, multi-user environments, the OS enforces boundaries to prevent executing programs from reading or corrupting each other's memory, files, or state. It restricts access to sensitive hardware instructions via dual-mode CPU privilege rings (User vs. Kernel Mode) and access control lists.
  4. Error Detection, Handling, and Fault Containment: The OS continuously monitors system operations to catch hardware malfunctions (e.g., bad memory blocks, bus timeouts) and software defects (e.g., division by zero, null-pointer dereferences), terminating failing processes cleanly without taking down the entire machine.

Why the Operating System Must Prevent Users from Accessing the Boot Sector: The boot sector (such as Sector of a disk containing the Master Boot Record [MBR] or the Volume Boot Record [VBR] / EFI System Partition) contains the machine-code bootstrap loader, disk signature, and the master partition table.

The operating system strictly restricts direct user-space write access to this critical disk sector for the following reasons:

Answer:

The primary purposes of an OS are: providing developer convenience through hardware abstraction, optimizing hardware resource multiplexing and efficiency, enforcing process isolation and security, and handling system errors gracefully. The OS must strictly prevent users from writing to the boot sector to ensure system bootability, preserve partition table structural integrity, and prevent stealth bootkit malware from hijacking the startup bootstrap process prior to kernel initialization.

All past exam questions for Operating System