0% found this document useful (0 votes)
69 views11 pages

Principal of Operating System

The document discusses the principal operating system concepts in 3 paragraphs: 1) It defines an operating system as system software that manages computer resources effectively and provides an interface between users and hardware. Resources include the processor, memory, I/O devices, and files. 2) The objectives of an operating system are optimal utilization of resources and ease of use. It acts as a resource manager deciding which process gets what resources, when, and for how long. 3) An operating system uses techniques like multiprogramming and multiprocessing to improve efficiency and allow multiple processes and users to share resources simultaneously.

Uploaded by

Himanshu Agrawal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views11 pages

Principal of Operating System

The document discusses the principal operating system concepts in 3 paragraphs: 1) It defines an operating system as system software that manages computer resources effectively and provides an interface between users and hardware. Resources include the processor, memory, I/O devices, and files. 2) The objectives of an operating system are optimal utilization of resources and ease of use. It acts as a resource manager deciding which process gets what resources, when, and for how long. 3) An operating system uses techniques like multiprogramming and multiprocessing to improve efficiency and allow multiple processes and users to share resources simultaneously.

Uploaded by

Himanshu Agrawal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

PrincipalofOperatingSystem

Operatingsystemoperatingsystemissystemsoftwarethatmanagesthedifferent
resourcesofacomputersystemeffectivelyandefficiently,providesaninterfacebetweenuser andhardwareandprovidestheplatformforexecutionofprograms.

Resourcesofos
1. 2. 3. 4. Processer Memory I/Odevices Files.

Objectiveofos
1 Maximum(Optima)lutilizationofresources 2 Easeofuseofcomputersystem. OSactasaResourcemanager.Itdecides 1 2 3 4 Whichprocessshouldgetwhatprocess. Inwhatquality. Atwhattime. Andforhowlong.

Multiprogrammingsimultaneouslystoringofmorethanoneprogramintothemain
memoryiscalledmultiprogramming.

Processprocessisainstanceofprograminexecution.
Processareoftwotypes 1 CpuboundprocessprocesswhichrequiremoreCPUtoexecuteincomparisontoI/O devices. 2 I/OboundprocessprocesswhichrequiremoreI/Odevicestoexecuteincomparisonto CPU.

Systemcallandsystemcommands
SystemcallstheyaremadebytheOSmodulesforallocationofresources.

SystemcommandstheyaremadebytheuserdirectlytoOSmodulesforallocationof resources.

FunctionsofOS.
1 2 3 4 5 6 7 8 FileManagement ProcessManagement MainmemoryManagement SecondarymemoryManagement I/OdeviceManagement Networkmanagement. CommandInterpretation Systemprotection.

ProcessManagementloadingitfromsecondarymemorytomainandcommenceits execution. 1 2 3 4 5 6 Creationofaprocess Deletionofaprocess Schedulingofaprocess Suspendingaprocess Resumingaprocess Contextscheduling.

MainmemoryManagementkeepingtracksofwhichsegmentofmemoryisinuseandby whom. Decidingwhichprocessaretobeloadedintomemorywhenspacebecomesavailable. and 1 Allocation 2 DEallocation 3 Freespacemanagement SecondarymemoryManagement 1 2 3 4 Allocation DEallocation Freespacemanagement Diskscheduling.

I/OdevicemanagementanOSwillhavedevicedrivertofacilitateI/ofunctions. 1 Drivers 2 Interface Filemanagementfilemanagementisacollectionofrelatedinfo,definedbyitscreator.They areoriginsubdirectoriesanddirectories. 1 2 3 4 5 6 Creationofafile. Deletionofafile. Updatingofafile. Rename Move Accessrights.

Directories 1 Creation 2 Deletion 3 Renaming. Networkmanagement 1 Adistributivesystemcollectionofprocessersanddonotsharememoryclockand peripheralsdevices. 2 Eachprocessercommunicatewithotherthroughanetwork. Systemprotection Atatimeonly1processisenabledtotakecontrolofCPU. OnlyoneprocesshaveaccesstoanI/odeviceatatime. 1 Accessrights. 2 memory Commandinterpretation 1 SystemcallsApplicationprogram. 2 Systemcommandsuser.

