SlideShare a Scribd company logo
OS Components and
Structure
By
SATHIS
HKUM
AR G
(sathish
OS Structure
To understand an OS, let’s first look at its
components and then how they’re composed or
organized.
We’ll come back and look at each of these in detail
as the course progresses.
Realize that it’s never as simple as it looks. These
basic concepts exist in some form in all systems,
however each system implements them in a
slightly different way.
Also, the divisions between components may not
be as clean in the real world as in the model
Process Management
An operating system executes many kinds of activities:
– user programs
– batch jobs or command scripts
– system programs: print spoolers, name servers, file
servers, network listeners, etc...
Each of these “execution entities” is encapsulated in a
process.
The process includes the execution context (pc, registers,
vm, resources, etc) and all info the activity (program) needs
to run.
The OS schedules processes to run.
Processe
s
A program is a passive thing -- just a file on the disk
with code that is potentially runnable.
A process is one instance of a program in execution;
at any instance, there may be many processes
running
copies of a single program (e.g., an editor): each is a
separate, independent process.
4
Code
Stack
PC
Registers
page tables
resource counts
....
Code
Stack
PC
Registers
page tables
resource counts
....
Process BProcess A
Process Operations
Processes are fundamental OS-provided objects.
The OS supports operations on processes, e.g.:
– create a process
– delete a process
– suspend a process
– resume a process
– inter-process communication
– inter-process synchronization
– create/delete a subprocess
Memory Management
Primary memory is the direct access storage for
CPU.
Programs must be stored in memory to execute.
OS must:
– allocate memory space for programs (both explicitly and
implicitly)
– deallocate memory space when needed
– maintain the mappings from virtual to physical memory
(page tables)
– decide how much memory to allocate to each process,
and when a process should be removed from memory
(policies)
I/O Management
Much of the OS kernel is concerned with I/O.
The OS provides a standard interface between
programs (user or sytem) and devices.
Device drivers are the processes responsible for
each device type. A driver encapsulates device-
specific knowledge, e.g., for device initiation and
control, interrupt handling, and errors.
There may be a process for each device, or even
for each I/O request, depending on the particular
OS.
Secondary Storage Management
Secondary storage (disk) is the persistent
memory, i.e., it endures system failures (we hope).
Low-level OS routines are typically responsible for
low-level disk function, such as scheduling of disk
operations, head movement, error handling, etc.
These routines may also be responsible for
managing space on the disk....
BUT, the line between this and the file system is
very fuzzy...space management functions may
belong in the file system.
File Management
Secondary storage devices are too crude to use
directly for long-term storage.
The file system provides logical objects and
logical operations on those objects.
A file is the basic long-term storage entity: a file
is a named collection of persistent information
that can be read or written.
The file system supports directories -- special files
that contain names of other files and associated
file information.
File Management
File system provides standard file operations,
e.g.:
– file creation and deletion
– directory creation and deletion
– manipulation of files and directories: read, write, extend,
rename, protect....
– file copy
The file system also provides general services,
e.g.:
– backup
– maintaining mapping information
– accounting and quotas
Protection System
protection is a general mechanism throughout the
OS
all resources objects need protection
– memory
– processes
– files
– devices
protection mechanisms help to detect errors as
well as to prevent malicious destruction
Command Interpreter
process that handles interpretation of user input
commands from keyboard (or script files)
on some systems, command interpreter is a
standard part of the OS
on others, it’s simply a non-privileged process
that interfaces to the user, permitting replacement
of interpreter with others
on others, there’s not really a command language
(e.g., the MacIntosh has no commands in the
conventional sense)
Accounting System
General facility for keeping track of resource
usage for all system objects
May be used to enforce quotas, or to produce
bill$.
14
OS
Structure
Hardware
Memory
Management
I/O System
Secondary Storage
Management
File System
Protection System
Accounting System
Process Management
Command Interpreter
Information Services
The OS (a simplified view)
Error Handling
OS Structure
An OS consists of all of these components, plus lots of
others, plus system service routines, plus system programs
(privileged and non-privileged), plus ....
The big issue:
– how do we organize all of this?
– what are the entities and where do they exist?
– how does these entities cooperate?
Basically, how do we build a complex system that’s:
– performant
– reliable
– extensible
Structure
Traditionally, systems such as Unix were built
as a
monolithic kernel:
16
hardware
OS kernel
user programs
everything
file system, virtual memory,
I/O drivers, process control,
system services, swapping,
networks, protection,
interrupt handling,
windows, accounting, ...
Structure
Problems with monolithic kernels:
– hard to understand
– hard to modify
– unreliable: a bug anywhere causes a system
crash
– hard to maintain
Since the beginnings of OS design, people have
sought ways to organize the OS to simplify its
design and construction.
Structuring
Traditional approach is layering: implement system
as a set of layers, where each layer is a virtual
machine
to the layer above.
That is, each layer provides a “machine” that has
higher
level features.
18
hardware
layer 0
layer 1
layer 2
layer 3
hardware
arch. interface
layer 0 “virtual
machine”interface
layer 1 interface
Layering in
THE
The first description of this approach was
Dijkstra’s
THE system.
19
hardware
CPU scheduling (processes)
memory management
console device (commands)
I/O device buffering
user programs
THE System
System was composed as a set of sequential processes.
Each peforms a sequential computation.
Processes communicate through explicit synchronization
statements.
Each process could be tested and verified independently.
Each level sees a logical machine provided by lower levels.
– level 2 sees virtual processors
– level 3 sees VM (really segments)
– level 4 sees a “virtual console”
– level 5 sees “virtual” I/O drivers
Problems with Layering
Systems must be hierarchical, but real systems
are more complex than that, e.g.,
– file system would like to be a process layered
on VM
– VM would like to use files for its backing store
I/O
Approach is not flexible.
Often has poor performance due to layer
crossings.
Systems are often modelled as layered structures
but not built that way (for better or worse).
Microkernel Approach
The organizing structure currently in vogue is the
microkernel OS.
Goal is minimize what goes in the kernel, and implement
much of the OS as user-level processes. This results in:
– better reliability
– ease of extension and customization
– mediocre performance (unfortunately)
First microkernel system was Hydra (CMU, 1970)
Examples of microkernel systems are the CMU Mach
system, Chorus (French Unix-like system), and in some
ways Microsoft NT/Windows.
Microkernel System
Structure
23
hardware
microkernel low-level
VM protection
processor
control
system processes
file system
thread
system
communication
external
paging
network
support
high-level
scheduling
user processes
kernel mode
user mode
Thank you

More Related Content

PPTX
INTER PROCESS COMMUNICATION (IPC).pptx
PPTX
cpu scheduling
PPTX
Computer Organisation & Architecture (chapter 1)
PDF
operating system structure
PPTX
Deadlock ppt
PPTX
Operating system - Deadlock
PPT
Operating system services 9
PPTX
Distributed operating system
INTER PROCESS COMMUNICATION (IPC).pptx
cpu scheduling
Computer Organisation & Architecture (chapter 1)
operating system structure
Deadlock ppt
Operating system - Deadlock
Operating system services 9
Distributed operating system

What's hot (20)

PDF
OS - Process Concepts
DOCX
Operating System Process Synchronization
PPTX
Threads .ppt
PDF
Von Neumann Architecture
PPTX
Threads in Operating System | Multithreading | Interprocess Communication
PPTX
Crash recovery in database
PPTX
Input Output - Computer Architecture
PPTX
Real time Operating System
PPTX
Types of operating system
PPTX
Types Of Operating Systems
PPTX
Os unit 3 , process management
PPT
Von Neumann Architecture
PPTX
operating system
PPTX
Desktop and multiprocessor systems
PPTX
Cache coherence ppt
PPTX
Von neumann architecture
PPTX
Operating system architecture
PPTX
Structure of operating system
PPT
Services provided by os
OS - Process Concepts
Operating System Process Synchronization
Threads .ppt
Von Neumann Architecture
Threads in Operating System | Multithreading | Interprocess Communication
Crash recovery in database
Input Output - Computer Architecture
Real time Operating System
Types of operating system
Types Of Operating Systems
Os unit 3 , process management
Von Neumann Architecture
operating system
Desktop and multiprocessor systems
Cache coherence ppt
Von neumann architecture
Operating system architecture
Structure of operating system
Services provided by os
Ad

Similar to OS Components and Structure (20)

PPT
3 chapter os presenting the topic os.ppt
PPTX
Operating system
PPT
Introduction of operating system
PPT
Ch3 OS
 
PPT
PPT
L-3 BCE OS FINAL.ppt
PPTX
The basic fundamentals' of operating system
PPT
ch3 - operating system structures.ppt
PPTX
Introduction to OS, types of operating systems
PPTX
Chapter 2 operating systems
PPTX
Fundamental concepts and_principles_of_operating_systems (2)
PPT
Basics of Operating System
DOCX
PPTX
Basic operating systems in computer and it's uses
PPTX
Unit 1-Operating Systems Overview .pptx
PPTX
installing and optimizing operating system software
PPTX
INSTAL AND OPTIMIZE OPERATING SYSTEM WINDOWS
PDF
chapter 3 opreating system lecture note and its is impaortamt concept for mn
3 chapter os presenting the topic os.ppt
Operating system
Introduction of operating system
Ch3 OS
 
L-3 BCE OS FINAL.ppt
The basic fundamentals' of operating system
ch3 - operating system structures.ppt
Introduction to OS, types of operating systems
Chapter 2 operating systems
Fundamental concepts and_principles_of_operating_systems (2)
Basics of Operating System
Basic operating systems in computer and it's uses
Unit 1-Operating Systems Overview .pptx
installing and optimizing operating system software
INSTAL AND OPTIMIZE OPERATING SYSTEM WINDOWS
chapter 3 opreating system lecture note and its is impaortamt concept for mn
Ad

More from sathish sak (20)

PPTX
TRANSPARENT CONCRE
PPT
Stationary Waves
PPT
Electrical Activity of the Heart
PPTX
Electrical Activity of the Heart
PPT
Software process life cycles
PPT
Digital Logic Circuits
PPT
Real-Time Scheduling
PPT
Real-Time Signal Processing: Implementation and Application
PPT
DIGITAL SIGNAL PROCESSOR OVERVIEW
PPTX
FRACTAL ROBOTICS
PPTX
Electro bike
PPTX
ROBOTIC SURGERY
PPTX
POWER GENERATION OF THERMAL POWER PLANT
PPT
mathematics application fiels of engineering
PPT
Plastics…
PPTX
ENGINEERING
PPTX
ENVIRONMENTAL POLLUTION
PPTX
RFID TECHNOLOGY
PPT
green chemistry
PPT
NANOTECHNOLOGY
TRANSPARENT CONCRE
Stationary Waves
Electrical Activity of the Heart
Electrical Activity of the Heart
Software process life cycles
Digital Logic Circuits
Real-Time Scheduling
Real-Time Signal Processing: Implementation and Application
DIGITAL SIGNAL PROCESSOR OVERVIEW
FRACTAL ROBOTICS
Electro bike
ROBOTIC SURGERY
POWER GENERATION OF THERMAL POWER PLANT
mathematics application fiels of engineering
Plastics…
ENGINEERING
ENVIRONMENTAL POLLUTION
RFID TECHNOLOGY
green chemistry
NANOTECHNOLOGY

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Essential Infomation Tech presentation.pptx
PDF
System and Network Administration Chapter 2
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Introduction to Artificial Intelligence
PPTX
L1 - Introduction to python Backend.pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Odoo Companies in India – Driving Business Transformation.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Which alternative to Crystal Reports is best for small or large businesses.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Essential Infomation Tech presentation.pptx
System and Network Administration Chapter 2
How Creative Agencies Leverage Project Management Software.pdf
ai tools demonstartion for schools and inter college
Softaken Excel to vCard Converter Software.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
Digital Strategies for Manufacturing Companies
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Introduction to Artificial Intelligence
L1 - Introduction to python Backend.pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Design an Analysis of Algorithms I-SECS-1021-03
2025 Textile ERP Trends: SAP, Odoo & Oracle
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx

OS Components and Structure

  • 2. OS Structure To understand an OS, let’s first look at its components and then how they’re composed or organized. We’ll come back and look at each of these in detail as the course progresses. Realize that it’s never as simple as it looks. These basic concepts exist in some form in all systems, however each system implements them in a slightly different way. Also, the divisions between components may not be as clean in the real world as in the model
  • 3. Process Management An operating system executes many kinds of activities: – user programs – batch jobs or command scripts – system programs: print spoolers, name servers, file servers, network listeners, etc... Each of these “execution entities” is encapsulated in a process. The process includes the execution context (pc, registers, vm, resources, etc) and all info the activity (program) needs to run. The OS schedules processes to run.
  • 4. Processe s A program is a passive thing -- just a file on the disk with code that is potentially runnable. A process is one instance of a program in execution; at any instance, there may be many processes running copies of a single program (e.g., an editor): each is a separate, independent process. 4 Code Stack PC Registers page tables resource counts .... Code Stack PC Registers page tables resource counts .... Process BProcess A
  • 5. Process Operations Processes are fundamental OS-provided objects. The OS supports operations on processes, e.g.: – create a process – delete a process – suspend a process – resume a process – inter-process communication – inter-process synchronization – create/delete a subprocess
  • 6. Memory Management Primary memory is the direct access storage for CPU. Programs must be stored in memory to execute. OS must: – allocate memory space for programs (both explicitly and implicitly) – deallocate memory space when needed – maintain the mappings from virtual to physical memory (page tables) – decide how much memory to allocate to each process, and when a process should be removed from memory (policies)
  • 7. I/O Management Much of the OS kernel is concerned with I/O. The OS provides a standard interface between programs (user or sytem) and devices. Device drivers are the processes responsible for each device type. A driver encapsulates device- specific knowledge, e.g., for device initiation and control, interrupt handling, and errors. There may be a process for each device, or even for each I/O request, depending on the particular OS.
  • 8. Secondary Storage Management Secondary storage (disk) is the persistent memory, i.e., it endures system failures (we hope). Low-level OS routines are typically responsible for low-level disk function, such as scheduling of disk operations, head movement, error handling, etc. These routines may also be responsible for managing space on the disk.... BUT, the line between this and the file system is very fuzzy...space management functions may belong in the file system.
  • 9. File Management Secondary storage devices are too crude to use directly for long-term storage. The file system provides logical objects and logical operations on those objects. A file is the basic long-term storage entity: a file is a named collection of persistent information that can be read or written. The file system supports directories -- special files that contain names of other files and associated file information.
  • 10. File Management File system provides standard file operations, e.g.: – file creation and deletion – directory creation and deletion – manipulation of files and directories: read, write, extend, rename, protect.... – file copy The file system also provides general services, e.g.: – backup – maintaining mapping information – accounting and quotas
  • 11. Protection System protection is a general mechanism throughout the OS all resources objects need protection – memory – processes – files – devices protection mechanisms help to detect errors as well as to prevent malicious destruction
  • 12. Command Interpreter process that handles interpretation of user input commands from keyboard (or script files) on some systems, command interpreter is a standard part of the OS on others, it’s simply a non-privileged process that interfaces to the user, permitting replacement of interpreter with others on others, there’s not really a command language (e.g., the MacIntosh has no commands in the conventional sense)
  • 13. Accounting System General facility for keeping track of resource usage for all system objects May be used to enforce quotas, or to produce bill$.
  • 14. 14 OS Structure Hardware Memory Management I/O System Secondary Storage Management File System Protection System Accounting System Process Management Command Interpreter Information Services The OS (a simplified view) Error Handling
  • 15. OS Structure An OS consists of all of these components, plus lots of others, plus system service routines, plus system programs (privileged and non-privileged), plus .... The big issue: – how do we organize all of this? – what are the entities and where do they exist? – how does these entities cooperate? Basically, how do we build a complex system that’s: – performant – reliable – extensible
  • 16. Structure Traditionally, systems such as Unix were built as a monolithic kernel: 16 hardware OS kernel user programs everything file system, virtual memory, I/O drivers, process control, system services, swapping, networks, protection, interrupt handling, windows, accounting, ...
  • 17. Structure Problems with monolithic kernels: – hard to understand – hard to modify – unreliable: a bug anywhere causes a system crash – hard to maintain Since the beginnings of OS design, people have sought ways to organize the OS to simplify its design and construction.
  • 18. Structuring Traditional approach is layering: implement system as a set of layers, where each layer is a virtual machine to the layer above. That is, each layer provides a “machine” that has higher level features. 18 hardware layer 0 layer 1 layer 2 layer 3 hardware arch. interface layer 0 “virtual machine”interface layer 1 interface
  • 19. Layering in THE The first description of this approach was Dijkstra’s THE system. 19 hardware CPU scheduling (processes) memory management console device (commands) I/O device buffering user programs
  • 20. THE System System was composed as a set of sequential processes. Each peforms a sequential computation. Processes communicate through explicit synchronization statements. Each process could be tested and verified independently. Each level sees a logical machine provided by lower levels. – level 2 sees virtual processors – level 3 sees VM (really segments) – level 4 sees a “virtual console” – level 5 sees “virtual” I/O drivers
  • 21. Problems with Layering Systems must be hierarchical, but real systems are more complex than that, e.g., – file system would like to be a process layered on VM – VM would like to use files for its backing store I/O Approach is not flexible. Often has poor performance due to layer crossings. Systems are often modelled as layered structures but not built that way (for better or worse).
  • 22. Microkernel Approach The organizing structure currently in vogue is the microkernel OS. Goal is minimize what goes in the kernel, and implement much of the OS as user-level processes. This results in: – better reliability – ease of extension and customization – mediocre performance (unfortunately) First microkernel system was Hydra (CMU, 1970) Examples of microkernel systems are the CMU Mach system, Chorus (French Unix-like system), and in some ways Microsoft NT/Windows.
  • 23. Microkernel System Structure 23 hardware microkernel low-level VM protection processor control system processes file system thread system communication external paging network support high-level scheduling user processes kernel mode user mode