Introduction to Operating System Part-1 by Dr. K. Adisesha
Size: 2.38 MB
Language: en
Added: Jul 18, 2023
Slides: 41 pages
Slide Content
Introduction
to
Operating Systems -1
PROF. K. ADISESHA
Introduction
to
Operating System
OS Concepts
Functions of OS
Applications of OS
Types of OS
Properties of OS
2
Operating System
Introduction
Prof. K. Adisesha (Ph. D)
3
Operating System:
Anoperatingsystemisaprogramthatactsasaninterfacebetweentheuserandthe
computerhardwareandcontrolstheexecutionofallkindsofprograms.
➢SomepopularOperatingSystemsincludeLinuxOperatingSystem,Windows
OperatingSystem,VMS,OS/400,AIX,z/OS,etc.
Introduction
Prof. K. Adisesha (Ph. D)
4
Operating System:
AnOperatingSystem(OS)isaninterfacebetweenacomputeruserandcomputer
hardware..
➢Anoperatingsystemisasoftwarewhichperformsallthebasictaskslike:
❖Filemanagement
❖Memorymanagement
❖Processmanagement
❖Handlinginputandoutput
❖Controllingperipheraldevicessuch
asdiskdrivesandprinters.
Introduction
Prof. K. Adisesha (Ph. D)
5
Operating System:
Operating System
Prof. K. Adisesha (Ph. D)
6
Functions of Operating system :
Theoperatingsystemisavitalcomponentofthesystemsoftwareinacomputersystem..
➢FollowingaresomeofimportantfunctionsofanoperatingSystem.
❖ProcessorManagement
❖MemoryManagement
❖DeviceManagement
❖FileManagement
❖Security
❖Controloversystemperformance
❖Jobaccounting
❖Errordetectingaids
❖Coordinationbetweenothersoftwareandusers
Operating System
Prof. K. Adisesha (Ph. D)
7
Processor Management:
Inmultiprogrammingenvironment,theOSdecideswhichprocessgetstheprocessor
whenandforhowmuchtime,thisfunctioniscalledprocessscheduling.
➢AnOperatingSystemdoesthefollowingactivitiesforprocessormanagement:.
❖Keepstracksofprocessorandstatusofprocess.
❖Theprogramresponsibleforthistaskisknownastrafficcontroller.
❖Allocatestheprocessor(CPU)toaprocess.
❖De-allocatesprocessorwhenaprocessisnolongerrequired.
Operating System
Prof. K. Adisesha (Ph. D)
8
Memory Management:
MemorymanagementreferstomanagementofPrimaryMemoryorMainMemory.
Mainmemoryisalargearrayofwordsorbyteswhereeachwordorbytehasitsown
address.
➢AnOperatingSystemdoesthefollowingactivitiesformemorymanagement:
❖Keepstracksofprimarymemory,i.e.,whatpartofitareinusebywhom,whatpart
arenotinuse.
❖Inmultiprogramming,theOSdecideswhichprocesswillgetmemorywhenand
howmuch.
❖Allocatesthememorywhenaprocessrequestsittodoso.
❖De-allocatesthememorywhenaprocessnolongerneedsitorhasbeen
terminated.
Operating System
Prof. K. Adisesha (Ph. D)
9
Device Management:
AnOperatingSystemmanagesdevicecommunicationviatheirrespectivedrivers.
➢AnOperatingSystemdoesthefollowingactivitiesfordevicemanagement:
❖Keepstracksofalldevices.ProgramresponsibleforthistaskisknownastheI/O
controller.
❖Decideswhichprocessgetsthedevicewhenandforhowmuchtime.
❖Allocatesthedeviceintheefficientway.
❖De-allocatesdevices.
Operating System
Prof. K. Adisesha (Ph. D)
10
File Management:
Afilesystemisnormallyorganizedintodirectoriesforeasynavigationandusage.
Thesedirectoriesmaycontainfilesandotherdirections.
➢AnOperatingSystemdoesthefollowingactivitiesforfilemanagement:
❖Keepstrackofinformation,location,uses,statusetc.Thecollectivefacilitiesare
oftenknownasfilesystem.
❖Accesstothefileforreadandwrite.
❖AllocatesthefileforI/Odevices.
❖De-allocatesthefileformstoragedevices
Operating System
Prof. K. Adisesha (Ph. D)
11
Applications of Operating System:
FollowingaresomeoftheimportantactivitiesthatanOperatingSystemperforms.
➢Security:Bymeansofpasswordandsimilarothertechniques,itpreventsunauthorized
accesstoprogramsanddata.
➢Controloversystemperformance:Recordingdelaysbetweenrequestforaservice
andresponsefromthesystem.
➢Jobaccounting:Keepingtrackoftimeandresourcesusedbyvariousjobsandusers.
➢Errordetectingaids:Productionofdumps,traces,errormessages,andother
debugginganderrordetectingaids.
➢Coordinationbetweenothersoftwareandusers:Coordinationandassignmentof
compilers,interpreters,assemblersandothersoftwaretothevarioususersofthe
computersystems.
Operating System Types
Prof. K. Adisesha (Ph. D)
12
Types of Operating System:
Operatingsystemsaretherefromtheveryfirstcomputergenerationandtheykeep
evolvingwithtime.
➢Varioustypesofoperatingsystemswhicharemostcommonlyusedare:
❖Batchoperatingsystem
❖Time-sharingoperatingsystems
❖DistributedoperatingSystem.
❖NetworkoperatingSystem
❖RealTimeoperatingSystem
Operating System Types
Prof. K. Adisesha (Ph. D)
13
Batch operating system:
Abatchoperatingsystemgrabsallprogramsanddatainthebatchformandthen
processesthem.
➢Eachuserprepareshisjobonanoff-linedevicelikepunchcardsandsubmitsittothe
computeroperator.
➢Tospeedupprocessing,jobswithsimilarneedsarebatchedtogetherandrunasagroup.
➢TheproblemswithBatchSystemsareasfollows−
❖Lackofinteractionbetweentheuserandthejob.
❖CPUisoftenidle,becausethespeedofthemechanicalI/Odevicesisslowerthanthe
CPU.
❖Difficulttoprovidethedesiredpriority.
Operating System Types
Prof. K. Adisesha (Ph. D)
14
Batch operating system:
Theusersofabatchoperatingsystemdonotinteractwiththecomputerdirectly.
➢Themainaimofusingabatchprocessingsystemistodecreasethesetuptimewhile
submittingsimilarjobstotheCPU.
➢Batchprocessingtechniqueswereimplementedintheharddiskandcardreadersaswell..
➢ExamplesofBatchSystemsareasfollows−
❖PayrollSystem
❖BankInvoiceSystem
❖TransactionsProcess
❖DailyReport
❖ResearchSegment
❖BillingSystem
Operating System Types
Prof. K. Adisesha (Ph. D)
15
Time-sharing operating systems:
Time-sharingisatechniquewhichenablesmanypeople,locatedatvariousterminals,
touseaparticularcomputersystematthesametime.
➢Time-sharingormultitaskingisalogicalextensionof
multiprogramming.
➢Processor'stimewhichissharedamongmultipleusers
simultaneouslyistermedastime-sharing.
➢MultiplejobsareexecutedbytheCPUbyswitchingbetweenthem,
buttheswitchesoccursofrequentlyenabling,theuserstoreceivean
immediateresponse.
➢TheoperatingsystemusesCPUschedulingandmultiprogramming
toprovideeachuserwithasmallportionofatime.
Operating System Types
Prof. K. Adisesha (Ph. D)
16
Time-sharing operating systems:
Computersystemsthatweredesignedprimarilyasbatchsystemshavebeenmodifiedto
time-sharingsystems.
➢AdvantagesofTimesharingoperatingsystemsareasfollows:
❖Providestheadvantageofquickresponse.
❖Avoidsduplicationofsoftware.
❖ReducesCPUidletime.
➢DisadvantagesofTime-sharingoperatingsystemsareasfollows:
❖Problemofreliability.
❖Questionofsecurityandintegrityofuserprogramsanddata.
❖Problemofdatacommunication.
Operating System Types
Prof. K. Adisesha (Ph. D)
17
Distributed operating System:
Distributedsystemsusemultiplecentralprocessorstoservemultiplereal-time
applicationsandmultipleusers.Dataprocessingjobsaredistributedamongthe
processorsaccordingly.
➢Theprocessorscommunicatewithoneanotherthroughvariouscommunicationlines.
➢Thesearereferredaslooselycoupledsystemsordistributedsystems.
➢Processorsinadistributedsystemmayvaryinsizeandfunction.
➢Theseprocessorsarereferredassites,nodes,computers,andsoon.
➢Examples:Solaris,OSF/1,Micros,
DYNIX,Locus,Mach
Operating System Types
Prof. K. Adisesha (Ph. D)
18
Distributed operating System:
Distributedsystemsusemultiplecentralprocessorstoservemultiplereal-time
applicationsandmultipleusers.Dataprocessingjobsaredistributedamongthe
processorsaccordingly.
➢Theadvantagesofdistributedsystemsareasfollows−
❖Withresourcesharingfacility,auseratonesitemaybeabletousetheresourcesavailable
atanother.
❖Speeduptheexchangeofdatawithoneanotherviaelectronicmail.
❖Betterservicetothecustomers.
❖Reductionoftheloadonthehostcomputer.
❖Reductionofdelaysindataprocessing.
Operating System Types
Prof. K. Adisesha (Ph. D)
19
Network operating System:
ANetworkOperatingSystemrunsonaserverandprovidestheserverthecapabilityto
managedata,users,groups,security,applications,andothernetworkingfunctions.
➢Theprimarypurposeofthenetworkoperatingsystemistoallowsharedfileandprinteraccess
amongmultiplecomputersinanetwork,typicallyalocalareanetwork(LAN),aprivate
networkortoothernetworks.
➢Therearetwobasictypesofnetworkoperatingsystems:
❖Peer-to-PeerNetworkOperatingSystems
❖Client/ServerNetworkOperatingSystems
➢Examplesofnetworkoperatingsystemsinclude:
❖MicrosoftWindowsServer2003,MicrosoftWindowsServer2008,
❖UNIX,Linux,MacOSX,NovellNetWare,andBSD.
Operating System Types
Prof. K. Adisesha (Ph. D)
20
Network operating System:
ANetworkOperatingSystemrunsonaserverandprovidestheserverthecapabilityto
managedata,users,groups,security,applications,andothernetworkingfunctions.
➢Theadvantagesofnetworkoperatingsystemsareasfollows:
❖Centralizedserversarehighlystable.
❖Securityisservermanaged.
❖Upgradestonewtechnologiesandhardwarecanbeeasilyintegratedintothesystem.
❖Remoteaccesstoserversispossiblefromdifferentlocationsandtypesofsystems.
➢Thedisadvantagesofnetworkoperatingsystemsareasfollows:
❖Highcostofbuyingandrunningaserver.
❖Dependencyonacentrallocationformostoperations.
❖Regularmaintenanceandupdatesarerequired..
Operating System Types
Prof. K. Adisesha (Ph. D)
21
Real Time operating System:
Areal-timesystemisdefinedasadataprocessingsysteminwhichthetimeinterval
requiredtoprocessandrespondtoinputsissosmallthatitcontrolstheenvironment.
➢Thetimetakenbythesystemtorespondtoaninputanddisplayofrequiredupdated
informationistermedastheresponsetime.
➢Inthismethod,theresponsetimeisverylessascomparedtoonlineprocessing.
➢Real-timesystemsareusedwhentherearerigidtimerequirementsontheoperationofa
processorortheflowofdataandreal-timesystemscanbeusedasacontroldeviceina
dedicatedapplication.
➢Areal-timeoperatingsystemmusthavewell-defined,fixedtimeconstraints,otherwisethe
systemwillfail.
Operating System Types
Prof. K. Adisesha (Ph. D)
22
Real Time operating System:
Therearetwotypesofreal-timeoperatingsystems.
➢Hardreal-timesystems
❖Hardreal-timesystemsguaranteethatcriticaltaskscompleteontime.
❖Inhardreal-timesystems,secondarystorageislimitedormissingandthedataisstoredin
ROM.
❖Inthesesystems,virtualmemoryisalmostneverfound.
➢Softreal-timesystems
❖Softreal-timesystemsarelessrestrictive.
❖Softreal-timesystemshavelimitedutilitythanhardreal-timesystems.
❖Example:Multimedia,virtualreality,AdvancedScientificProjectslikeundersea
explorationandplanetaryrovers,etc.
Operating System -Services
Prof. K. Adisesha (Ph. D)
23
Operating System -Services:
AnOperatingSystemprovidesservicestoboththeusersandtotheprograms.
➢Itprovidesprogramsanenvironmenttoexecute.
➢Itprovidesuserstheservicestoexecutetheprogramsinaconvenientmanner.
➢CommonservicesprovidedbyanoperatingSystemare:
❖Programexecution
❖I/Ooperations
❖FileSystemmanipulation
❖Communication
❖ErrorDetection
❖ResourceAllocation
❖Protection
Operating System -Services
Prof. K. Adisesha (Ph. D)
24
Program execution:
Operatingsystemshandlemanykindsofactivitiesfromuserprogramstosystem
programs,theseactivitiesareencapsulatedasaprocess.
➢Aprocessincludesthecompleteexecutioncontext(codetoexecute,datatomanipulate,
registers,OSresourcesinuse).
➢Followingaretheactivitiesofanoperatingsystemwithrespecttoprogrammanagement:
❖Loadsaprogramintomemory.
❖Executestheprogram.
❖Handlesprogram'sexecution.
❖Providesamechanismforprocesssynchronization.
❖Providesamechanismforprocesscommunication.
❖Providesamechanismfordeadlockhandling.
Operating System -Services
Prof. K. Adisesha (Ph. D)
25
File system manipulation:
Afilerepresentsacollectionofrelatedinformation.Computerscanstorefilesonthe
disk(secondarystorage),forlong-termstoragepurpose.
➢Afilesystemisnormallyorganizedintodirectoriesforeasynavigationandusage.
➢Thesedirectoriesmaycontainfilesandotherdirections.
➢Followingarethemajoractivitiesofanoperatingsystemwithrespecttofilemanagement:
❖Programneedstoreadafileorwriteafile.
❖Theoperatingsystemgivesthepermissiontotheprogramforoperationonfile.
❖Permissionvariesfromread-only,read-write,deniedandsoon.
❖OperatingSystemprovidesaninterfacetotheusertocreate/deletefiles.
❖OperatingSystemprovidesaninterfacetotheusertocreate/deletedirectories.
❖OperatingSystemprovidesaninterfacetocreatethebackupoffilesystem.
Operating System -Services
Prof. K. Adisesha (Ph. D)
26
I/O Operation:
AnI/OsubsystemcomprisesofI/Odevicesandtheircorrespondingdriversoftware.
Drivershidethepeculiaritiesofspecifichardwaredevicesfromtheusers.
➢AnOperatingSystemmanagesthecommunicationbetweenuseranddevicedrivers:
❖I/OoperationmeansreadorwriteoperationwithanyfileoranyspecificI/Odevice.
❖OperatingsystemprovidestheaccesstotherequiredI/Odevicewhenrequired.
Operating System -Services
Prof. K. Adisesha (Ph. D)
27
Communication:
Incaseofdistributedsystemswhichareacollectionofprocessorsthatdonotshare
memory,peripheraldevices,oraclock,theoperatingsystemmanagescommunications
betweenalltheprocesses.
➢TheOShandlesroutingandconnectionstrategies,andtheproblemsofcontentionandsecurity.
➢Followingarethemajoractivitiesofanoperatingsystemwithrespecttocommunication:
❖Twoprocessesoftenrequiredatatobetransferredbetweenthem
❖Boththeprocessescanbeononecomputerorondifferentcomputers,butareconnected
throughacomputernetwork.
❖Communicationmaybeimplementedbytwomethods,eitherbySharedMemoryorby
MessagePassing..
Operating System -Services
Prof. K. Adisesha (Ph. D)
28
Error handling:
Errorscanoccuranytimeandanywhere.AnerrormayoccurinCPU,inI/Odevicesor
inthememoryhardware.
➢Followingarethemajoractivitiesofanoperatingsystemwithrespecttoerrorhandling:
❖TheOSconstantlychecksforpossibleerrors.
❖TheOStakesanappropriateactiontoensurecorrectandconsistentcomputing.
Operating System -Services
Prof. K. Adisesha (Ph. D)
29
Resource Management:
Incaseofmulti-userormulti-taskingenvironment,resourcessuchasmainmemory,
CPUcyclesandfilesstoragearetobeallocatedtoeachuserorjob.
➢Followingarethemajoractivitiesofanoperatingsystemwithrespecttoresource
management:
❖TheOSmanagesallkindsofresourcesusingschedulers.
❖CPUschedulingalgorithmsareusedforbetterutilizationofCPU.
Operating System -Services
Prof. K. Adisesha (Ph. D)
30
Protection:
Protectionreferstoamechanismorawaytocontroltheaccessofprograms,processes,
oruserstotheresourcesdefinedbyacomputersystem.
➢Followingarethemajoractivitiesofanoperatingsystemwithrespecttoprotection:
❖TheOSensuresthatallaccesstosystemresourcesiscontrolled.
❖TheOSensuresthatexternalI/Odevicesareprotectedfrominvalidaccessattempts.
❖TheOSprovidesauthenticationfeaturesforeachuserbymeansofpasswords.
Operating System -Properties
Prof. K. Adisesha (Ph. D)
31
Properties of Operating System:
OperatingSystemreferstoamechanismtoaccesstheprograms,processes,orusersto
theresourcesdefinedbyacomputersystem.
➢FollowingarethepropertiesofOperatingSystem:
❖Batchprocessing.
❖Multitasking
❖Multiprogramming
❖Interactivity
❖RealTimeSystem
❖DistributedEnvironment
❖Spooling
Operating System -Properties
Prof. K. Adisesha (Ph. D)
32
Batch processing:
BatchprocessingisatechniqueinwhichanOperatingSystemcollectstheprograms
anddatatogetherinabatchbeforeprocessingstarts.
➢Anoperatingsystemdoesthefollowingactivitiesrelatedtobatchprocessing:
❖TheOSdefinesajobwhichhaspredefinedsequenceofcommands,
programsanddataasasingleunit.
❖TheOSkeepsanumberajobsinmemoryandexecutesthemwithoutany
manualinformation.
❖Jobsareprocessedintheorderofsubmission,i.e.,firstcomefirstserved
fashion.
❖Whenajobcompletesitsexecution,itsmemoryisreleasedandtheoutput
forthejobgetscopiedintoanoutputspoolforlaterprintingorprocessing.
Operating System -Properties
Prof. K. Adisesha (Ph. D)
33
Batch processing:
BatchprocessingisatechniqueinwhichanOperatingSystemcollectstheprograms
anddatatogetherinabatchbeforeprocessingstarts.
➢Advantages
❖Batchprocessingtakesmuchoftheworkoftheoperatortothecomputer.
❖Increasedperformanceasanewjobgetstartedassoonasthepreviousjobisfinished,
withoutanymanualintervention.
➢Disadvantages
❖Difficulttodebugprogram.
❖Ajobcouldenteraninfiniteloop.
❖Duetolackofprotectionscheme,onebatchjobcanaffectpendingjobs.:
Operating System -Properties
Prof. K. Adisesha (Ph. D)
34
Multitasking:
MultitaskingiswhenmultiplejobsareexecutedbytheCPUsimultaneouslyby
switchingbetweenthem.
➢AnOperatingSystemdoesthefollowingactivitiesrelatedtomultitasking:
❖Theusergivesinstructionstotheoperatingsystemortoaprogramdirectly,andreceivesan
immediateresponse.
❖TheOShandlesmultitaskinginthewaythatitcanhandlemultipleoperations/executesmultiple
programsatatime.
❖MultitaskingOperatingSystemsarealsoknownasTime-sharingsystems.
❖Eachuserhasatleastoneseparateprograminmemory.
Operating System -Properties
Prof. K. Adisesha (Ph. D)
35
Multiprogramming:
Sharingtheprocessor,whentwoormoreprogramsresideinmemoryatthesametime,is
referredasmultiprogramming.
➢Multiprogrammingassumesasinglesharedprocessor.
➢MultiprogrammingincreasesCPUutilizationbyorganizingjobsso
thattheCPUalwayshasonetoexecute.
➢AnOSdoesthefollowingactivitiesrelatedtomultiprogramming:
❖Theoperatingsystemkeepsseveraljobsinmemoryatatime.
❖Thissetofjobsisasubsetofthejobskeptinthejobpool.
❖Theoperatingsystempicksandbeginstoexecuteoneofthejobsinthememory.
❖Multiprogrammingoperatingsystemsmonitorthestateofallactiveprogramsandsystemresources
usingmemorymanagementprogramstoensuresthattheCPUisneveridle,unlesstherearenojobs
toprocess
Operating System -Properties
Prof. K. Adisesha (Ph. D)
36
Multiprogramming:
Sharingtheprocessor,whentwoormoreprogramsresideinmemoryatthesametime,
isreferredasmultiprogramming.
➢Multiprogrammingassumesasinglesharedprocessor.
➢MultiprogrammingincreasesCPUutilizationbyorganizingjobssothattheCPUalwayshas
onetoexecute.
➢AnOSdoesthefollowingactivitiesrelatedtomultiprogramming:
❖Theoperatingsystemkeepsseveraljobsinmemoryatatime.
❖Thissetofjobsisasubsetofthejobskeptinthejobpool.
❖Theoperatingsystempicksandbeginstoexecuteoneofthejobsinthememory.
❖Multiprogrammingoperatingsystemsmonitorthestateofallactiveprogramsandsystemresources
usingmemorymanagementprogramstoensuresthattheCPUisneveridle,unlesstherearenojobs
toprocess
Operating System -Properties
Prof. K. Adisesha (Ph. D)
37
Real Time System & Interactivity:
Real-timesystemsareusuallydedicated,embeddedsystems.
➢Anoperatingsystemdoesthefollowingactivitiesrelatedtoreal-timesystemactivity..
❖Insuchsystems,OperatingSystemstypicallyreadfromandreacttosensordata.
❖TheOperatingsystemmustguaranteeresponsetoeventswithinfixedperiodsoftimeto
ensurecorrectperformance.
Interactivity
➢Interactivityreferstotheabilityofuserstointeractwithacomputersystem.
➢AnOperatingsystemdoesthefollowingactivitiesrelatedtointeractivity−
❖Providestheuseraninterfacetointeractwiththesystem.
❖Managesinputdevicestotakeinputsfromtheuser.Forexample,keyboard.
❖Managesoutputdevicestoshowoutputstotheuser.Forexample,Monitor.
❖TheresponsetimeoftheOSneedstobeshort,sincetheusersubmitsandwaitsfortheresult.
Operating System -Properties
Prof. K. Adisesha (Ph. D)
38
Distributed Environment:
AdistributedenvironmentreferstomultipleindependentCPUsorprocessorsina
computersystem.
➢Anoperatingsystemdoesthefollowingactivitiesrelatedtodistributedenvironment:
❖TheOSdistributescomputationlogicsamongseveralphysicalprocessors.
❖Theprocessorsdonotsharememoryoraclock.Instead,eachprocessorhasitsownlocal
memory.
❖TheOSmanagesthecommunicationsbetweentheprocessors.
❖Theycommunicatewitheachotherthroughvariouscommunicationlines.
Operating System -Properties
Prof. K. Adisesha (Ph. D)
39
Spooling:
Spoolingisanacronymforsimultaneousperipheraloperationsonline.
➢SpoolingreferstoputtingdataofvariousI/Ojobsinabuffer.
➢ThisbufferisaspecialareainmemoryorharddiskwhichisaccessibletoI/Odevices.
➢Advantages
❖Thespoolingoperationusesadiskasaverylarge
buffer.
❖SpoolingiscapableofoverlappingI/Ooperationfor
onejobwithprocessoroperationsforanotherjob.
Operating System -Properties
Prof. K. Adisesha (Ph. D)
40
Spooling:
Spoolingisanacronymforsimultaneousperipheraloperationsonline.
➢SpoolingreferstoputtingdataofvariousI/Ojobsinabuffer.
➢Anoperatingsystemdoesthefollowingactivitiesrelatedtodistributedenvironment.
❖HandlesI/Odevicedataspoolingasdeviceshavedifferentdataaccessrates.
❖Maintainsthespoolingbufferwhichprovidesawaitingstationwheredatacanrestwhilethe
slowerdevicecatchesup.
❖MaintainsparallelcomputationbecauseofspoolingprocessasacomputercanperformI/O
inparallelfashion.
❖Itbecomespossibletohavethecomputerreaddatafromatape,writedatatodiskandto
writeouttoatapeprinterwhileitisdoingitscomputingtask
Discussion
Prof. K. Adisesha (Ph. D)
41
Queries ?
Prof. K. Adisesha
9449081542