Servicesofos
thesearetheoutputgivenbyOStotheuser.

1 2 3 4 5 6 7

Programexecution I/Ooperators Filemaupulators Communication Errordetectionandrecovery Systemprotection Accounting.

ComponentsofOS
OSiddividedintosubsystemsinaccordancewiththefunctionsperformedthusitcomprisesof thefollowingcomponents. 1 2 3 4 5 6 7 8 9 FileManagementcomponent ProcessManagementcomponent MainmemoryManagementcomponent SecondarymemoryManagementcomponent I/OdeviceManagementcomponent Networkmanagementcomponent CommandInterpretationcomponent Systemcomponent Accountingcomponentkeepsaccountofsystemresourcesusedbyvarioususersina timesharingsystem&generatesbillatprespecifiedinterval.

OSstructure

Users Applicatonprograms OS modules Systemresources (CPU,Ram,I/O resources,filesetc)

TypesofOS
BatchOSitrequiresthatthattheprogram,itsrelateddataandrelevantcontrolcommands shouldbesubmittedtogether,inaformofajob. itallowsnointeractionb/wusersandapplicationprogram. Serialprocessing MultiprogrammingOS 1 MultitaskingOSexecutionofatwoormoreprogramonasingleprocesserbymultiple user. 2 MultiprocessingOSexecutionoftwoormoreprogramssimultaneouslyontwoormore processerbymanyuser 3 Multiprogrammingexecutionof2ormoreprogramssimultaneouslyonone processersbymultiplemanyusers TimesharingOSProcessingoftwoormoreprogramsbymultipleusersinroundrobinfashion ononeprocesser. RealtimesystemOSTheyareusedinenvironmentwherealargenumberofeventsmostly externaltothecomputersystem ObjectiveQuickresponsetimetomeetthescheduleddeadline. DistributiveOSacollectionofautonomoussystemcapableofcommunicationandco operationviatheirh/w. NetworkOSitisalsoacollectionofcomputersystemssothattheuseriswellawareofthefact thatheisworkingonanetworkandresourcesmaybeavailableonremotemachines.

EvolutionofOS
BareMachineApproach NoOS Computerwasprogrammeddirectlyinmachinelanguage. Eg.PDPII Inputdevicefrontpanelswitches Outputdevicelightemittingdiodes

Disadvantage

Need SerialProcessing Programsareexecutedstrictlyinserialmanner I/OdevicesPunchcards,papertapes,magnetictapes&lineprinters Useofassembly&highlevellanguages Useoflinkers&loaders Useofsecondarymemory I/Odevices Secondarystoragedevices Highlevellanguage&theirtranslators Linkersandloaders Userunfriendly Timeconsuming Powerfailurerentertheprogram Poorthroughput

Disadvantage Inefficient Sequencingofoperationsdonemanually,thuspoorutilizationofresources Samesequenceisfollowedforexecutioninwhichinputisgiven

(Eg.5progs2Pascal,2COBOL,1FORTRAN) BatchProcessing BatchOS:usedtoread,interpret&executesystemcommandsautomatically&groupthe pooledjobsintoseparatebatchesplacingsimilarjobsinsamebatch,basedonpre specifiedcriteria Batchjobsareexecutedautomaticallyoneafteranother,withoutanymanualintervention Improvessystemutilizationbyreducingoverheadperprogram

Disadvantages Concurrentexecutionofprogramsisnotpossible Nointeractionb/wuser&programwhenitwasunderexecution>Prog.Development timeincreases

Offlinedebugging>timeconsuming Turnarounddelays

Multiprogramming Morethanoneprogramsusedtobeactivatedconcurrently >OneoftheactivatedprogramsbeinginrunmodeusingCPU >OthersusingI/Odevicesorbeinginwaitstatewaitingforresourcestobeavailable Improvedutilizationofsystemresources Increasedthroughput

Disadvantage OSbecomescomplex

