Ch2 system structure

Ankit Dubey
Ankit DubeyStudent em Student of Government Polytechnic Mumbai
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
1 de 25

Recomendados

OS_Ch3 por
OS_Ch3OS_Ch3
OS_Ch3Supriya Shrivastava
871 visualizações39 slides
Ch3 OS por
Ch3 OSCh3 OS
Ch3 OSC.U
703 visualizações39 slides
Operating System Structure (documentation) por
Operating System Structure (documentation)Operating System Structure (documentation)
Operating System Structure (documentation)Navid Daneshvaran
839 visualizações8 slides
Structure of operating system por
Structure of operating systemStructure of operating system
Structure of operating systemGayathriS578276
261 visualizações14 slides
Operating-System Structures por
Operating-System StructuresOperating-System Structures
Operating-System StructuresCloudbells.com
919 visualizações29 slides
Os structure por
Os structureOs structure
Os structureMohd Arif
26.8K visualizações29 slides

Mais conteúdo relacionado

Mais procurados

OS Structure por
OS StructureOS Structure
OS StructureAjay Singh Rana
213 visualizações14 slides
System structure por
System structureSystem structure
System structureKalyani Patil
80 visualizações29 slides
OS Components and Structure por
OS Components and StructureOS Components and Structure
OS Components and Structuresathish sak
7.2K visualizações24 slides
Windows 7 Architecture por
Windows 7 ArchitectureWindows 7 Architecture
Windows 7 ArchitectureDaniyal Khan
8.9K visualizações16 slides
Desktop system,clustered system,Handheld system por
Desktop system,clustered system,Handheld systemDesktop system,clustered system,Handheld system
Desktop system,clustered system,Handheld systemLokesh Singrol
2.7K visualizações13 slides
Operating systems system structures por
Operating systems   system structuresOperating systems   system structures
Operating systems system structuresMukesh Chinta
1.9K visualizações34 slides

Mais procurados(20)

OS Structure por Ajay Singh Rana
OS StructureOS Structure
OS Structure
Ajay Singh Rana213 visualizações
System structure por Kalyani Patil
System structureSystem structure
System structure
Kalyani Patil80 visualizações
OS Components and Structure por sathish sak
OS Components and StructureOS Components and Structure
OS Components and Structure
sathish sak7.2K visualizações
Windows 7 Architecture por Daniyal Khan
Windows 7 ArchitectureWindows 7 Architecture
Windows 7 Architecture
Daniyal Khan8.9K visualizações
Desktop system,clustered system,Handheld system por Lokesh Singrol
Desktop system,clustered system,Handheld systemDesktop system,clustered system,Handheld system
Desktop system,clustered system,Handheld system
Lokesh Singrol2.7K visualizações
Operating systems system structures por Mukesh Chinta
Operating systems   system structuresOperating systems   system structures
Operating systems system structures
Mukesh Chinta1.9K visualizações
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION por sathish sak
OPERATING SYSTEMSDESIGN AND IMPLEMENTATIONOPERATING SYSTEMSDESIGN AND IMPLEMENTATION
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
sathish sak4.5K visualizações
Operatingsystems por kuldeepy60
Operatingsystems Operatingsystems
Operatingsystems
kuldeepy60861 visualizações
Case study windows por Padam Banthia
Case study windowsCase study windows
Case study windows
Padam Banthia15.3K visualizações
Operating system structures por Mohd Arif
Operating system structuresOperating system structures
Operating system structures
Mohd Arif6.2K visualizações
system calls, single user, multiuser os ... por myrajendra
system calls, single user, multiuser os                                      ...system calls, single user, multiuser os                                      ...
system calls, single user, multiuser os ...
myrajendra3.5K visualizações
Structure of operating system por Rafi Dar
Structure of operating systemStructure of operating system
Structure of operating system
Rafi Dar5.2K visualizações
Chapter 2 - Operating System Structures por Wayne Jones Jnr
Chapter 2 - Operating System StructuresChapter 2 - Operating System Structures
Chapter 2 - Operating System Structures
Wayne Jones Jnr51.1K visualizações
operating system structure por Waseem Ud Din Farooqui
operating system structureoperating system structure
operating system structure
Waseem Ud Din Farooqui49.2K visualizações
Operating System por Momina Idrees
Operating SystemOperating System
Operating System
Momina Idrees161 visualizações
Modern Operating System Windows Server 2008 por Sneha Chopra
Modern Operating System  Windows Server 2008Modern Operating System  Windows Server 2008
Modern Operating System Windows Server 2008
Sneha Chopra897 visualizações
Windows Architecture Explained by Stacksol por Stacksol
Windows Architecture Explained by StacksolWindows Architecture Explained by Stacksol
Windows Architecture Explained by Stacksol
Stacksol36.9K visualizações
Operating system components por Syed Zaid Irshad
Operating system componentsOperating system components
Operating system components
Syed Zaid Irshad4.3K visualizações
2 operating system structures por Dr. Loganathan R
2 operating system structures2 operating system structures
2 operating system structures
Dr. Loganathan R12K visualizações

Similar a Ch2 system structure

Chapter 1- Introduction.ppt por
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.pptmiki304759
7 visualizações27 slides
OSCh3 por
OSCh3OSCh3
OSCh3Joe Christensen
1.6K visualizações39 slides
Ch3 por
Ch3Ch3
Ch3Lokesh Kannaiyan
588 visualizações35 slides
Section02-Structures.ppt por
Section02-Structures.pptSection02-Structures.ppt
Section02-Structures.pptJamelPandiin2
2 visualizações21 slides
operating system structure por
operating system structureoperating system structure
operating system structureHAMZA AHMED
370 visualizações42 slides
Operating System 2 por
Operating System 2Operating System 2
Operating System 2tech2click
12K visualizações51 slides

Similar a Ch2 system structure(20)

Chapter 1- Introduction.ppt por miki304759
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.ppt
miki3047597 visualizações
OSCh3 por Joe Christensen
OSCh3OSCh3
OSCh3
Joe Christensen1.6K visualizações
Section02-Structures.ppt por JamelPandiin2
Section02-Structures.pptSection02-Structures.ppt
Section02-Structures.ppt
JamelPandiin22 visualizações
operating system structure por HAMZA AHMED
operating system structureoperating system structure
operating system structure
HAMZA AHMED370 visualizações
Operating System 2 por tech2click
Operating System 2Operating System 2
Operating System 2
tech2click12K visualizações
16. Computer Systems Basic Software 2 por New Era University
16. Computer Systems   Basic Software 216. Computer Systems   Basic Software 2
16. Computer Systems Basic Software 2
New Era University1.7K visualizações
Csc 2313 (lecture 2) por umardanjumamaiwada
Csc 2313 (lecture 2)Csc 2313 (lecture 2)
Csc 2313 (lecture 2)
umardanjumamaiwada52 visualizações
Csc 2313 (lecture 2) por umardanjumamaiwada
Csc 2313 (lecture 2)Csc 2313 (lecture 2)
Csc 2313 (lecture 2)
umardanjumamaiwada92 visualizações
MELJUN CORTES operating_system_structure por MELJUN CORTES
MELJUN CORTES operating_system_structureMELJUN CORTES operating_system_structure
MELJUN CORTES operating_system_structure
MELJUN CORTES184 visualizações
Chapter02 new por vmummaneni
Chapter02 newChapter02 new
Chapter02 new
vmummaneni4.6K visualizações
Operating systems por Chinmay Raul
Operating systemsOperating systems
Operating systems
Chinmay Raul2K visualizações
OS por Ramasubbu .P
OSOS
OS
Ramasubbu .P3.1K visualizações
Ch2 por rupalidhir
Ch2Ch2
Ch2
rupalidhir678 visualizações
installing and optimizing operating system software por Jaleto Sunkemo
installing and optimizing operating system software   installing and optimizing operating system software
installing and optimizing operating system software
Jaleto Sunkemo553 visualizações
ch3 - operating system structures.ppt por divyang32
ch3 - operating system structures.pptch3 - operating system structures.ppt
ch3 - operating system structures.ppt
divyang326 visualizações
Introduction To operating System: por Munazza-Mah-Jabeen
Introduction To operating System:Introduction To operating System:
Introduction To operating System:
Munazza-Mah-Jabeen193 visualizações

Mais de Ankit Dubey

Unit 1 android and it's tools quiz {mad cwipedia} por
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
173 visualizações7 slides
Scheduling por
Scheduling Scheduling
Scheduling Ankit Dubey
41 visualizações6 slides
Chapter 4 por
Chapter 4Chapter 4
Chapter 4Ankit Dubey
62 visualizações12 slides
Chapter 3 por
Chapter 3Chapter 3
Chapter 3Ankit Dubey
62 visualizações12 slides
Chapter 2 por
Chapter 2Chapter 2
Chapter 2Ankit Dubey
60 visualizações22 slides
Chapter 1 por
Chapter 1Chapter 1
Chapter 1Ankit Dubey
77 visualizações20 slides

Mais de Ankit Dubey(20)

Unit 1 android and it's tools quiz {mad cwipedia} por 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}
Ankit Dubey173 visualizações
Scheduling por Ankit Dubey
Scheduling Scheduling
Scheduling
Ankit Dubey41 visualizações
Chapter 4 por Ankit Dubey
Chapter 4Chapter 4
Chapter 4
Ankit Dubey62 visualizações
Chapter 3 por Ankit Dubey
Chapter 3Chapter 3
Chapter 3
Ankit Dubey62 visualizações
Chapter 2 por Ankit Dubey
Chapter 2Chapter 2
Chapter 2
Ankit Dubey60 visualizações
Chapter 1 por Ankit Dubey
Chapter 1Chapter 1
Chapter 1
Ankit Dubey77 visualizações
Chapter 5 por Ankit Dubey
Chapter 5Chapter 5
Chapter 5
Ankit Dubey43 visualizações
Ch5 cpu-scheduling por Ankit Dubey
Ch5 cpu-schedulingCh5 cpu-scheduling
Ch5 cpu-scheduling
Ankit Dubey51 visualizações
Ch4 threads por Ankit Dubey
Ch4 threadsCh4 threads
Ch4 threads
Ankit Dubey59 visualizações
Ch3 processes por Ankit Dubey
Ch3 processesCh3 processes
Ch3 processes
Ankit Dubey32 visualizações
Ch1 introduction-to-os por Ankit Dubey
Ch1 introduction-to-osCh1 introduction-to-os
Ch1 introduction-to-os
Ankit Dubey8 visualizações
Android i por Ankit Dubey
Android iAndroid i
Android i
Ankit Dubey23 visualizações
Mongodb mock test_ii por Ankit Dubey
Mongodb mock test_iiMongodb mock test_ii
Mongodb mock test_ii
Ankit Dubey468 visualizações
Android mock test_iii por Ankit Dubey
Android mock test_iiiAndroid mock test_iii
Android mock test_iii
Ankit Dubey23 visualizações
Android mock test_ii por Ankit Dubey
Android mock test_iiAndroid mock test_ii
Android mock test_ii
Ankit Dubey17 visualizações
Ajp notes-chapter-06 por Ankit Dubey
Ajp notes-chapter-06Ajp notes-chapter-06
Ajp notes-chapter-06
Ankit Dubey76 visualizações
Ajp notes-chapter-05 por Ankit Dubey
Ajp notes-chapter-05Ajp notes-chapter-05
Ajp notes-chapter-05
Ankit Dubey37 visualizações
Ajp notes-chapter-04 por Ankit Dubey
Ajp notes-chapter-04Ajp notes-chapter-04
Ajp notes-chapter-04
Ankit Dubey75 visualizações
Ajp notes-chapter-03 por Ankit Dubey
Ajp notes-chapter-03Ajp notes-chapter-03
Ajp notes-chapter-03
Ankit Dubey30 visualizações
Ajp notes-chapter-02 por Ankit Dubey
Ajp notes-chapter-02Ajp notes-chapter-02
Ajp notes-chapter-02
Ankit Dubey20 visualizações

Último

Machine learning in drug supply chain management during disease outbreaks: a ... por
Machine learning in drug supply chain management during disease outbreaks: a ...Machine learning in drug supply chain management during disease outbreaks: a ...
Machine learning in drug supply chain management during disease outbreaks: a ...IJECEIAES
10 visualizações17 slides
MSA Website Slideshow (16).pdf por
MSA Website Slideshow (16).pdfMSA Website Slideshow (16).pdf
MSA Website Slideshow (16).pdfmsaucla
58 visualizações8 slides
Wire Rope por
Wire RopeWire Rope
Wire RopeIwiss Tools Co.,Ltd
9 visualizações5 slides
_MAKRIADI-FOTEINI_diploma thesis.pptx por
_MAKRIADI-FOTEINI_diploma thesis.pptx_MAKRIADI-FOTEINI_diploma thesis.pptx
_MAKRIADI-FOTEINI_diploma thesis.pptxfotinimakriadi
7 visualizações32 slides
Investor Presentation por
Investor PresentationInvestor Presentation
Investor Presentationeser sevinç
23 visualizações26 slides
Effect of deep chemical mixing columns on properties of surrounding soft clay... por
Effect of deep chemical mixing columns on properties of surrounding soft clay...Effect of deep chemical mixing columns on properties of surrounding soft clay...
Effect of deep chemical mixing columns on properties of surrounding soft clay...AltinKaradagli
6 visualizações10 slides

