0% found this document useful (0 votes)
32 views60 pages

Os Lecture1

The document provides an overview of the COMP2006 Operating Systems course, highlighting prerequisites, required textbooks, and key topics such as operating system purposes, components, and hardware structure. It explains the role of an operating system as an interface between users and hardware, detailing components like process management and I/O system management. The document also covers the importance of understanding operating systems for effective programming and system resource management.

Uploaded by

ema
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)
32 views60 pages

Os Lecture1

The document provides an overview of the COMP2006 Operating Systems course, highlighting prerequisites, required textbooks, and key topics such as operating system purposes, components, and hardware structure. It explains the role of an operating system as an interface between users and hardware, detailing components like process management and I/O system management. The document also covers the importance of understanding operating systems for effective programming and system resource management.

Uploaded by

ema
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
You are on page 1/ 60

1

Operating Systems
COMP2006

Overview
Lecture 1

2
COMP2006 Operating Systems

Prerequisites:
 Unix and C Programming

Knowledge on C language is essential to complete programming


assignment.

3
Textbooks
Required Text:
Silberschatz, Galvin, and Gagne, Operating System Concepts, 9th
edition, John-Wiley & Sons, 2013; OR 10th edition

4
Overview

Reference
Chapter 1-2, and Section 13.1-13.2
Topics:
 Operating system purposes, components and services.

 Basic hardware structure and operations

 OS structures

5
What is an OS?
 An Operating System (OS) is a PROGRAM that acts as an
interface between a USER of a computer system and the
COMPUTER HARDWARE
– OS manages the computer hardware, and provides a basis for running
application programs
 There is no universally accepted definition of OS and what is part
of OS and what is not
 Kernel – a part of OS: a program that is running all the time on
the computer
– Other programs are considered as system/application programs

6
OS Components
 Process Management
 Main-memory management
 Secondary-storage management
 File Management
 I/O System Management
 Protection System
 Networking (Distributed Systems) – NOT in COMP2006
 Command- interpreter System – NOT in COMP2006

7
OS Main Purposes
1) To provide an environment for a user to execute programs
conveniently and efficiently
– Users can be people, machines, or other computers
– Efficient operation of computer system is important in a large-expensive
(multi million Dollars) multi-user computer
– Convenience and efficiency are often contradictory
• Aims for convenience sacrifice efficiency
• In the past → efficiency is more important
• Now → users need more conveniences?
2) To simulate features not available on hardware
– OS provides features factually not provided by the hardware, e.g., virtual
disks, virtual memory, virtual machines, etc.
3) To control all computer resources and provide the base at which
the application programs can be written and run

8
Why do we study operating systems?
 You may not be involved in creating / modifying operating
systems, however, most of your code runs on top of operating
systems
– Thus, good knowledge on how operating systems work will help you
write proper, efficient, effective, and secure programs.
 Knowing the fundamentals of operating systems, how they
manage computer hardware, and what they provide to
applications is important to you who
– create / modify operating systems
– write programs that run on operating systems
– use operating systems

9
Abstract of Computer System
User 1 User 2 User 3 User n

Compiler Assembler Text Editor Database


System and Application Programs

Operating System

Computer Hardware
• CPU
• Memory
• Input/Output (I/O)

To study operating systems, we need to know the fundamentals of computer system 10


Computer System Organization

From Silberschatz, et al.

11
PC Motherboard (from Silberschatz, et al.)

12
Computer System Organization (cont. )
 A general-purpose computer system contains:
– One or more Central Processing Unit (CPU): the ‘brain’ of the system
– Memory system
– Input/output (I/O) devices, e.g., disks, printers
 CPU, I/O devices, and Memory unit are connected by a system bus
– All signals between them flow through the bus
 Each device type (e.g., disk drive, video display, etc.) is managed by
a device controller that has a local buffer
– Each device controller has a device driver (part of OS)
– CPU moves data from/to main memory to/from local buffer
 An I/O operation is from the device to the local buffer of a controller.
– Device controller informs CPU that it has finished its operation by causing an
interrupt
– I/O devices and CPU can execute concurrently
 Access to memory is managed by a memory controller

13
Computer System Organization (cont. )
 Computer needs an initial program (called bootstrap) to start
running when it is powered on, and rebooted

 The bootstrap can be stored in a hardware (called firmware)

 The bootstrap program initializes all aspects of computer system,


e.g., CPU registers, Memory content, Device controllers

 The bootstrap program knows how to locate the OS kernel,


