M1-R5.1 · Unit 2 · Introduction to Operating System

Basics of Operating System

Delve into the architecture of a computer system and understand how the OS sits perfectly between applications and the physical hardware.

1. The Computer System Architecture Stack

To fully grasp the basics of an Operating System, you must visualize how a computer system is layered. It is not just a single entity but a structured stack of components working in harmony. The standard architecture stack consists of:

The Stack Hierarchy: User → Application Software → Operating System → Utility Software (optional) → Hardware
  • User: The person interacting with the computer.
  • Application Software: The programs the user directly interacts with (e.g., Web browsers, Word processors).
  • Operating System (OS): The master controller that manages all hardware and software resources.
  • Utility Software: Tools that help manage, maintain, and control computer resources (e.g., Antivirus, Disk cleanup). These often run alongside or within the OS.
  • Hardware: The physical components of the computer (CPU, RAM, hard drives, input/output devices).

2. How the User Interacts with the OS

Users don't directly instruct the hardware on what to do; instead, they interact with the Operating System, which then carries out their commands. This interaction happens through an interface. There are two primary types of interfaces:

Graphical User Interface (GUI)

A visual way of interacting with the computer using windows, icons, menus, and pointers (WIMP). Examples include Microsoft Windows, macOS, and Ubuntu desktop. It is user-friendly and intuitive.

Command Line Interface (CLI)

A text-based interface where the user types commands to interact with the OS. Examples include MS-DOS and the Linux Terminal. It is highly efficient for advanced users and consumes fewer system resources.

3. How the OS Interacts with Hardware

The Operating System is responsible for making the hardware work. However, there are thousands of different hardware components in the world, and the OS cannot know how to talk to all of them natively. This is where Device Drivers and Firmware come into play.

Device Drivers

A device driver is a specialized software program that acts as a translator between the OS and the hardware device. When an application needs to print a document, it asks the OS. The OS then uses the printer's device driver to translate that request into a language the specific printer understands.

Firmware (BIOS/UEFI)

Firmware is low-level software permanently programmed into a hardware device's memory (like ROM). The most famous example is the BIOS (Basic Input/Output System) or the modern UEFI (Unified Extensible Firmware Interface) found on motherboards. When you turn on your PC, the firmware runs first to initialize hardware before handing control over to the Operating System.

4. System Calls

Applications cannot just access hardware directly; doing so could cause crashes or security breaches. Instead, they must ask the OS for permission and assistance. This request mechanism is known as a System Call.

Concept Description
Definition A programmatic way in which a computer program requests a service from the kernel of the OS it is executed on.
Examples Reading a file from the hard drive, requesting more RAM, or sending data over a network.
Mechanism The application switches from User Mode to Kernel Mode via a system call to execute the privileged instruction securely.

5. The Kernel vs Shell

When studying the basics of operating systems, two of the most critical terms you will encounter are Kernel and Shell. They form the core architecture of how an OS handles user inputs and hardware tasks.

The Kernel

The Kernel is the heart and core of the Operating System. It is the very first program loaded into memory when the OS boots, and it remains there until the computer is turned off. The Kernel is directly responsible for interacting with hardware, managing memory, scheduling CPU time, and handling system calls.

The Shell

The Shell is the outermost layer of the OS. It is a user interface that takes input from the user (via CLI or GUI), interprets those commands, and translates them so the Kernel can execute them. It acts as an intermediary between the user and the Kernel.

6. Key Exam Points

  • The architecture stack goes: User → Application → OS → Hardware.
  • Device Drivers act as translators between the OS and hardware devices.
  • System Calls are the mechanism by which applications request services from the OS.
  • The Kernel is the core of the OS that talks to the hardware.
  • The Shell is the command interpreter that talks to the Kernel.