---
title: "Purposes of OS; boot sector protection"
subject: "Operating System"
chapter: 1
key: "semester_6/operating_system:os-purposes-boot-sector"
source: https://www.bctengineer.com/q/semester_6/operating_system/os-purposes-boot-sector
site: BCT Engineering
---

# Purposes of OS; boot sector protection

Operating System · Chapter 1: Introduction to Operating System

- Asked in: 2073 Bhadra, 3+2 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/operating_system/os-purposes-boot-sector
- Whole chapter: https://www.bctengineer.com/md/semester_6/operating_system/chapter-1

## Question

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

## Short answer

The OS provides convenience, efficient resource management, program execution, protection, and the ability to evolve. Preventing user access to the boot sector is essential because it holds the boot code and partition table; modification could install a boot virus, make the system unbootable, or corrupt disk partitioning.

## Answer

#### Primary purposes of an operating system

1. **Convenience**: gives users a simple interface (shell/GUI, system calls, files) so that they need not know the hardware details; it acts as an *extended machine*.
2. **Efficient resource management**: allocates the CPU, memory, disk and I/O devices fairly among programs and keeps them busy; it acts as a *resource manager*.
3. **Providing an environment to run programs**: loads, runs and terminates programs and provides services such as file handling and I/O.
4. **Protection and security**: stops processes and users from interfering with each other or with the OS.
5. **Ability to evolve**: allows new hardware and system functions to be added without disturbing application programs.

#### Why users must be prevented from accessing the boot sector

The boot sector (master boot record) holds the small bootstrap program that loads the operating system when the computer is switched on.

- If a user program could write to it, a **boot-sector virus** could be installed that runs before the OS and its protection start, and infects the system on every boot.
- Accidental or malicious modification or deletion would make the system **unbootable**, cutting off access to all data.
- The boot sector also holds the **partition table**; corrupting it makes the disk unreadable.
- Attackers could change the boot code to load a fake OS and steal passwords.

Hence the OS performs all disk access in kernel mode and allows only privileged utilities to write to the boot sector.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which pair are primary purposes of an OS?
   A. Only compiling programs
   B. Convenience and efficient resource management
   C. Only providing hardware
   D. Maximising user errors
   Answer: B. OS gives convenience (extended machine) and efficiency (resource manager). (Key point: Primary purpose)

2. What does the boot sector contain?
   A. All user data files
   B. The system-call table
   C. The bootstrap program that loads the OS (and the partition table)
   D. The shell scripts
   Answer: C. It holds the MBR with bootstrap code and the partition table. (Key point: Boot sector content)

3. Why is a boot-sector virus especially dangerous?
   A. It is only active when the OS is off
   B. It runs only in user mode
   C. It cannot affect booting
   D. It runs before the OS and its protection start, and infects every boot
   Answer: D. Boot code executes before OS protection exists. (Key point: Boot-sector virus)

4. How does the OS prevent users from accessing the boot sector?
   A. Disk access is in kernel mode; writes are allowed only to privileged utilities
   B. By allowing any user program to write
   C. By hiding the OS in user mode
   D. By removing system calls
   Answer: A. Kernel-mode only access protects boot code. (Key point: Prevention)

## Related in Operating System

- [OS abstraction, extended machine, system call](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aos-abstraction-system-call) — Operating System, chapter 1
- [Protection domain and ACL](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aprotection-domain-acl) — Operating System, chapter 8, asked 2×
- [Short note: Protection domain](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aprotection-domain-note) — Operating System, chapter 8, asked 2×
- [What is an OS; its functions](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aos-functions-definition) — Operating System, chapter 1, asked 2×
- [Functions of OS and microkernel](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aos-functions-microkernel) — Operating System, chapter 1
- [OS definition and types of OS](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aos-definition-types) — Operating System, chapter 1

## Related in other subjects

- [Primary and backup protection](https://www.bctengineer.com/question.md?key=semester_6%2Fswitchgear_and_protection%3Aprimary-and-backup-protection) — Switchgear and Protection, chapter 1, asked 3×
- [Features of a typical operating system](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Afeatures-of-operating-system) — Microprocessor, chapter 6, asked 3×
- [Operating system layers](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aos-layers) — Distributed System, chapter 3
- [Real-time system and real-time OS components](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Areal-time-os) — Software Engineering, chapter 4
