SlideShare a Scribd company logo
1 of 25
Slide 1
Chapter 3: Operating-System Structures
(18M)
System Components
Operating System Services
System Calls
System Structure
Slide 2
Services of O.S.
Program Execution
I/O Management
File system manipulation
Communication
Error detection
Accounting
Protection
Resource Allocation
Slide 3
Common System Components
A system as large and complex as an OS can be
created only by partitioning it into smaller pieces
Process Management
Main Memory Management
File Management
I/O System Management
Secondary Management
Slide 4
Process Management
A process is a program in execution. A process needs
certain resources, including CPU time, memory, files,
and I/O devices, to accomplish its task.
 A process is the unit of work in a system
The operating system is responsible for the following
activities in connection with process management.
 Process creation and deletion.
 Creation and deletion of user and system process
 Process suspension and resumption.
 Provision of mechanisms for:
 process synchronization
 process communication
Slide 5
Main-Memory Management
Memory is a large array of words or bytes, each with its own address. It is a
repository of quickly accessible data shared by the CPU and I/O devices.
 The CPU reads instructions from main memory (MM) during the
instruction-fetch cycle and both reads and writes data from MM during
the data-fetch cycle
Main memory is a volatile storage device. It loses its contents in the case of
system failure.
To improve both CPU utilization and response speed, several programs are
kept in memory
The following are some of the activities in connections with memory
management that are handled by the operating system :
 Keep track of which parts of memory are currently being used and by
whom.
 Decide which processes to load when memory space becomes available.
 Allocate and deallocate memory space as needed.
Slide 6
File Management
A file is a collection of related information defined by its
creator. Commonly, files represent programs (both source
and object forms) and data.
The operating system is responsible for the following
activities in connections with file management:
 File creation and deletion.
 Directory creation and deletion.
 Support of primitives for manipulating files and directories.
 Mapping files onto secondary storage.
 File backup on stable (nonvolatile) storage media.
Slide 7
I/O System Management
Hide the peculiarities of specific hardware devices from the
user
The I/O system consists of:
 A memory management component that includes buffering,
caching and spooling
 A general device-driver interface
 Drivers for specific hardware devices
Slide 8
Secondary-Storage Management
Since main memory (primary storage) is volatile and too
small to accommodate all data and programs permanently,
the computer system must provide secondary storage to
back up main memory.
Most modern computer systems use disks as the principle
on-line storage medium, for both programs and data.
Because secondary storage is used frequently, it must be
used efficiently or else it will become a processing bottleneck
The operating system is responsible for the following
activities in connection with disk management:
 Free space management
 Storage allocation
 Disk scheduling
Slide 9
System Calls
System calls provide the interface between a running program and the
operating system.
 For example – open input file, create output file, print message to
console, terminate with error or normally
 Generally available as routines written in C and C++
 Certain low-level tasks (direct hardware access) may be written in
assembly-language
Mostly accessed by programs via a high-level Application Program
Interface (API) rather than direct system call use
 Provides portability (underlying hardware handled by OS)
 Hides the detail from the programmer
Three most common APIs are Win32 API for Windows, POSIX API for
POSIX-based systems (including virtually all versions of UNIX, Linux,
and Mac OS X), and Java API for the Java virtual machine (JVM)
Slide 10
Example of System Calls
System call sequence to copy the contents of one file to
another file
Slide 11
API – System Call – OS Relationship
Slide 12
Standard C Library Example
C program invoking printf() library call, which calls
write() system call
Slide 13
Passing Parameters as a Table
Slide 14
Types of System Calls
Process control
 end, abort, load, execute, allocate/free memory
File management
 Create/delete file, open, close, read, write
Device management
 Request/release device, read, write
Information maintenance
 Get/set date or time, get process, get/set system data
Communications
 Send/receive message, create/delete comm link
