Chapter 1 · Operating Systems: Structure and Services
1.2Architecture of an Operating System
How the parts of an operating system are organized: kernel and shell, layers, system libraries and device drivers.
Written and checked by Muhammad Raheel(opens in a new tab)
Full Stack Developer · AI Engineer · Reviewed 6 Oct 2026 · 3 min read
On this page
An operating system is not one big block of code. It is made of many parts, and each part has its own job. Think of a school. It has different departments, but they all work together so the school runs smoothly. An OS works the same way.
Kernel vs Shell
Every OS has two main parts: an inner part called the kernel and an outer part called the shell.
Kernel
The kernel is the heart of the OS. It is hidden from you, but it does the real work. It talks to the CPU, the memory and every device. It also decides which program can use these resources, and when.
Shell
The shell is the part you actually see and use. It takes your command and passes it to the kernel.
Shells come in two kinds:
| Shell type | How you use it | Example |
|---|---|---|
| Graphical shell | Click icons and use menus | Windows desktop |
| Command-line shell | Type instructions | Command Prompt or Terminal |
The book compares this to a car. The engine is the kernel. The steering wheel and dashboard are the shell. The driver only touches the shell, but the engine does the work.
The picture below shows Figure 1.1 as a hand-drawn diagram. Your command goes inward from you, to the shell, to the kernel, to the hardware. The result comes back out to you.
OS Layers and Modular Design
The OS is also built in layers, like the floors of a building. Each layer has a specific job:
- Lower layer: works directly with hardware, like the CPU, RAM, storage and hard drive.
- Middle layer: manages these resources so programs can use them when needed.
- Upper layer: runs applications and shows the interface you see on the screen.
Each layer depends on the one below it. Because of this design, the OS is easier to manage, repair and improve. You can fix one layer without changing the whole system.
System Libraries and Device Drivers
The OS gives programs two kinds of helpers.
Because of libraries, every app does not need to write the same code again. A photo editing app uses the OS library to open an image. It does not build its own way to open pictures.
Practice this topic
Short questions
1.How is kernel different from shell.2 marks
Answer
From the book: "The kernel is the core part of the operating system, that directly controls the computer's system software and hardware such as the CPU, memory, and devices". "The shell is the outer part of the OS that interacts with the user". "It receives commands from the user and passes them to the kernel." The book's analogy: "Like Engine of a car is kernel and accessories like steering wheel, dashboard are shells."
2.Give one example of a system library and its purpose.2 marks
Answer
From the book: "When a photo editing app needs to open an image, it uses the operating system's library to read the file. This way, the app does not have to create its own method to open pictures." Purpose: "System libraries are collections of ready-made instructions that programs can use to perform common tasks, such as opening files or showing text on the screen."
3.Define the architecture of an operating system.3 marks
Answer
The architecture of an operating system is the way how its parts are organized and how they work together. Each part has a special role, and together they make the computer work smoothly, just like a school has different departments that perform specific duties but work together for the smooth working of the school.
4.Define the kernel and state its main job.3 marks
Answer
The kernel is the core part of the operating system, that directly controls the computer's system software and hardware such as the CPU, memory, and devices. It decides how and when different programs can use these resources.
5.Define the shell and name its two types with one example each.4 marks
Answer
The shell is the outer part of the OS that interacts with the user. It receives commands from the user and passes them to the kernel. Shells can be: "Graphical shells (like Windows desktop) where you click icons and use menus." and "Command-line shells (like the Command Prompt or Terminal) are where you type instructions."
6.List the three layers of an OS and one job each does.4 marks
Answer
- "Lower layer work directly with hardware devices like the CPU, RAM, storage and Hard drive."
- "Middle layer manage these resources and make sure programs can use them when needed."
- "Upper layer run applications and provide the interface that the user views on the screen."
7.What are device drivers?2 marks
Answer
Device drivers are special programs that allow the operating system to communicate with hardware devices such as printers, keyboards, and graphics cards.
8.Why is the layered design of an operating system useful?2 marks
Answer
Each layer depends on the one below it. This design makes the operating system easier to manage, repair, and improve without changing the whole system.
Long questions
1.Describe the architecture of an operating system, explaining kernel, shell, and layered design with examples.8 marks
Answer
Cover all four parts using the book's text (topic 1.2, pages 3 to 5):
-
Architecture (verbatim): "The architecture of an operating system is the way how its parts are organized and how they work together. Each part has a special role, and together they make the computer work smoothly, just like a school has different departments that perform specific duties but work together for the smooth working of the school."
-
Kernel (verbatim): "The kernel is the core part of the operating system, that directly controls the computer's system software and hardware such as the CPU, memory, and devices, as shown in Figure 1.1. It decides how and when different programs can use these resources." Example: "When you open a file, the kernel manages the process of reading it from the hard drive and sending it to the screen. Like Engine of a car is kernel and accessories like steering wheel, dashboard are shells."
-
Shell (verbatim): "The shell is the outer part of the OS that interacts with the user, also depicted in Figure 1.1. It receives commands from the user and passes them to the kernel." "Graphical shells (like Windows desktop) where you click icons and use menus." "Command-line shells (like the Command Prompt or Terminal) are where you type instructions."
-
Layered design (verbatim):
- "Lower layer work directly with hardware devices like the CPU, RAM, storage and Hard drive."
- "Middle layer manage these resources and make sure programs can use them when needed."
- "Upper layer run applications and provide the interface that the user views on the screen."
- "Each layer depends on the one below it. This design makes the operating system easier to manage, repair, and improve without changing the whole system."
- Example (school system): support staff (lower layers), administration (middle layers), teachers and students (upper layers).
Draw Figure 1.1 (User Applications, Operating System with Shell over Kernel, Hardware) if time allows.
Aim for 300-400 words.
-
2.Explain the difference between the kernel and the shell of an operating system. Use the car engine analogy from the book, and include one graphical shell example and one command-line shell example.8 marks
Answer
Cover three parts:
-
Kernel (verbatim): "The kernel is the core part of the operating system, that directly controls the computer's system software and hardware such as the CPU, memory, and devices, as shown in Figure 1.1. It decides how and when different programs can use these resources." Book example: "When you open a file, the kernel manages the process of reading it from the hard drive and sending it to the screen."
-
Shell (verbatim): "The shell is the outer part of the OS that interacts with the user, also depicted in Figure 1.1. It receives commands from the user and passes them to the kernel." Two types:
- "Graphical shells (like Windows desktop) where you click icons and use menus."
- "Command-line shells (like the Command Prompt or Terminal) are where you type instructions."
-
Car analogy (verbatim): "Like Engine of a car is kernel and accessories like steering wheel, dashboard are shells."
Aim for 200-300 words.
-
3.Describe the layered architecture of an operating system. Explain the role of the lower, middle, and upper layers, and map each layer to the school analogy from the book. State one benefit of the layered design.8 marks
Answer
Structure the answer in three parts:
-
The three layers (verbatim):
- "Lower layer work directly with hardware devices like the CPU, RAM, storage and Hard drive."
- "Middle layer manage these resources and make sure programs can use them when needed."
- "Upper layer run applications and provide the interface that the user views on the screen."
-
The school analogy (verbatim):
- "The support staff (like guards and cleaners) work at the base, keeping the school ready (like the lower layers working with hardware)."
- "The administration manages resources, schedules, and rules (like the middle layers managing memory and storage)."
- "The teachers and students use these arrangements to teach and learn (like the upper layers running applications and interacting with users)."
-
Benefit of the layered design (verbatim): "Each layer depends on the one below it. This design makes the operating system easier to manage, repair, and improve without changing the whole system."
Aim for 250-350 words.
-