5.1 Operating Systems

Bulk view disabled for Guests. View lessons individually.

Operating System Management

1. Key Functions of an OS

The OS acts as an intermediary between the user/application and the hardware. Its primary roles include:

🧠 Memory Management

Allocates RAM to running processes and ensures one program doesn't overwrite another's space. Handles Virtual Memory when RAM is full.

⚙️ Processor Management

Decides which process gets the CPU's attention and for how long. This is known as Scheduling (e.g., Round Robin).

📁 File Management

Maintains the file system (NTFS, FAT32), handling the storage, retrieval, naming, and deletion of files on secondary storage.

🔌 Device Management

Communicates with hardware peripherals using Device Drivers. Manages input/output (I/O) requests.

2. Important OS Concepts

Interrupts

An Interrupt is a signal sent to the processor from hardware or software indicating an event that needs immediate attention.

// Interrupt Handling Sequence:
1. Finish current F-E cycle
2. Save current register contents (Stack)
3. Identify the interrupt source
4. Run the Interrupt Service Routine (ISR)
5. Restore registers and resume

User Interface (UI)

The OS provides a way for humans to interact with the machine:

  • GUI (Graphical User Interface): Icons, windows, and menus (WIMP). Easy for novices.
  • CLI (Command Line Interface): Text-based. Faster for experts and uses less memory/CPU.

3. Utility Software

Utilities are small programs that perform specific "housekeeping" tasks to maintain the system:

Utility Purpose
Disk Defragmenter Reorganizes scattered file fragments on an HDD to speed up access.
Backup Software Creates copies of data to protect against loss. Can be incremental or full.
Compression Reduces file size (e.g., ZIP) to save space or speed up transmission.
Disk Formatter Prepares a storage device by creating a file system and partitions.
⚠️ AS-Level Focus: Virtual Machine (VM)

A VM is software that emulates a physical computer. The OS running inside the VM is the Guest OS, while the actual computer's OS is the Host OS. This is crucial for running legacy software or testing code in a safe environment.