0% found this document useful (0 votes)
5 views11 pages

Overview of Operating System Structures

Uploaded by

zubairrahimi213
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views11 pages

Overview of Operating System Structures

Uploaded by

zubairrahimi213
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Operating-System Structures

Types ofOS Structure


Operating System Structure
• General-purpose OS is very large program
• Various ways to structure ones
• Simple structure – MS-DOS
• More complex ( Monolithic ) -- UNIX
• Layered – an abstraction
• Microkernel –Mach
• Modular Structure
Simple Structure
-- MS-DOS
MS-DOS – written to provide
the most functionality in the
least space
 Not divided into modules
 Although MS-DOS has some
structure, its interfaces and
levels of functionality are
not well separated
Example: MS-DOS
• Single-tasking
• Shell invoked when system booted
• Simple method to run program
• No process created
• Single memory space
• Loads program into memory, overwriting all but the kernel
• Program exit -> shell reloaded
At system startup running a program
Non Simple
Structure -- UNIX
UNIX – limited by hardware
functionality, the original UNIX
operating system had limited
structuring. The UNIX OS consists
of two separable parts
Systems programs
The kernel
Consists of everything below the
system-call interface and above
the physical hardware
Provides the file system, CPU
scheduling, memory
management, and other
operating-system functions; a
large number of functions for one
level
Example: FreeBSD
• Unix variant
• Multitasking
• User login -> invoke user’s
choice of shell
• Shell executes fork() system call
to create process
• Executes exec() to load program
into process
• Shell waits for process to
terminate or continues with user
commands
• Process exits with:
• code = 0 – no error
• code > 0 – error code
Layered • The operating system is divided
Approach into a number of layers (levels),
each built on top of lower layers.
The bottom layer (layer 0), is the
hardware; the highest (layer N) is
the user interface.
• With modularity, layers are
selected such that each uses
functions (operations) and
services of only lower-level layers
Microkernel • Moves as much from the kernel into user space
• Mach example of microkernel
System Structure • Mac OS X kernel (Darwin) partly based on Mach
• Communication takes place between user
modules using message passing
Application File Device user
• Benefits:
Program System Driver mode
• Easier to extend a microkernel
• Easier to port the operating system to new
messages messages architectures
Interprocess memory CPU kernel
• More reliable (less code is running in kernel mode)
Communication managment scheduling mode • More secure
microkernel • Detriments:
• Performance overhead of user space to kernel
hardware space communication
• Many modern operating systems
Modules implement loadable kernel modules
• Uses object-oriented approach
• Each core component is separate
• Each talks to the others over known
interfaces
• Each is loadable as needed within the
kernel
• Overall, similar to layers but with
more flexible
• Linux, Solaris, etc
Hybrid Systems
• Most modern operating systems are actually not one pure model
• Hybrid combines multiple approaches to address performance, security,
usability needs
• Linux and Solaris kernels in kernel address space, so monolithic, plus modular
for dynamic loading of functionality
• Windows mostly monolithic, plus microkernel for different subsystem
personalities
• Apple Mac OS X hybrid, layered, Aqua UI plus Cocoa programming
environment
• Below is kernel consisting of Mach microkernel and BSD Unix parts, plus I/O
kit and dynamically loadable modules (called kernel extensions)
System Boot
• When power initialized on system, execution starts at a fixed memory
location
• Firmware ROM used to hold initial boot code
• Operating system must be made available to hardware so hardware can
start it
• Small piece of code – bootstrap loader, stored in ROM or EEPROM locates the
kernel, loads it into memory, and starts it
• Sometimes two-step process where boot block at fixed location loaded by ROM
code, which loads bootstrap loader from disk
• Common bootstrap loader, GRUB, allows selection of kernel from multiple
disks, versions, kernel options
• Kernel loads and system is then running

You might also like