– The program will load kernel in memory, and run it

14
Computer System Organization (cont. )
 The kernel runs all the time and provides services to the system
and its users
 System programs are loaded and start running at boot time
 System programs that are running are called system processes or system
daemon that run when the kernel is running
– In Linux, the first system process is called init or systemd that has
process ID or PID = 1.
 It runs other daemons
– Once the system is fully booted, it waits for some events to occur
 Thus, an operating system is interrupt-driven
 The system knows when there occurs an event via interrupts either from
hardware or software (called trap or exception)
– Hardware generates interrupt by sending signal to CPU via bus
– Software sets interrupt using a system call (also called a monitor call)

15
Interrupt Mechanism
 CPU stops what it is doing when it receives an interrupt
– It goes to a specific location to execute the interrupt service routine (ISR)
– The location is stored in an interrupt vector table
 The table is in low memory area – a protected area that can be accessed only by OS
– Interrupt vector table contains the addresses/pointers of all ISRs
– Each interrupt is known by its interrupt number/vector
 Interrupts with lower numbers have higher priority
 CPU computes the location from the interrupt number
– E.g., multiply interrupt number with a fixed value, e.g., 4 → the starting address of ISR for interrupt
40 is 40 * 4 = 160

 CPU resumes its execution on the completion of each ISR


– CPU must save the address of interrupted instruction before serving any
interrupt, and processor states, e.g., registers, program counter
 The return address is stored on the system stack
– The saved address is put into the program counter
 Program counter contains the address of the next instruction to be executed by CPU
– Using the saved processor states, CPU resumes the interrupted execution
16
Intel processor interrupt vector table
Figure 1.5 (textbook, 10th edition)

17
Interrupt Controller
 Efficient interrupt handling is required for good system
performance.
– A server may handle hundreds of thousands of interrupts per second
 Use interrupt-controller hardware
– It can defer interrupt handling during critical processing
– It provides efficient dispatch to interrupt handler
– It supports multi-level interrupts with priority
 CPU can defer a low priority interrupt when a higher priority
interrupt is being served
– It is also possible to stop the execution of an interrupt to serve an incoming
higher priority interrupt

18
OS interaction with the interrupt mechanism
 At boot time: OS probes the hardware buses to see what devices
are present and installs the corresponding interrupt-handlers into
the interrupt vector
 During I/O: Various devices raise interrupts to indicate:
– They are ready to provide service
– They have completed output
– The input data are available, or a failure has been detected
 During interaction with processes/programs
– Exceptions: e.g., divide by zero, accessing protected memory address,
page-fault, etc.
– System call implementation: it uses software interrupt or trap
 Has lower priority than device interrupt
– Managing flow of control within the kernel
 E.g., Copying data from kernel buffer to user buffer is not urgent, and thus can be done
when higher priority task, e.g., reading the data from disk to the kernel buffer is
completed 19
Storage Structure

Registers
Storage hierarchy:
 Speed

 Cost Primary
Cache
storage volatile
 Volatility

 Size/capacity
Main Memory

Nonvolatile memory
Secondary
storage
Hard-disk drives
Non-
volatile
Optical Disks
Tertiary
storage
Magnetic Tapes
20
Performance of various levels of storage
Figure 1.14 (Textbook, 10th edition)

21
Storage Structure (cont. )
 CPU executes instructions only from a main memory
– Main memory: the only large storage media that CPU can access directly
 Memory keeps both programs and data (von Neumann Architecture)
 Execution cycle in Von Neumann Architecture
1) Fetch an instruction from memory and stores it in a register
 The register is called instruction register (IR)
 The address/pointer of the next instruction to be fetched/executed is stored in
the CPU’s Program Counter (PC)
2) Decode the instruction
3) If the instruction needs operands, fetch the operands from memory, and
store them in internal registers
4) Execute the instruction, and store the results in memory
5) Repeat the steps

22
Storage Structure (cont. )
 General purpose computer uses rewritable memory for its main
memory, called random access memory (RAM)
– Usually implemented in dynamic RAM (DRAM)
 Other type of memory: Read only Memory (ROM), cannot be changed, is used
to store static program, e.g., bootstrap
 EEPROM: cannot be changed frequently, contains mostly static programs
 Memory can be viewed as a one-dimensional array of bytes
