operating systems hybrid notes for computerscience.pdf
rayanrajab1
32 views
103 slides
Sep 22, 2024
Slide 1 of 103
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
About This Presentation
Operating systems notes for Computer Science
Size: 7.97 MB
Language: en
Added: Sep 22, 2024
Slides: 103 pages
Slide Content
2010-2011
Lecture Notes on Operating Systems
Lecture 1: Introduction to Operating Systems
•Anoperatingsystemisaprogramthatactsasan
intermediarybetweenauserofacomputerandthe
computerhardware.
•Thepurposeofanoperatingsystemistoprovidean
environmentinwhichausercanexecuteprograms.
Theprimarygoalofanoperatingsystemisthusto
makethecomputersystemconvenienttouse.
•Asecondarygoalistousethecomputerhardwarein
anefficientmanner.
Lecture 1: Introduction to Operating Systems
•Inbrief,anoperatingsystemisthesetofprograms
thatcontrolsacomputer.Someexamplesof
operatingsystemsareUNIX,Mach,MS-DOS,MS-
Windows,Windows/NT,OS/2andMacOS.
•Anoperatingsystemisanimportantpartofalmost
everycomputersystem.
•Acomputersystemcanbedividedroughlyintofour
components:thehardware,theoperatingsystem,
theapplicationprogramsandtheusers(Figure1.1).
Objectives of Operating Systems
•Tohidedetailsofhardwarebycreatingabstraction.
•Toallocateresourcestoprocesses(Manage
resources).
•Provideapleasantandeffectiveuserinterface.
History of Operating Systems
•The1940's-FirstGenerations
Theearliestelectronicdigitalcomputershadnooperatingsystems.
Machinesofthetimeweresoprimitivethatprogramswereoftenentered
onebitattimeonrowsofmechanicalswitches(plugboards).
Programminglanguageswereunknown(notevenassemblylanguages).
Operatingsystemswereunheardof.
•The1950's-SecondGeneration
Bytheearly1950's,theroutinehadimprovedsomewhatwiththe
introductionofpunchcards.TheGeneralMotorsResearchLaboratories
implementedthefirstoperatingsystemsinearly1950'sfortheirIBM701.
Thesystemofthe50'sgenerallyranonejobatatime.
•The1960's-ThirdGeneration
Thesystemsofthe1960'swerealsobatchprocessingsystems,butthey
wereabletotakebetteradvantageofthecomputer'sresourcesbyrunning
severaljobsatonce.
•FourthGeneration
WiththedevelopmentofLSI(LargeScaleIntegration)circuits,chips,
operatingsystementeredinthepersonalcomputerandtheworkstation
age.Microprocessortechnologyevolvedtothepointthatitbecomes
possibletobuilddesktopcomputersaspowerfulasthemainframesofthe
1970s.
History of Operating Systems
Lecture 2: Operating Systems Structure
•SystemComponents
•OperatingSystemsServices
•SystemCallsandSystemPrograms
System Components
•File Management
Afileisacollectedofrelatedinformationdefinedbyits
creator.Computercanstorefilesonthedisk(secondary
storage),whichprovidelongtermstorage.
•The creation and deletion of files.
•The creation and deletion of directions.
•The support of primitives for manipulating files and directions.
•The mapping of files onto secondary storage.
•The backup of files on stable storage media.
System Components
•I/OSystemManagement
Oneofthepurposesofanoperatingsystemistohidethe
peculiaritiesofspecifichardwaredevicesfromtheuser.
•Secondary-StorageManagement
Generallyspeaking,systemshaveseverallevelsof
storage,includingprimarystorage,secondarystorageand
cachestorage.Instructionsanddatamustbeplacedinprimary
storageorcachetobereferencedbyarunningprogram.
System Calls and System Programs
•Systemcallsprovidetheinterfacebetweenaprocessandthe
operatingsystem.Thesecallsaregenerallyavailableas
assembly-languageinstructions,andareusuallylistedinthe
manualsusedbyassembly-languageprogrammers.
•ProcessControlBlock
•Eachprocessisrepresentedintheoperatingsystembya
processcontrolblockPCS)—alsocalledataskcontrolblock.
Process state
process number
program counter
Registers
memory limits
list of open files
.
.
Figure : Process control block.
Resources
•A process must request a resource before using it, and must
release the resource after using it.
•A process may request as many resources as it requires to
carry out its designated task.
•a process may utilize a resource in only the following
sequence:
Use
Release
Request
Deadlock Avoidance
•Requires that the system has some additional a priori
information available.
Simplestandmostusefulmodelrequiresthateachprocessdeclare
themaximumnumberofresourcesofeachtypethatitmayneed.
Thedeadlock-avoidancealgorithmdynamicallyexaminesthe
resource-allocationstatetoensurethattherecanneverbea
circular-waitcondition.
Resource-allocationstateisdefinedbythenumberofavailableand
allocatedresources,andthemaximumdemandsoftheprocesses.