Interactivetimesharingsystems Inadditiontomultiprogramming,supportsuserinteractionwiththesystem,throughOS commands EachinteractiveuserisassignedatimesliceinRRfashionduringwhichitcontrolstheCPU Providesquickterminalresponsetime Allowsonlinedebugging Shortprogramdevelopmenttime

OSStructure

Designed&implementedbyfewpeople Providemostfunctionalityinleastspace Notdividedintomodulescarefully

Limitedbyh/wfunctionality Consistsof2partskernel&systemprograms Largefunctionalitycombinedintoonelevel(kernel) Difficulttoenhance(modificationmayaffectotherareas)

LayeredApproach
OSisbrokenupintoanooflayers,eachbuiltontopoflowerlayers. Bottomlayersishardware,highestlayerisuserinterface. Advantageofthissapproachismodulatiry. Eachlayerusesthefnsandservicesofonlylowerlevellayers(withoutknowinghowtheyare performedabstractions/encapsulation.Itsimplifiesdebuggingandverification.\ Difficultycarefuldefinitionoflayers Disadvantagelessefficient Eg.I/OoperationexecutesystemcallIOlayer(executedbyusers) Memorymanagementlayerscpuschedulinglayerh/w Eachlayeraddoverheadtosyscall Conclusion Fewerlayerswithmorefunctionalityaredesigned

Egos/2 5 4 3 2 1 0 Userprograms BufferingforI/Odevices Devicedrivers Memorymanager Cpuscheduling H/w

KernelapproachitisthatpartofOSwhichdirectlymakesinterfacewithH/wsystem.
Mainfunctionsare 1 Toprovidemechanismforcreationanddeletionofprocesses. 2 Toprovideprocesserscheduling,memorymanagement,andI/omanagement. 3 Toprovidemechanismforsynchronizationofprocessessothatprocessessynchronizetheir actions. 4 Toprovidemechanismforinterprocesscommunication.

Microkernels(clientservermodel)

Removingallnonessentialcomponentsfromthekernel Implementthemassystem&userlevelprograms Smallkernelprovidesminimalprocess&memorymgmt.

Communicationfacility

MainfunctionofkernelprovideCFb/wclientprogram&variousservicesrunninginuserspacethen msgpassing. Eg:Ifclientwishestoaccessafile,itmustinteractwithfileserver.Theclientprograms&theservice neverinteractdirectly.Theycommunicateindirectlybyexchangingmsgswithmicrokernel.gf Advantage EaseofextendingOS(changesaretobemadeinuserspacedonotrequiremodificationofthe kernel) OSiseasiertoportfromoneh/wtoanother Providesmoresecurity&reliability(mostservicesrunningasuser.Ifaservicefailstherestof OSremainsuntouched)

Eg:tru64UNIX(DigitalUNIX),AppleMacOSXserverOS,QNX(RTS)

Virtualmachines
Itisaconceptwhichcreatesanillusionofarealmachine ItiscreatedbyvirtualmachineOSthatmakesasinglerealmachineappeartobeseveralreal machines EachusercanrunOSofhisownchoice Invirtualmultiprogrammingsystemasinglerealmachinegivesanillusionofseveralvirtual machine,eachhavingitsownvirtualprocesser;storageandI/Odevicespossiblywithmuch largercapacitiesusingprocessschedulingandvirtualmemory.

Uses&advantages ConcurrentrunningofdissimilarOSbydifferentusers Eliminationofcertainconversionprob. S/wdev.:programscanbedev.Formach.configthatisdifferentfromthatofhost Security&privacy.Ofindependentvirtualmachines

Creationofvirtualmachine Theyarecreatedbysharingtheresourcesofphysicalcomp. Theheartofthesystem,knownasVirtualMachineMonitorrunsonbareh/w&does multiprogrammingi.e.providingseveralvirtualmachinestothenextlayerup

Eg:VMOSofIBM

himansh u agrawal

Digitally signed by himanshu agrawal DN: cn=himanshu agrawal, o=texvns, ou=shardamca, [email protected] m, c=IN Date: 2012.01.22 16:52:30 +05'30'

You might also like