– Its size is determined by the number of bits used to address each location
in the memory
 Each byte has an address; the address starts from 0 to 2n – 1, for n bit address
 E.g., address with 32 bits means the size of memory is 232 = 4 Giga bytes

Note: one word is the CPU’s native unit of data. A computer with 64-bit registers
usually has 64-bit words. A computer usually executes intructions with operands of size
words, rather than bytes.

23
Storage Structure (cont. )
Unit standard by the International Electrotechnical Commission (IEC)

Binary Decimal
210=1024 KiB kibibyte 1000 KB kilobyte

220=10242 MiB mebibyte 10002 MB megabyte


230=10243 GiB gibibyte 10003 GB gigabyte
240=10244 TiB tebibyte 10004 TB terabyte
250=10245 PiB pebibyte 10005 PB petabyte
260=10246 EiB exbibyte 10006 EB exabyte
270=10247 ZiB zebibyte 10007 ZB zettabyte
280=10248 YiB yobibyte 10008 YB yottabyte

Note: The textbook and this slide uses 210 bytes = KB, 220 bytes = MB, etc.
24
Storage Structure (cont. )
 Secondary storage: extension of main memory
– It provides non-volatile storage and large capacity
– The most common secondary storage is hard disk
 Volatile storage loses its contents when it is not powered
 Registers, cache and main memory are volatile
 Solid state disk, magnetic disk, optical disk and magnetic tape are non-
volatile
– Solid state disk uses DRAM in normal operation and stores its contents to a
hidden magnetic disk when it is powered off
– Non-volatile RAM (NVRAM) uses DRAM with backup battery
 Cache and registers are smaller but faster storage
– CPU has a limited number of internal registers (access time: 0.25-0.5 ns)
and limited sized cache (access time: 0.5 – 25 ns)

25
Storage Structure (cont.)
 Magnetic disk: rigid metal or glass platters covered with magnetic recording
material
– Disk surface is logically divided into circular tracks, which are subdivided into
sectors
 The set of tracks that are in one arm position forms a cylinder
 A disk uses its disk head to read/write stored data
– Disk speed has two parts:
 Transfer rate: the rate at which data flow between the drive and computer (in
MB per second).
 Random access time = seek time + rotational latency (in millisecond)
– Seek time: the time to move the disk arm to the desired cylinder
– Rotational latency: the time for the desired sector to rotate to the disk head
 Magnetic tape: its access time is about a thousand times slower than magnetic
disk
– It is mainly used for backup – tertiary storage

26
Disk Mechanism
Figure 11.1 (Textbook, 10th edition)

• Each read/write head, attached to a disk


arm, flies above each surface
• the disk crashes if the head makes contact with
the surface

• Each platter is logically divided into tracks


• each track is divided into hundreds of sectors

• A cylinder is a set of tracks that are at one


arm position
• A disk can have thousands of cylinders

• A disk spins at 5400, 7200, 10000, or 15000


Rotations Per Minute (RPM)

27
I/O - Basic concepts
 An I/O device communicates with a computer system by sending signals over a
cable or wireless via a port

 A device or I/O controller is a collection of electronics


– It operates a port, a bus, or a device

– Each controller has registers for data and control signals:


 Status register: contains bits indicating states of the device
 Control register: written by host to start a command or change the mode of a device
 Data-in register: read by host to get input
 Data-out register: written by host to send output

– CPU communicates with the controller by reading and writing bit patterns in these
registers using special I/O instructions

– Some devices may have their own built-in controllers

 Each device has I/O addresses

28
I/O Structure
Figure 13.1 (Textbook)

Type of I/O devices:


• Storage, e.g., disks
• Transmission, e.g., network
connection
• Human-interface, e.g., screen
• Other specialized devices

29
Some I/O Port addresses
Fig. 12.2 (Textbook, 10th edition)

You need not memorize the numbers!


30
Host – Controller interactions
 How does a host communicate with an I/O controller?
– Polling
– Interrupt
– Direct Memory Access
 Polling can be used to determine the state of a device
– To check if the device has available, or ready to be written, or there is an error
– It has access to the device controller’s status register and command register
 Polling is efficient if the device and its controller are fast
– Note: each poll needs only 3 CPU instructions: read register, logical AND, and jump.

 When polling is not efficient, use interrupt


– A device sends an interrupt to CPU when the device is ready for service

31
Basic interrupt I/O mechanism
1. Device controller raises an interrupt by asserting a signal on the
CPU’s interrupt request line