Último(20)

Machine learning in drug supply chain management during disease outbreaks: a ... por IJECEIAES
Machine learning in drug supply chain management during disease outbreaks: a ...Machine learning in drug supply chain management during disease outbreaks: a ...
Machine learning in drug supply chain management during disease outbreaks: a ...
IJECEIAES10 visualizações
MSA Website Slideshow (16).pdf por msaucla
MSA Website Slideshow (16).pdfMSA Website Slideshow (16).pdf
MSA Website Slideshow (16).pdf
msaucla58 visualizações
_MAKRIADI-FOTEINI_diploma thesis.pptx por fotinimakriadi
_MAKRIADI-FOTEINI_diploma thesis.pptx_MAKRIADI-FOTEINI_diploma thesis.pptx
_MAKRIADI-FOTEINI_diploma thesis.pptx
fotinimakriadi7 visualizações
Investor Presentation por eser sevinç
Investor PresentationInvestor Presentation
Investor Presentation
eser sevinç23 visualizações
Effect of deep chemical mixing columns on properties of surrounding soft clay... por AltinKaradagli
Effect of deep chemical mixing columns on properties of surrounding soft clay...Effect of deep chemical mixing columns on properties of surrounding soft clay...
Effect of deep chemical mixing columns on properties of surrounding soft clay...
AltinKaradagli6 visualizações
Saikat Chakraborty Java Oracle Certificate.pdf por SaikatChakraborty787148
Saikat Chakraborty Java Oracle Certificate.pdfSaikat Chakraborty Java Oracle Certificate.pdf
Saikat Chakraborty Java Oracle Certificate.pdf
SaikatChakraborty78714815 visualizações
SNMPx por Amatullahbutt
SNMPxSNMPx
SNMPx
Amatullahbutt15 visualizações
NEW SUPPLIERS SUPPLIES (copie).pdf por georgesradjou
NEW SUPPLIERS SUPPLIES (copie).pdfNEW SUPPLIERS SUPPLIES (copie).pdf
NEW SUPPLIERS SUPPLIES (copie).pdf
georgesradjou14 visualizações
How I learned to stop worrying and love the dark silicon apocalypse.pdf por Tomasz Kowalczewski
How I learned to stop worrying and love the dark silicon apocalypse.pdfHow I learned to stop worrying and love the dark silicon apocalypse.pdf
How I learned to stop worrying and love the dark silicon apocalypse.pdf
Tomasz Kowalczewski26 visualizações
Design of machine elements-UNIT 3.pptx por gopinathcreddy
Design of machine elements-UNIT 3.pptxDesign of machine elements-UNIT 3.pptx
Design of machine elements-UNIT 3.pptx
gopinathcreddy29 visualizações
Digital Watermarking Of Audio Signals.pptx por AyushJaiswal781174
Digital Watermarking Of Audio Signals.pptxDigital Watermarking Of Audio Signals.pptx
Digital Watermarking Of Audio Signals.pptx
AyushJaiswal7811748 visualizações
SWM L15-L28_drhasan (Part 2).pdf por MahmudHasan747870
SWM L15-L28_drhasan (Part 2).pdfSWM L15-L28_drhasan (Part 2).pdf
SWM L15-L28_drhasan (Part 2).pdf
MahmudHasan74787028 visualizações
A multi-microcontroller-based hardware for deploying Tiny machine learning mo... por IJECEIAES
A multi-microcontroller-based hardware for deploying Tiny machine learning mo...A multi-microcontroller-based hardware for deploying Tiny machine learning mo...
A multi-microcontroller-based hardware for deploying Tiny machine learning mo...
IJECEIAES13 visualizações
CHEMICAL KINETICS.pdf por AguedaGutirrez
CHEMICAL KINETICS.pdfCHEMICAL KINETICS.pdf
CHEMICAL KINETICS.pdf
AguedaGutirrez8 visualizações
STUDY OF SMART MATERIALS USED IN CONSTRUCTION-1.pptx por AnnieRachelJohn
STUDY OF SMART MATERIALS USED IN CONSTRUCTION-1.pptxSTUDY OF SMART MATERIALS USED IN CONSTRUCTION-1.pptx
STUDY OF SMART MATERIALS USED IN CONSTRUCTION-1.pptx
AnnieRachelJohn33 visualizações

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)