Slide 15
UNIX System Calls
Slide 16
SYSTEM CALLS
Process control
o end, abort
o load, execute
o create process, terminate process
o get process attributes, set process
attributes
o wait for time
o wait event, signal event
o allocate and free memory
File management
o create file, delete file
o open, close
o read, write, reposition
o get file attributes, set file attributes
Device management
o request device, release device
o read, write, reposition
o get device attributes, set device attributes
o logically attach or detach devices
Information maintenance
o get time or date, set time or date
o get system data, set system data
o get process, file, or device attributes
o set process, file, or device attributes
Communications
o create, delete communication connection
o send, receive messages
o transfer status information
o attach or detach remote devices
o get host id
o open,close connection
Slide 18
SYSTEM STRUCTURE
Simple Structure
Layered
Monolithic
Microkernel
Slide 19
Operating System Structure
MS-DOS – written to provide the most
functionality in the least space
 Not well divided into modules
 Designed without realizing it was
going to become so popular
 Although MS-DOS has some
structure, its interfaces and levels of
functionality are not well separated
 Vulnerable to system crashes when
a user program fails
 Written for Intel 8088 which had
no dual mode or hardware
protection
MS-DOS layer structure
Slide 20
Operating System Structure
UNIX – the original UNIX operating system had limited
structuring due to limited hardware functionality.
The UNIX OS consists of two separable parts.
 Systems programs
 The kernel – series of interfaces and device drivers
 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.
 All this functionality in one level makes UNIX difficult to
enhance – difficult to determine impact of change in one part of
the kernel on other parts
Slide 21
UNIX System Structure
kernel
Slide 22
Layered Approach
The operating system is divided 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.
 Simplifies debugging and system
verification – each layer only uses
those below it, so by testing from
bottom up, you isolate errors to the
layer being tested
 Requires careful definition of layers
 Less efficient as each layer adds
overhead to the system increasing
overall time for a system call to
execute
An operating system layer
Slide 23
Layered Approach
These limitations have led to the design of OSs with fewer layers each
with more functionality
Provides most of the advantages of modularized code while avoiding the
difficulties of layer definition and interaction
OS/2, a descendent of MS-DOS, adds multitasking and dual-mode
operation
 Designed in a more layered approach than MS-DOS
 Direct access to low-level facilities is not allowed; this gives the OS more
control over the hardware and more knowledge of which resources each
user program is using
The first release of Windows NT had a highly layered approach but it delivered
low performance compared to Windows 95
 NT 4.0 addressed that problem in part by moving layers from user space to
kernel space and more closely integrating them
Slide 24
OS/2 Layer Structure
Slide 25
Microkernel System Structure
In the mid 1980s, researchers at Carnegie Mellon university developed the
Mach microkernel OS
Moves nonessential components from the kernel into “user” space resulting
in a smaller kernel
Main function of the microkernel is to provide a communication facility
between the client program and various services that are also running in user
space
 Communication takes place between user modules using message passing.
Benefits:
 easier to extend a microkernel
 all new services are added to user space
 easier to port the operating system to new architectures
 more reliable and secure
 less code is running in kernel mode
Apple MacOS X Server OS is based on the Mach kernel
 maps system calls into messages to the appropriate user-level services
 Tru 64 Unix (formerly Digital UNIX)
Slide 26
MONOLITHIC

More Related Content

What's hot

OS Components and Structure
OS Components and StructureOS Components and Structure
OS Components and Structuresathish sak
 
Windows 7 Architecture
Windows 7 ArchitectureWindows 7 Architecture
Windows 7 ArchitectureDaniyal Khan
 
Desktop system,clustered system,Handheld system
Desktop system,clustered system,Handheld systemDesktop system,clustered system,Handheld system
Desktop system,clustered system,Handheld systemLokesh Singrol
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structuresMukesh Chinta
 
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
OPERATING SYSTEMSDESIGN AND IMPLEMENTATIONOPERATING SYSTEMSDESIGN AND IMPLEMENTATION
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION sathish sak
 