2. CPU catches the interrupt and dispatches the interrupt to its


interrupt service routine (ISR)
– Note, CPU senses the interrupt request line after executing every instruction
– If CPU senses for interrupt request, it saves its state and jumps to its ISR

3. ISR clears the interrupt by servicing the device


– It determines the cause of the interrupt, performs necessary processing, and
executes a return-from-interrupt instruction to return to CPU

32
Interrupt-drive I/O cycle
CPU I/O controller
1
Device driver initiates I/O
Initiates I/O
2
CPU executing
CPU checks for interrupts between
3
instructions

Generates interrupt signal if


4 input ready, output complete, or
Receiving interrupt, CPU error
transfers control to ISR

ISR processes data and


returns from the interrupt

6
7
CPU resumes processing of
interrupted task
33
Direct memory access (DMA)
 DMA is used to improve the performance for large data transfers.
– Use a special-purpose processor (DMA controller)
– DMA bypasses CPU to transfer data directly between I/O device and memory
– Concurrently, CPU goes on with other work

 CPU must give command to DMA controller, containing information:


– A pointer to the source/address of the data being transferred,
– A pointer to the destination/address of the transfer, and
– A count of the number of bytes to be transferred

 Handshaking between DMA controller and device controller uses DMA-


request line and DMA-acknowledge line

 After finishing the entire transfer, DMA controller interrupts the CPU
– Thus, DMA uses only one interrupt for the whole data transfer

34
Steps in DMA Transfer
Fig. 13.5 (textbook)

35
Computer-System Architecture

 A single-processor system contains only one CPU to execute


general purpose instructions
– However, it also contains special purpose processors
 E.g., disk, keyboard, DMA, graphic controllers
 These specialized processors do not run user processes
 OS may be able to manage the processors, e.g., task disk controllers to use given scheduling
algorithms.
 A multiprocessor system contains two or more processors
working together
– They may share computer bus, system clock, memory, I/O devices
– Also called parallel system or multicore system

36
Multiprocessor (cont. )

 Three main advantages of multiprocessor system


– Increased throughput: get more work done in less time
 The speed up in n processor system is NOT n due to overhead
– Economy of scale: I/O devices, memory storage, and power supplies can be
shared
– Increased reliability: failure of one processor does not make the whole
system down
 Graceful degradation: the system can perform operations proportional to the
level of operations of the surviving parts of the system
 Fault-tolerant: the system can continue its function in the event of component
failures
– Require failure detection, diagnoses, and even correction
– May use multiple hardware and software duplicates to execute the same tasks
in parallel, and take as output the result from the majority of the duplicates

37
Multiprocessor (cont.)
 Two types of multiprocessor system:
– Asymmetric multiprocessing
– Symmetric multiprocessing (SMP)

 Asymmetric multiprocessing:
– Use a master processor to schedule and allocate work to (slave) processors
– Each slave processor waits for instruction from the master or has predefined
task
– More common in extremely large systems

38
Multiprocessor Systems (cont. )

 SMP is a more common system


- Each processor runs an identical copy of the OS.
- Each processor has its own registers and cache
❖ However, they share the same memory
- Many processes can run at once without significant performance
deterioration

39
Multiprocessor Systems (cont. )

 Multicore system is a multiprocessor system but the processors


are on a single chip
– More efficient because on-chip communication is faster than inter-chip
communication
– Less power/energy
– Note: not all multiprocessors are multicores
 Blade servers: multiple processor boards, I/O boards and
networking boards are put in the same chassis
– Each processor board boots independently and runs its own OS
– Each processor board can be multiprocessors
40
Multiprogramming
 Goal: to increase the CPU utilization
 Several jobs are kept in main memory at the same
time, and the CPU is multiplexed among them
 It needs these OS features: Memory partition
❖ Job scheduling: OS chooses jobs and put them OS
into memory
❖ Memory management: OS allocates memory Job 1
for each job
❖ CPU scheduling: OS chooses one among the Job 2
jobs in memory (called processes) that is ready
to run
Job 3
❖ I/O allocation

41
Time-Sharing/Multitasking Systems
Goal: to provide interactive use of computer system at reasonable
cost
 It is a variant of multiprogramming where user input is from on-
line terminal
 CPU is multiplexed among jobs in memory frequently (1 sec?)
so that users can interact with their running program.
 It needs these additional OS features:
– On-line communication between users and system
 When OS finishes the execution of one command, it seeks the next control
