View
219
Download
0
Category
Preview:
Citation preview
8/9/2019 L02-OS
1/81
OperatingSystem Overview
Dr. Muhammed J. Al-Muhammed
Operating
Systems:Internals
and
DesignPrinciples
1Operating System
8/9/2019 L02-OS
2/81
Operating System A program that controls the execution of
application programs
An interface between applications andhardware
Main obectives of an OS!
"onvenience #$ciency Ability to evolve
%Operating System
8/9/2019 L02-OS
3/81
and Software
Infrastructure
&Operating System
8/9/2019 L02-OS
4/81
Operating SystemServices
'rogram development! dierent servicessuch editors and debuggers to help programmers increating their programs
'rogram execution! loading data andinstructions to memory, initialization of IO devices,scheduling
Access ()O devices! niform interface, hidesdetails so the programmer can access these devicesusing simple read!write"
"ontrolled access to *les! #uthorization,sharing, caching"+
Operating System
8/9/2019 L02-OS
5/81
Operating SystemServices
System access ,for shared or publicsystems! $rotection, authorization, resolvecon%icts
#rror detection and response! ardware errors! memory error or device failure Software errors! arithmetic errors/ access
forbidden memory locations/ allocation errors
Accounting collect statistics ,billing monitor performance
used to anticipate future enhancementsOperating systems are among the most comple&0Operating System
8/9/2019 L02-OS
6/81
'ey Interfaces
(nstruction set architecture ,(SA! isthe interface between hardware and the software"
(wo interfaces) user IS# *small+ and OS IS#*larger+
Application binary interface ,A1(!maes program portability possible"
Application programming interface,A'(! (he #$I gives a program access to thehardware resources and services available in a
system through the user IS# supplemented withhi h-level lan ua e *H..+ librar calls" sin an
2Operating System
8/9/2019 L02-OS
7/81
(he /ole of an OS
A computer is a set of resources
for the movement/ storage/ andprocessing of data
3he OS is responsible for
managing these resources
4Operating System
8/9/2019 L02-OS
8/81
Operating System
as Software3he operating system control
mechanism is unusual in two way
5unctions in the same way as ordinary computersoftware , provides instructions for the processor.owever/ the OS directs the processor to useresources and timing the execution of otherprograms.
5re6uently relin6uishes control and must dependon the processor to allow it to regain control
7Operating System
8/9/2019 L02-OS
9/81
OperatingSystem
as8esourceManager
9Operating System
8/9/2019 L02-OS
10/81
0volution of
Operating SystemsA maor OS will evolve over time
for a number of reasons!ardwareupgrades
:ew types of
hardware:ewservices
5ixes
;indows D$ released in %
8/9/2019 L02-OS
62/81
indowsArchitecture
2%
Operating System
"omponents of
8/9/2019 L02-OS
63/81
"omponents of
indows #xecutive
contains the core OS services
Bernel controls execution of the processors
ardware Abstraction Iayer ,AI maps between generic hardware commands and responses and
those uni6ue to a speci*c platform
Device Drivers dynamic libraries that extend the functionality of the #xecutive
indowing and Hraphics System implements the H( functions
2&
Operating System
8/9/2019 L02-OS
64/81
ser-Mode 'rocesses
5our basic types are supported byindows!
2+
Operating System
8/9/2019 L02-OS
65/81
Client!Server 6odelindows OS services/
environmentalsubsystems/ andapplications are allstructured using theclient)server model
"ommon in distributed
systems/ but can beused internal to a singlesystem
'rocesses communicatevia 8'"
#dvantages
it simpli*es the #xecutive
it improves reliability it provides a uniform
means for applications tocommunicate withservices via 8'"s without
restricting @exibility it provides a suitable
base for distributedcomputing
20
Operating System
8/9/2019 L02-OS
66/81
(hreads and S6$ 3wo important characteristics of indows are its
support for threads and for symmetric
multiprocessing ,SM' OS routines can run on any available processor/ and diEerentroutines can execute simultaneously on diEerent processors
indows supports the use of multiple threads of executionwithin a single process. Multiple threads within the sameprocess may execute on diEerent processors simultaneously
Server processes may use multiple threads to process re6uestsfrom more than one client simultaneously
indows provides mechanisms for sharing data and resourcesbetween processes and @exible interprocess communication
capabilities
22
Operating System
8/9/2019 L02-OS
67/81
>indows Ob
8/9/2019 L02-OS
68/81
WindowsKernel
27
Operating System
8/9/2019 L02-OS
69/81
>indows E
"hanges and improvements! 0ngineering improvements
the system is now built in layers which can be separately tested
$erformance improvements amount of memory re6uired has been reduced
/eliability improvements
user-mode heap is more tolerant of memory allocation errors by")" programmers
0nergy eGciency
many improvements have been made Security
1itIoc>er is now easier to set up and use
(hread improvements
can support hundreds of "'s
Dynamic 5air Share Scheduling ,D5SS29
Operating System
(raditional 2ID
8/9/2019 L02-OS
70/81
(raditional 2IDSystems
ere developed at 1ell Iabs and became operational on a 'D'-4 in ;94ages
ighly modular and easily con*gured
4+
Operating System
6odular
8/9/2019 L02-OS
75/81
6odular
6onolithic 'ernel (ncludes virtually all of the
OS functionality in onelarge bloc> of code that
runs as a single processwith a single address space
All the functionalcomponents of the >ernelhave access to all of its
internal data structuresand routines
Iinux is structured as acollection of modules
.oadable 6odules
8elatively independent bloc>s
A module is an obect *le whosecode can be lin>ed to andunlin>ed from the >ernel atruntime
A module is executed in >ernelmode on behalf of the currentprocess
ave two importantcharacteristics!
Dynamic lin>ing
Stac>able modules40
Operating System
8/9/2019 L02-OS
76/81
.inu&
'ernel
6odul
es
42
Operating System
8/9/2019 L02-OS
77/81
.inu& 'ernel Components
44
Operating System
8/9/2019 L02-OS
78/81
.inu& 7server 7irtual
8/9/2019 L02-OS
79/81
.inu& 7server 7irtual
6achine #rchitecture Open-source/ fast/
lightweight approach toimplementing virtual
machines on a Iinuxserver
Only a single copy of theIinux >ernel is involved
Supports a number ofseparate virtual servers #ach virtual server is
isolated from the others &nvolves four elements"49
Operating System
nu& server
8/9/2019 L02-OS
80/81
#rchitecture
7
Recommended