Operatingsystems
Operatingsystems Operatingsystems
Operatingsystems kuldeepy60
 
Operating system structures
Operating system structuresOperating system structures
Operating system structuresMohd Arif
 
system calls, single user, multiuser os ...
system calls, single user, multiuser os                                      ...system calls, single user, multiuser os                                      ...
system calls, single user, multiuser os ...myrajendra
 
Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating systemRafi Dar
 
Chapter 2 - Operating System Structures
Chapter 2 - Operating System StructuresChapter 2 - Operating System Structures
Chapter 2 - Operating System StructuresWayne Jones Jnr
 
Modern Operating System Windows Server 2008
Modern Operating System  Windows Server 2008Modern Operating System  Windows Server 2008
Modern Operating System Windows Server 2008Sneha Chopra
 
Windows Architecture Explained by Stacksol
Windows Architecture Explained by StacksolWindows Architecture Explained by Stacksol
Windows Architecture Explained by StacksolStacksol
 
Operating system components
Operating system componentsOperating system components
Operating system componentsSyed Zaid Irshad
 
2 operating system structures
2 operating system structures2 operating system structures
2 operating system structuresDr. Loganathan R
 

What's hot (20)

OS Structure
OS StructureOS Structure
OS Structure
 
System structure
System structureSystem structure
System structure
 
OS Components and Structure
OS Components and StructureOS Components and Structure
OS Components and Structure
 
Windows 7 Architecture
Windows 7 ArchitectureWindows 7 Architecture
Windows 7 Architecture
 
Desktop system,clustered system,Handheld system
Desktop system,clustered system,Handheld systemDesktop system,clustered system,Handheld system
Desktop system,clustered system,Handheld system
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structures
 
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
OPERATING SYSTEMSDESIGN AND IMPLEMENTATIONOPERATING SYSTEMSDESIGN AND IMPLEMENTATION
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
 
Operatingsystems
Operatingsystems Operatingsystems
Operatingsystems
 
Case study windows
Case study windowsCase study windows
Case study windows
 
Operating system structures
Operating system structuresOperating system structures
Operating system structures
 
system calls, single user, multiuser os ...
system calls, single user, multiuser os                                      ...system calls, single user, multiuser os                                      ...
system calls, single user, multiuser os ...
 
Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating system
 
Chapter 2 - Operating System Structures
Chapter 2 - Operating System StructuresChapter 2 - Operating System Structures
Chapter 2 - Operating System Structures
 
Itc chapter # 9
Itc   chapter # 9Itc   chapter # 9
Itc chapter # 9
 
operating system structure
operating system structureoperating system structure
operating system structure
 
Operating System
Operating SystemOperating System
Operating System
 
Modern Operating System Windows Server 2008
Modern Operating System  Windows Server 2008Modern Operating System  Windows Server 2008
Modern Operating System Windows Server 2008
 
Windows Architecture Explained by Stacksol
Windows Architecture Explained by StacksolWindows Architecture Explained by Stacksol
Windows Architecture Explained by Stacksol
 
Operating system components
Operating system componentsOperating system components
Operating system components
 
2 operating system structures
2 operating system structures2 operating system structures
2 operating system structures
 

Similar to Ch2 system structure

Similar to Ch2 system structure (20)

Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.ppt
 
OSCh3
OSCh3OSCh3
OSCh3
 
Ch3
Ch3Ch3
Ch3
 
Section02-Structures.ppt
Section02-Structures.pptSection02-Structures.ppt
Section02-Structures.ppt
 
operating system structure
operating system structureoperating system structure
operating system structure
 
Operating System 2
Operating System 2Operating System 2
Operating System 2
 
16. Computer Systems Basic Software 2
16. Computer Systems   Basic Software 216. Computer Systems   Basic Software 2
16. Computer Systems Basic Software 2
 