statement from the user’s keyboard
– On-line file system, for users to access data and code
 Today, most systems provide both batch processing and time
sharing

42
Real-time Systems
 It has well-defined fixed-time constraint –
– The system is functional only if it completes within the time constraint
 Hard real-time system
❖ It guarantees that tasks complete on time
❖ It is often used as a control device in a dedicated application
❖ E.g., controlling scientific experiments, medical imaging systems, industrial
control systems, and some display systems
❖ It has limited or no secondary storage
❖ data is stored in short-term memory, or in ROM.
 Soft real-time system
❖ It sets a critical-time task higher priority over others until it completes
❖ It is useful in applications (multimedia)

43
Virtualization
 Virtualization technology allows an OS to run as applications on
other OS
– It is a software that includes an emulation that is used when the type of
source CPU is different from that of the target CPU
 e.g., it allows applications compiled for an IBM power CPU to run on Intel CPU

processes Processes processes


Processes
Programming
interface
Kernel Kernel Kernel
VM1 VM2 VM3
kernel
virtual machine manager
hardware
hardware

44
OS Operation
 In multiprogramming, OS must ensure that an incorrect (or malicious) program
cannot cause other programs to execute incorrectly
 Many programming errors are detected by the hardware, and the errors are
normally handled by the OS

Dual-mode operation
 Hardware provides at least two modes of operations:

– User mode: user programs run in this mode


– Monitor mode (also called Supervisor, System, or privileged mode): user programs
are not allowed to run in this mode.
 The hardware provides a Mode bit by to indicate the current mode: monitor (0)
or user (1)
– The OS can set the mode bit to 0 or 1

45
OS Operation (cont.)
Dual-mode operation (cont.)
 The hardware provides some privileged instructions, i.e., machine
instructions that may cause harm
– E.g., the MSB of the machine code of the instruction is a bit ‘0’
 A privileged instruction can be executed only in monitor mode
 At system boot-time the hardware starts in monitor mode: OS is loaded
 OS starts user processes in user mode
– A user process could never gain control of the computer in monitor mode
 When an interrupt or fault occurs hardware switches to monitor mode

Set user mode

monitor user

Interrupt/fault

46
OS Operation (cont.)
I/O
 All I/O instructions are privileged instructions

 How does the user program perform I/O ? Use system call

– A system call usually takes the form of a trap to a specific location in the interrupt
vector
– Control passes through the interrupt vector to an interrupt service routine in the
OS, and the mode bit is set to a monitor mode.
– The monitor verifies that the parameters are correct and legal, executes the request,
and returns control to the instruction following the system call.

47
OS Operation (cont.)
Memory
 OS must provide memory protection at least for the interrupt vector and the
Interrupt Service Routine
– Only OS can access these memory areas.
 Two registers can be used to determine the range of legal addresses each
program can access:
– Base register: It holds the starting address of physical memory address for the
program
– Limit register: It contains the size of the memory range for the program
 Memory area outside the defined range for a program is protected, i.e., the
program is not allowed access
– OS has unrestricted access to monitor and user memory
 Instructions to load base and limit registers are privileged instructions. Why?

48
OS Operation (cont.)
CPU
 OS must prevent one user program using CPU all the time
– E.g., due to program getting stuck in an infinite loop, or non-fair users

 OS uses timer interrupt after specified period to ensure OS maintains control


– OS maintains a system timer that is decremented every clock tick
– When the timer reaches value 0, an interrupt occurs

 Timer is commonly used to implement time sharing


– Timer is also used to compute the current time
– Loading system timer value is a privileged instruction. Why?

49
System Calls
 A system call is a user interface to OS services
– It is used to ask the OS to execute some instructions that can be run only in monitor mode, e.g.,
I/O instruction
 System call is available in assembly-language or in high level languages, e.g., C
– E.g., fork () is a system call to ask OS to create a new process
 Application Program Interface (API): a set of functions available to an application
programmer
– An API typically invokes some system calls for the application programmers
– Examples of API: Windows API, POSIX API, Java API
– API is more portable and simpler to use

Figure 2.5 (Textbook)

50
System Calls (cont. )
 A system call is known by its number
– System call interface maintains a vector table which stores pointers to system call routines
 System call interface intercepts each API and calls all corresponding system calls to handle the API
 System call result/termination:
– Normal termination (exit or return)
– Terminate current program and return to the command interpreter
– Abnormal termination (trap) ⎯ program error

