Download - 4_OS Structure..ppt
-
8/14/2019 4_OS Structure..ppt
1/31
Operating-System Structures
1. Operating-System System Components
2. Operating System Services
3. System Calls4. System Structure
5. Virtual Machines
6. System Design and Implementation
7. System Generation
-
8/14/2019 4_OS Structure..ppt
2/31
1.Operating System Components
Process Management
Main Memory Management
File Management
I/O System Management Secondary Management
Networking
Protection System
Command-Interpreter System
-
8/14/2019 4_OS Structure..ppt
3/31
1. Process Management
Aprocessis a program in execution
A process needs certain resources,including CPU time, memory, files, andI/O devices, to accomplish its task
The operating system is responsible for the
following activities in connection withprocess management
Process creation and deletion
Process suspension and resumption
Provision of mechanisms for:
process synchronization
process communication
-
8/14/2019 4_OS Structure..ppt
4/31
Memoryis a large array of words or bytes, each with
its own address It is responsible for quickly accessible data
shared by the CPU and I/O devices
Main memoryis a volatile storage device. It loses its
contents in the case of system failure The operating system is responsible for the following
activities in connections with memory management
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
2. Main-Memory Management
-
8/14/2019 4_OS Structure..ppt
5/31
A fileis a collection of related information defined
by its creator Commonly, files represent programs and data
The operating system is responsible for thefollowing 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) storagemedia
3. File Management
-
8/14/2019 4_OS Structure..ppt
6/31
4. I/O System Management
The I/O system consists of:
A buffer-caching system
A general device-driver interface
Drivers for specific hardware devices
-
8/14/2019 4_OS Structure..ppt
7/31
Since main memory (primary storage) is volatile
and too small to accommodate all data andprograms permanently, the computer systemmust provide secondary storageto back up mainmemory
The operating system is responsible for the
following activities in connection with diskmanagement:
Free space management
Storage allocation
Disk scheduling
5. Secondary-Storage Management
-
8/14/2019 4_OS Structure..ppt
8/31
6. Networking (Distributed Systems)
A distributedsystem is a collection processorsthat do not share memory or a clock
Each processor has its own local memory
The processors in the system are connected
through a communication network Communication takes place using aprotocol
A distributed system provides user access tovarious system resources
Access to a shared resource allows: Computation speed-up
Increased data availability
Enhanced reliability
-
8/14/2019 4_OS Structure..ppt
9/31
7. Protection System
Protectionrefers to a mechanism for controllingaccess by programs, processes, or users to bothsystem and user resources
The protection mechanism must:
distinguish between authorizedandunauthorizedusage
specify the controls to be imposed
provide a means of enforcement
-
8/14/2019 4_OS Structure..ppt
10/31
8. Command-Interpreter System
Many commands are given to the operatingsystem by control statements which deal with:
Process creation and management
I/O handling Secondary-storage management
Main-memory management
File-system access
Protection Networking
-
8/14/2019 4_OS Structure..ppt
11/31
1. Program execution System capability toload a program into memory and to run it
2.
I/O operations Since user programscannot execute I/O operations directly,the operating system must provide somemeans to perform I/O
3. File-system manipulation Programcapability to read, write, create, anddelete files
3.System Calls
Operating System Services
-
8/14/2019 4_OS Structure..ppt
12/31
4. Communications Exchange of
information between processes executingeither on the same computer or ondifferent systems tied together by anetwork. Implemented via shared
memory or message passing
5. Error detection Ensure correctcomputing by detecting errors in the CPU
and memory hardware, in I/O devices, orin user programs
-
8/14/2019 4_OS Structure..ppt
13/31
-
8/14/2019 4_OS Structure..ppt
14/31
-
8/14/2019 4_OS Structure..ppt
15/31
Three general methods are used topassparametersbetween a running programand the operating system
Passparametersin registers Store the parameters in a table inmemory, and the table addressispassed as a parameter in a register
Push(store) the parameters onto thestackby the program, andpopoff thestack by operating system
-
8/14/2019 4_OS Structure..ppt
16/31
Passing of Parameters As A Table
-
8/14/2019 4_OS Structure..ppt
17/31
Types of System Calls
Process control
File management
Device management
Information maintenance Communications
-
8/14/2019 4_OS Structure..ppt
18/31
Communication Models
Message PassingShared Memory
Communication may take place using either
message passing or shared memory
-
8/14/2019 4_OS Structure..ppt
19/31
4. MS-DOS System Structure
MS-DOS written to provide the mostfunctionality in the least space
Not divided into modules
Although MS-DOS has some structure, itsinterfaces and levels of functionality are notwell separated
-
8/14/2019 4_OS Structure..ppt
20/31
MS-DOS Layer Structure
-
8/14/2019 4_OS Structure..ppt
21/31
Layered Approach
The operating system is divided into a number oflayers (levels), each built on top of lower layers.The bottom layer (layer 0), is the hardware; thehighest (layer N) is the user interface.
With modularity, layers are selected such thateach uses functions (operations) and services ofonly lower-level layers
-
8/14/2019 4_OS Structure..ppt
22/31
-
8/14/2019 4_OS Structure..ppt
23/31
Microkernel System Structure
Moves as much from the kernel into user space Communication takes place between user
modules using message passing
Benefits:
Easier to extend a microkernel
Easier to port the operating system to newarchitectures
More reliable (less code is running in kernel
mode)
More secure
-
8/14/2019 4_OS Structure..ppt
24/31
Windows NT Client-Server Structure
-
8/14/2019 4_OS Structure..ppt
25/31
5.Virtual Machines
A virtual machinetakes the layered approach toits logical conclusion. It treats hardware and theoperating system kernel as though they were allhardware
A virtual machine provides an interface identicalto the underlying bare hardware
The operating system creates the illusion ofmultiple processes, each executing on its own
processor with its own (virtual) memory
-
8/14/2019 4_OS Structure..ppt
26/31
Virtual Machines (Cont.)
The resources of the physical computer areshared to create the virtual machines
CPU scheduling can create the appearance thatusers have their own processor
Spooling and a file system can provide virtualcard readers and virtual line printers
A normal user time-sharing terminal serves asthe virtual machine operators console
-
8/14/2019 4_OS Structure..ppt
27/31
System Models
Non-virtual Machine Virtual Machine
-
8/14/2019 4_OS Structure..ppt
28/31
Advantages/Disadvantages of Virtual Machines
The virtual-machine concept provides completeprotection of system resources since each virtualmachine is isolated from all other virtualmachines. This isolation, however, permits no
direct sharing of resources. A virtual-machine system is a perfect vehicle for
operating-systems research and development.System development is done on the virtualmachine, instead of on a physical machine and sodoes not disrupt normal system operation.
The virtual machine concept is difficult toimplement due to the effort required to provide anexactduplicate to the underlying machine
-
8/14/2019 4_OS Structure..ppt
29/31
System Design Goals
User goals operating system should beconvenient to use, easy to learn, reliable, safe,
and fast System goals operating system should be easy
to design, implement, and maintain, as well asflexible, reliable, error-free, and efficient
-
8/14/2019 4_OS Structure..ppt
30/31
System Generation (SYSGEN)
Operating systems are designed to run on any ofa class of machines; the system must beconfigured for each specific computer site
SYSGEN program obtains information concerning
the specific configuration of the hardware system Bootingstarting a computer by loading the
kernel
Bootstrap programcode stored in ROM that is
able to locate the kernel, load it into memory,and start its execution
-
8/14/2019 4_OS Structure..ppt
31/31
THANKS