Csc 2313 (lecture 2)
Csc 2313 (lecture 2)Csc 2313 (lecture 2)
Csc 2313 (lecture 2)
 
Csc 2313 (lecture 2)
Csc 2313 (lecture 2)Csc 2313 (lecture 2)
Csc 2313 (lecture 2)
 
MELJUN CORTES operating_system_structure
MELJUN CORTES operating_system_structureMELJUN CORTES operating_system_structure
MELJUN CORTES operating_system_structure
 
Chapter02 new
Chapter02 newChapter02 new
Chapter02 new
 
Operating systems
Operating systemsOperating systems
Operating systems
 
CH02.pdf
CH02.pdfCH02.pdf
CH02.pdf
 
NE223_chapter 1_Overview of operating systems.ppt
NE223_chapter 1_Overview of operating systems.pptNE223_chapter 1_Overview of operating systems.ppt
NE223_chapter 1_Overview of operating systems.ppt
 
OS
OSOS
OS
 
Ch2
Ch2Ch2
Ch2
 
L-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptL-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.ppt
 
Operating system
Operating system Operating system
Operating system
 
installing and optimizing operating system software
installing and optimizing operating system software   installing and optimizing operating system software
installing and optimizing operating system software
 
operating systems
operating systemsoperating systems
operating systems
 

More from Ankit Dubey

Unit 1 android and it's tools quiz {mad cwipedia}
Unit 1 android and it's tools quiz {mad cwipedia}Unit 1 android and it's tools quiz {mad cwipedia}
Unit 1 android and it's tools quiz {mad cwipedia}Ankit Dubey
 
Ch5 cpu-scheduling
Ch5 cpu-schedulingCh5 cpu-scheduling
Ch5 cpu-schedulingAnkit Dubey
 
Ch1 introduction-to-os
Ch1 introduction-to-osCh1 introduction-to-os
Ch1 introduction-to-osAnkit Dubey
 
Mongodb mock test_ii
Mongodb mock test_iiMongodb mock test_ii
Mongodb mock test_iiAnkit Dubey
 
Android mock test_iii
Android mock test_iiiAndroid mock test_iii
Android mock test_iiiAnkit Dubey
 
Android mock test_ii
Android mock test_iiAndroid mock test_ii
Android mock test_iiAnkit Dubey
 
Ajp notes-chapter-06
Ajp notes-chapter-06Ajp notes-chapter-06
Ajp notes-chapter-06Ankit Dubey
 
Ajp notes-chapter-05
Ajp notes-chapter-05Ajp notes-chapter-05
Ajp notes-chapter-05Ankit Dubey
 
Ajp notes-chapter-04
Ajp notes-chapter-04Ajp notes-chapter-04
Ajp notes-chapter-04Ankit Dubey
 
Ajp notes-chapter-03
Ajp notes-chapter-03Ajp notes-chapter-03
Ajp notes-chapter-03Ankit Dubey
 
Ajp notes-chapter-02
Ajp notes-chapter-02Ajp notes-chapter-02
Ajp notes-chapter-02Ankit Dubey
 

More from Ankit Dubey (20)

Unit 1 android and it's tools quiz {mad cwipedia}
Unit 1 android and it's tools quiz {mad cwipedia}Unit 1 android and it's tools quiz {mad cwipedia}
Unit 1 android and it's tools quiz {mad cwipedia}
 
Scheduling
Scheduling Scheduling
Scheduling
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Ch5 cpu-scheduling
Ch5 cpu-schedulingCh5 cpu-scheduling
Ch5 cpu-scheduling
 
Ch4 threads
Ch4 threadsCh4 threads
Ch4 threads
 
Ch3 processes
Ch3 processesCh3 processes
Ch3 processes
 
Ch1 introduction-to-os
Ch1 introduction-to-osCh1 introduction-to-os
Ch1 introduction-to-os
 
Android i
Android iAndroid i
Android i
 
Mongodb mock test_ii
Mongodb mock test_iiMongodb mock test_ii
Mongodb mock test_ii
 
Android mock test_iii
Android mock test_iiiAndroid mock test_iii
Android mock test_iii
 
Android mock test_ii
Android mock test_iiAndroid mock test_ii
Android mock test_ii
 
Ajp notes-chapter-06
Ajp notes-chapter-06Ajp notes-chapter-06
Ajp notes-chapter-06
 
Ajp notes-chapter-05
Ajp notes-chapter-05Ajp notes-chapter-05
Ajp notes-chapter-05
 
Ajp notes-chapter-04
Ajp notes-chapter-04Ajp notes-chapter-04
Ajp notes-chapter-04
 
Ajp notes-chapter-03
Ajp notes-chapter-03Ajp notes-chapter-03
Ajp notes-chapter-03
 
Ajp notes-chapter-02
Ajp notes-chapter-02Ajp notes-chapter-02
Ajp notes-chapter-02
 

Recently uploaded

247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 

Recently uploaded (20)

247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 

Ch2 system structure

  • 1. Slide 1 Chapter 3: Operating-System Structures (18M) System Components Operating System Services System Calls System Structure
  • 2. Slide 2 Services of O.S. Program Execution I/O Management File system manipulation Communication Error detection Accounting Protection Resource Allocation
  • 3. Slide 3 Common System Components A system as large and complex as an OS can be created only by partitioning it into smaller pieces Process Management Main Memory Management File Management I/O System Management Secondary Management
  • 4. Slide 4 Process Management A process is a program in execution. A process needs certain resources, including CPU time, memory, files, and I/O devices, to accomplish its task.  A process is the unit of work in a system The operating system is responsible for the following activities in connection with process management.  Process creation and deletion.  Creation and deletion of user and system process  Process suspension and resumption.  Provision of mechanisms for:  process synchronization  process communication
  • 5. Slide 5 Main-Memory Management Memory is a large array of words or bytes, each with its own address. It is a repository of quickly accessible data shared by the CPU and I/O devices.  The CPU reads instructions from main memory (MM) during the instruction-fetch cycle and both reads and writes data from MM during the data-fetch cycle Main memory is a volatile storage device. It loses its contents in the case of system failure. To improve both CPU utilization and response speed, several programs are kept in memory The following are some of the activities in connections with memory management that are handled by the operating system :  Keep track of which parts of memory are currently being used and by whom.  Decide which processes to load when memory space becomes available.  Allocate and deallocate memory space as needed.
  • 6. Slide 6 File Management A file is a collection of related information defined by its creator. Commonly, files represent programs (both source and object forms) and data. The operating system is responsible for the following activities in connections with file management:  File creation and deletion.  Directory creation and deletion.  Support of primitives for manipulating files and directories.  Mapping files onto secondary storage.  File backup on stable (nonvolatile) storage media.
  • 7. Slide 7 I/O System Management Hide the peculiarities of specific hardware devices from the user The I/O system consists of:  A memory management component that includes buffering, caching and spooling  A general device-driver interface  Drivers for specific hardware devices
  • 8. Slide 8 Secondary-Storage Management Since main memory (primary storage) is volatile and too small to accommodate all data and programs permanently, the computer system must provide secondary storage to back up main memory. Most modern computer systems use disks as the principle on-line storage medium, for both programs and data. Because secondary storage is used frequently, it must be used efficiently or else it will become a processing bottleneck The operating system is responsible for the following activities in connection with disk management:  Free space management  Storage allocation  Disk scheduling
  • 9. Slide 9 System Calls System calls provide the interface between a running program and the operating system.  For example – open input file, create output file, print message to console, terminate with error or normally  Generally available as routines written in C and C++  Certain low-level tasks (direct hardware access) may be written in assembly-language Mostly accessed by programs via a high-level Application Program Interface (API) rather than direct system call use  Provides portability (underlying hardware handled by OS)  Hides the detail from the programmer Three most common APIs are Win32 API for Windows, POSIX API for POSIX-based systems (including virtually all versions of UNIX, Linux, and Mac OS X), and Java API for the Java virtual machine (JVM)
  • 10. Slide 10 Example of System Calls System call sequence to copy the contents of one file to another file
  • 11. Slide 11 API – System Call – OS Relationship
  • 12. Slide 12 Standard C Library Example C program invoking printf() library call, which calls write() system call
  • 14. Slide 14 Types of System Calls Process control  end, abort, load, execute, allocate/free memory File management  Create/delete file, open, close, read, write Device management  Request/release device, read, write Information maintenance  Get/set date or time, get process, get/set system data Communications  Send/receive message, create/delete comm link
  • 16. Slide 16 SYSTEM CALLS Process control o end, abort o load, execute o create process, terminate process o get process attributes, set process attributes o wait for time o wait event, signal event o allocate and free memory File management o create file, delete file o open, close o read, write, reposition o get file attributes, set file attributes Device management o request device, release device o read, write, reposition o get device attributes, set device attributes o logically attach or detach devices Information maintenance o get time or date, set time or date o get system data, set system data o get process, file, or device attributes o set process, file, or device attributes Communications o create, delete communication connection o send, receive messages o transfer status information o attach or detach remote devices o get host id o open,close connection
  • 17. Slide 18 SYSTEM STRUCTURE Simple Structure Layered Monolithic Microkernel
  • 18. Slide 19 Operating System Structure MS-DOS – written to provide the most functionality in the least space  Not well divided into modules  Designed without realizing it was going to become so popular  Although MS-DOS has some structure, its interfaces and levels of functionality are not well separated  Vulnerable to system crashes when a user program fails  Written for Intel 8088 which had no dual mode or hardware protection MS-DOS layer structure
  • 19. Slide 20 Operating System Structure UNIX – the original UNIX operating system had limited structuring due to limited hardware functionality. The UNIX OS consists of two separable parts.  Systems programs  The kernel – series of interfaces and device drivers  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.  All this functionality in one level makes UNIX difficult to enhance – difficult to determine impact of change in one part of the kernel on other parts
  • 20. Slide 21 UNIX System Structure kernel
  • 21. Slide 22 Layered Approach The operating system is divided 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.  Simplifies debugging and system verification – each layer only uses those below it, so by testing from bottom up, you isolate errors to the layer being tested  Requires careful definition of layers  Less efficient as each layer adds overhead to the system increasing overall time for a system call to execute An operating system layer
  • 22. Slide 23 Layered Approach These limitations have led to the design of OSs with fewer layers each with more functionality Provides most of the advantages of modularized code while avoiding the difficulties of layer definition and interaction OS/2, a descendent of MS-DOS, adds multitasking and dual-mode operation  Designed in a more layered approach than MS-DOS  Direct access to low-level facilities is not allowed; this gives the OS more control over the hardware and more knowledge of which resources each user program is using The first release of Windows NT had a highly layered approach but it delivered low performance compared to Windows 95  NT 4.0 addressed that problem in part by moving layers from user space to kernel space and more closely integrating them
  • 23. Slide 24 OS/2 Layer Structure
  • 24. Slide 25 Microkernel System Structure In the mid 1980s, researchers at Carnegie Mellon university developed the Mach microkernel OS Moves nonessential components from the kernel into “user” space resulting in a smaller kernel Main function of the microkernel is to provide a communication facility between the client program and various services that are also running in user space  Communication takes place between user modules using message passing. Benefits:  easier to extend a microkernel  all new services are added to user space  easier to port the operating system to new architectures  more reliable and secure  less code is running in kernel mode Apple MacOS X Server OS is based on the Mach kernel  maps system calls into messages to the appropriate user-level services  Tru 64 Unix (formerly Digital UNIX)