How to pass parameters to OS?


• In registers
• In a block of memory or table – for many
parameters; its starting address in a register
• In a stack

Figure 2.6 (Textbook)


51
System Calls (cont. )
Types of system calls (don’t memorize these!)

1) Process control
– End, abort (running program); Load, execute; Create, terminate; Signal event, etc.
– Examples: fork(), exit(), wait(), etc.
2) File management
– Create, delete; Open, close; Read, write, reposition; Get and set file attributes, etc.
– Examples: open(), read(), write(), close(), etc.
3) Device management (memory, tape drives etc.)
– Request device; Release device; Read, write, reposition, etc.
– Examples: ioctl(), read(), write(), etc.
4) Information maintenance
– Get or set time or date; Get or set process attributes, etc.
– Examples: getpid(), alarm(), sleep(), etc.
5) Communications
– Create, delete communication connection; Send and receive messages, etc.
– Examples: pipe(), shmget(), mmap(), etc.
6) Protection
– Resource access control
– Examples: chmod(), umask(), chown(), etc.
52
System programs or utilities
 Provide a convenient environment for program development and execution
– Most users’ view of the OS is defined by system programs, not the actual system calls
– Some of them are simple user interface to system calls

 System programs can be divided into:


– File manipulation: Create, delete, copy, rename, print, dump, list
– Status information: Date, time, memory, disk space, number of users
– File modification: Text editors to create and modify content of files
– Programming-language support: Compilers, interpreters, assemblers
– Program loading and execution: Absolute, Relocatable, Overlay loaders
– Communication: Programs that provide the mechanism for creating virtual connections
among processes, users, and different computer systems

53
OS Structures
 A system as large and complex as a modern OS must be designed carefully
such that it can function properly and be modified easily
 Various structures:
– Simple Structure/Monolithic
– Layered Approach
– Microkernels
– Modules

54
Monolithic
(the users) • The original Unix was limited
•Shells and commands by hardware functionality
•Compilers and interpreters
• Put all kernel functionality
•System libraries
into a single static binary file
System call interface to the kernel
that runs in kernel mode
Signals terminal File system CPU scheduling
• The UNIX OS consists of two
handling Swapping block I/O Page replacement
separable parts:
Character I/O system Disk/tape drivers Demand paging
Terminal drivers Virtual memory
• System programs
• Kernel
Kernel interface to the hardware
Terminal controllers Device controllers Memory controllers
Terminals Disks and tapes Physical memory

 Kernel consists of everything below the system-call interface and above the physical
hardware
– It provides the file system, CPU scheduling, memory management, and other operating-system
functions
– Disadv: it contains many functions in one level - difficult to implement, maintain, and extend
– Adv: little overhead in system call, and fast communication within kernel processes
55
Layered approach
 OS is divided into a several layers (levels) Six layers
– Each layer is built on top of lower layers
– The bottom layer (layer 0) is the hardware, and the
Layer 5: User programs
highest (layer N) is the user interface Layer 4: Buffering for input and
– It was first used in the THE (Technische Hogeschool output devices
Eindhoven) operating system
Layer 3: Operator-console device
 Layers are selected such that each layer uses
driver
functions (operations) and services of only
lower-level layers Layer 2: Memory management
 Advantage: Modularity - easy to debug Layer 1: CPU scheduling
 Disadvantage: less efficient, hard to define
level functionality Layer 0: Hardware

56
Microkernel
 It has smaller-sized kernel
– It provides minimal services such as process and memory management, and communication
– It puts non-essential components of kernel as system/user programs
 The kernel functions as a communication facility between a client and the OS
services using message passing
Advantages:
 Easier to extend OS

 More portable

 Better security and reliability

Disadvantages:
 Using message passing increases system function overhead, and thus reduces
performance

Examples: Mach (CMU), Mac OS X kernel (Darwin), Digital Unix,

57
Microkernel (illustration from textbook)

58
Modules
 Modular kernel
– It uses Object-oriented programming techniques
 The kernel has a set of core components
– Additional modules (e.g., Scheduling, device drivers, file systems) can be added during
boot/run time to kernel
 It is like a layered system but more flexible
– Any module can call any other module
 It is like a microkernel but more efficient
– Modules do not need message passing

Examples: Solaris, Linux, Mac OS X.

59
Linux System Structure (from textbook)
• Hybrid structure: monolithic plus modular design
➢ It uses glibc to communicate with the system call interface

60

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy