1 Operating System Overview

Operating Systems · Unit 1 · 4 hrs

Operating System Overview

Exam-focused notes for Operating System Overview (Operating Systems, CSC264): what the TU syllabus asks and how it has actually been tested, with 3 solved past questions from this unit.

Operating System Overview in short

This chapter introduces the operating system as the software layer between the user and the computer hardware, traces how operating systems evolved alongside computer hardware generations, classifies the operating systems in use today, and explains the system call mechanism through which user programs actually ask the kernel to do work on their behalf.

Operating System Overview: notes

Definition

Computer software falls into two broad categories. Application software consists of programs that solve a specific problem for the user, such as spreadsheets, database systems and presentation tools. System software acts as an interface between the computer hardware and the application software running on it; different versions of Windows and Linux are examples. The most important piece of system software is the operating system (OS), which can be defined as a collection of programs that acts as an interface between a user of a computer and the computer hardware, hiding the hardware's complexity and exposing a controlled, convenient environment in which programs can run.

Two views of operating system

The operating system can be understood from two complementary angles. As an extended machine, the operating system hides the fact that real computer hardware is primitive and awkward to program directly, especially for input and output, and instead presents programs with a clean, consistent and user friendly view; this abstraction is delivered through system calls, special instructions through which a program requests a service from the operating system.

As a resource manager, the operating system is responsible for allocating the CPU, memory and I/O devices among the many processes and users that want to use them at the same time. When one user wants to write to a database while another wants to print a report, both need access to shared hardware; the operating system decides who gets what resource, for how long, and in what order, a task called resource management.

Evolution of operating system

Operating systems evolved in step with the hardware generations that hosted them.

  • First generation (1945 to 1955): built from vacuum tubes; a single team designed, built, programmed and operated each machine; all programming was in absolute machine code, and neither programming languages nor operating systems existed yet.
  • Second generation (1955 to 1965): transistors replaced vacuum tubes and batch systems appeared; programs were written in FORTRAN and assembly language, and were run under simple batch operating systems such as FMS (Fortran Monitor System) and IBSYS (IBM's operating system).
  • Third generation (1965 to 1980): integrated circuits (ICs) made machines smaller and cheaper, and multiprogramming appeared, keeping several jobs resident in memory so the processor stayed busy while one job waited for I/O. OS/360, MULTICS and CTSS were representative operating systems of this era.
  • Fourth generation (1980 to present): LSI and VLSI chips enabled the microcomputer. The IBM PC and PC/AT ran MS-DOS, the Apple Macintosh ran its own Macintosh OS, and Microsoft later built the GUI-based Windows on top of MS-DOS, which evolved through Windows XP, 7, 8 and 10.

What this unit covers

  • Definition
  • Two views of operating system
  • Evolution of operating system
  • Types of OS
  • System Call
  • Handling System Calls
  • System Programs
  • Operating System Structures
  • The Shell
  • Open Source Operating Systems

Operating System Structures

2081 · 5 marks

Explain microkernels and exokernels. [5]

--- A microkernel is a minimalist kernel design where only the most essential OS functions are kept in kernel (privileged) mode, and all other services are moved to user space as separate processes. - Basic inter-process communication (IPC) - Basic memory management - Basic CPU scheduling - File ...

Open this answer on its own page →

2076 · 5 marks

What are two modes of OS? Discuss different OS structures briefly. [5]

Show solved answer

Two Modes of OS and OS Structures

Two Modes of OS (Kernel Modes)

Modern operating systems operate in two distinct processor modes to protect the system from faulty or malicious programs:

1. User Mode

  • In this mode, the executing program does not have direct access to hardware or memory.
  • Application programs (user programs) run in user mode.
  • If a user program needs to access hardware or perform privileged operations, it must request the OS through a system call.
  • Prevents user programs from accidentally or intentionally damaging the system.

2. Kernel Mode (Supervisor/Privileged Mode)

  • In this mode, the OS (kernel) has full access to all hardware and can execute any CPU instruction.
  • The kernel runs in this mode to perform critical tasks like memory management, process scheduling, and I/O operations.
  • Switching from user mode to kernel mode happens via system calls or interrupts.

The dual-mode operation protects the OS from user programs and protects users from each other.


OS Structures

Different approaches have been used to organize and structure an operating system:

1. Monolithic Structure (Simple / No Structure)

  • The entire OS runs as a single large program in kernel mode.
  • All OS services (file system, memory management, device drivers, etc.) are packed together.
  • Advantage: Fast and efficient due to no overhead of communication between components.
  • Disadvantage: Difficult to maintain, debug, and extend. A bug in one part can crash the entire system.
  • Example: Early UNIX, MS-DOS.

2. Layered Structure

  • The OS is divided into a number of layers (levels), each built on top of the lower one.
  • The bottom layer (Layer 0) is the hardware; the topmost layer is the user interface.
  • Each layer only uses functions and services of the layer below it.
  • Advantage: Easy to debug and maintain (one layer at a time).
  • Disadvantage: Defining the layers properly is difficult; performance overhead due to multiple layer traversals.
  • Example: THE operating system by Dijkstra.

3. Microkernel Structure

  • Only the most essential functions (like inter-process communication, basic scheduling, and memory management) are kept in the kernel.
  • All other services (file system, device drivers, etc.) run in user space as separate processes.
  • Advantage: More reliable and secure; a failure in one service does not crash the kernel.
  • Disadvantage: Performance overhead due to frequent message passing between user-space services and the kernel.
  • Example: MINIX, QNX.

4. Virtual Machine Structure

  • The OS creates an illusion of multiple independent machines on a single physical machine.
  • Each virtual machine gets its own (virtual) copy of the hardware.
  • Advantage: Multiple different OS environments can run simultaneously on the same hardware.
  • Disadvantage: Complex to implement; some overhead in virtualization.
  • Example: VMware, IBM VM/370.

5. Client-Server Structure (Modular Structure)

  • A variation of the microkernel approach where OS services are divided into server processes.
  • Client processes request services from server processes through message passing.
  • Advantage: Highly modular and flexible; suitable for distributed systems.
  • Disadvantage: Communication overhead between client and server processes.

Summary Table:

StructureKey IdeaExample
MonolithicSingle large kernelMS-DOS, UNIX
LayeredHierarchical layersTHE OS
MicrokernelMinimal kernel + user-space servicesMINIX, QNX
Virtual MachineMultiple virtual OS instancesVMware
Client-ServerServices as separate server processesDistributed OS
Open this answer on its own page →

Handling System Calls

2078 · 5 marks

What is system call? Discuss process of handling system calls briefly. [5]

A system call is the interface between a process (i.e., a user program) and the operating system. It provides a mechanism through which a user-level program can request services from the operating system kernel, such as process management, file management, and directory management. System calls a...

Open this answer on its own page →