Operating systems unit 1 wicked stockknj

guttalasharmila3 9 views 28 slides Aug 30, 2025
Slide 1
Slide 1 of 28
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28

About This Presentation

Gghhn


Slide Content

Principles of Operating System
Unit -1
Smt M V S V Kiranmai
APCSE (C), UCEK, JNTUK

What is an Operating System?
•Aprogramthatactsasanintermediarybetweena
userofacomputerandthecomputerhardware
•Itprovideanenvironmentinwhichausercan
executeprogramsinaconvenientandefficient
manner
•Itisasoftwarethatmanagesthecomputerhardware
•Itisanintermediarybetweenthecomputeruserand
thecomputerhardware.
•Operatingsystemgoals:
–Executeuserprogramsandmakesolvinguser
problemseasier
–Makethecomputersystemconvenienttouse
–Usethecomputerhardwareinanefficientmanner

Computer System Structure
•Computer system can be divided into four components:
–Hardware –provides basic computing resources
•CPU, memory, I/O devices
–Operating system
•Controls and coordinates use of hardware among
various applications and users
–Application programs –define the ways in which the
system resources are used to solve the computing
problems of the users
•Word processors, compilers, web browsers,
database systems, video games
–Users
•People, machines, other computers

Four Components of a Computer System

What Operating Systems Do
•Userswantconvenience,easeofuseandgood
performance-Don’tcareaboutresourceutilization
•shared computer such asmainframe or
minicomputermustkeepallusershappy
•Usersofdedicatesystemssuchasworkstationshave
dedicatedresourcesbutfrequentlyuseshared
resourcesfromservers
•Handheldcomputersareresourcepoor,optimizedfor
usabilityandbatterylife
•Somecomputershavelittleornouserinterface,such
asembeddedcomputersindevicesandautomobiles-
Runprimarilywithoutuserintervention

Operating System Definition
•OS is a resource allocator
–Manages all resources
–Decides between conflicting requests for efficient
and fair resource use
•OS is a control program
–Controls execution of programs to prevent errors
and improper use of the computer
–It is especially concerned with the operation and
control of I/O devices.

Operating System Definition (Cont.)
•OS-“Theoneprogramrunningatalltimesonthe
computer”isthekernel.
•Everythingelseiseither
–asystemprogram(shipswiththeoperatingsystem),
or
–anapplicationprogram.
•Today’sOSesforgeneralpurposeandmobile
computingalsoincludemiddleware–asetofsoftware
frameworksthatprovideadditionalservicesto
applicationdeveloperssuchasdatabases,multimedia,
graphics

Operating-System Operations
•Anoperatingsystemprovidestheenvironmentwithin
whichprogramsareexecuted
•Bootstrapprogram–simplecodetoinitializethesystem,
loadthekernel
•Kernelloads
•Startssystemdaemons(servicesprovidedoutsideofthe
kernel)
•KernelInterruptdriven(hardwareandsoftware)
–Hardwareinterruptbyoneofthedevices
–Softwareinterrupt(exceptionortrap):
•Softwareerror(e.g.,divisionbyzero)
•Requestforoperatingsystemservice-systemcall
•Otherprocessproblemsincludeinfiniteloop,
processesmodifyingeachotherortheoperating
system

Multiprogramming (Batch system)
•SingleusercannotalwayskeepCPUand
I/Odevicesbusy
•Multiprogramming organizesjobs(code
anddata)soCPUalwayshasoneto
execute
•Asubsetoftotaljobsinsystemiskeptin
memory
•Onejobselectedandrunviajob
scheduling
•Whenjobhastowait(forI/Oforexample),
OSswitchestoanotherjob
•Multiprogramming increases CPU
utilization,aswellaskeepingusers
satisfied,byorganizingprogramssothat
theCPUalwayshasonetoexecute
•aprograminexecutionistermeda
process
Memory Layout
for
Multiprogrammed
System

Multitasking (Timesharing)
•AlogicalextensionofBatchsystems–theCPUswitches
jobssofrequentlythatuserscaninteractwitheachjob
whileitisrunning,creatinginteractivecomputing
–Responsetimeshouldbe<1second
–Eachuserhasatleastoneprogramexecutingin
memoryprocess
–IfseveraljobsreadytorunatthesametimeCPU
scheduling
–Ifprocessesdon’tfitinmemory,swappingmoves
theminandouttorun
–Virtualmemoryallowsexecutionofprocessesnot
completelyinmemory.Themainadvantageofthis
schemeisthatitenablesuserstorunprogramsthat
arelargerthanactualphysicalmemory.

•Dual-modeoperationallowsOStoprotectitselfand
othersystemcomponents
–Usermodeandkernelmode
–Modebitprovidedbyhardware
•Providesabilitytodistinguishwhensystemis
runningusercodeorkernelcode
•Whenauserisrunningmodebitis“user”
•Whenkernelcodeisexecutingmodebitis
“kernel”
•Someinstructionsdesignatedasprivileged,only
executableinkernelmode
•Systemcallchangesmodetokernel,returnfrom
callresetsittouser
•IncreasinglyCPUssupportmulti-modeoperations
–i.e.virtualmachinemanager(VMM)modeforguest
VMs
Dual-mode Operation

Transition from User to Kernel Mode
kernel mode -also called supervisor mode, system mode, or
privileged mode.

•Systemcallsprovidethemeansforauserprogramtoask
theoperatingsystemtoperformtasksreservedforthe
operatingsystemontheuserprogram’sbehalf
•itisthemethodusedbyaprocesstorequestactionbythe
operatingsystem

Timer
•Timer to prevent infinite loop / process hogging resources
–Timer is set to interrupt the computer after some time
period
–Keep a counter that is decremented by the physical
clock.
–Operating system set the counter (privileged instruction)
–When counter zero, generate an interrupt
–Set up before scheduling process to regain control or
terminate program that exceeds allotted time

Computing Environments -Traditional
•Stand-alonegeneralpurposemachines
•Butblurredasmostsystemsinterconnectwithothers
(i.e.,theInternet)
•Portalsprovidewebaccesstointernalsystems
•Networkcomputers (thinclients)arelikeWeb
terminals-areusedinplaceoftraditionalworkstations
wheremoresecurityoreasiermaintenanceisdesired
•Mobilecomputersinterconnectviawirelessnetworks
•Networkingbecomingubiquitous–evenhomesystems
usefirewallstoprotecthomecomputersfromInternet
attacks

Computing Environments -Mobile
•computingonHandheldsmartphones,tablets,etc
•Devicesareportableandlightweight
•mobilesystemsareusednotonlyfore-mailandweb
browsingbutalsoforplayingmusicandvideo,reading
digitalbooks,takingphotos,andrecordingandediting
high-definitionvideo
•Extrafeature–moreOSfeatures(GPS,gyroscope)
•AnembeddedGPSchipallowsamobiledevicetouse
satellitestodetermineitspreciselocationonEarth
•Allowsnewtypesofappslikeaugmentedreality
•UseIEEE802.11wireless,orcellulardatanetworksfor
connectivity
•Thememorycapacityandprocessingspeedofmobile
devices,however,aremorelimitedthanthoseofPCs
•LeadersareAppleiOSandGoogleAndroid

Computing Environments –Distributed
•Distributedcomputing
–Collectionofseparate,possiblyheterogeneous,
systemsnetworkedtogether
•Networkisacommunicationspath,TCP/IPmost
common
–LocalAreaNetwork(LAN)
–WideAreaNetwork(WAN)
–MetropolitanAreaNetwork(MAN)
–PersonalAreaNetwork(PAN)
–NetworkOperatingSystemprovidesfeaturesbetween
systemsacrossnetwork
•Communicationschemeallowssystemstoexchange
messages
•Illusionofasinglesystem

Computing Environments –Client-Server
Client-Server Computing
Dumb terminals supplanted by smart PCs
Many systems now servers, responding to requests
generated by clients
General structure of a client–server system

Serversystemscanbebroadlycategorizedas
computeserversandfileservers
Compute-serversystemprovidesaninterfaceto
clienttorequestservices(i.e.,database).In
response,theserverexecutestheactionand
sendstheresultstotheclient.
File-serversystemprovidesinterfaceforclients
tostoreandretrievefiles.Itisafile-system
interfacewhereclientscancreate,update,read,
anddeletefiles

Computing Environments -Peer-to-Peer (P2P)
•Anothermodelofdistributedsystem
•P2Pdoesnotdistinguishclientsand
servers
–allnodesareconsideredpeers
–eachmayactasclient,serveror
both
–NodemustjoinP2Pnetwork
•Registersitsservicewith
centrallookupserviceon
network,or
•Broadcastrequestforservice
andrespondtorequestsfor
serviceviadiscoveryprotocol
ExamplesincludeNapsterandGnutella,VoiceoverIP
(VoIP)suchasSkype

Computing Environments –Cloud Computing
•Deliverscomputing,storage,evenappsasaserviceacross
anetwork
•Logicalextensionofvirtualizationbecauseituses
virtualizationasthebaseforitfunctionality.
–AmazonEC2(AmazonElasticComputeCloud)has
thousandsofservers,millionsofvirtualmachines,
petabytesofstorageavailableacrosstheInternet,pay
basedonusage
•Manytypes
–Publiccloud–availableviaInternettoanyonewilling
topay
–Privatecloud–runbyacompanyforthecompany’s
ownuse
–Hybridcloud–includesbothpublicandprivatecloud
components

–SoftwareasaService(SaaS)–oneormoreapplications
availableviatheInternet(i.e.,wordprocessor)
–PlatformasaService(PaaS)–softwarestackreadyfor
applicationuseviatheInternet(i.e.,adatabaseserver)
–InfrastructureasaService(IaaS)–serversorstorage
availableoverInternet(i.e.,storageavailableforbackup
use)
–Cloudcomputingenvironmentscomposedoftraditional
OSes,plusVMMs,pluscloudmanagementtools
–Internetconnectivityrequiressecuritylikefirewalls
–Loadbalancersspreadtrafficacrossmultiple
applications

Cloud Computing

Computing Environments –Real-Time Embedded
Systems
•Real-timeembeddedsystemsmostprevalentformof
computers
–Varyconsiderable,specialpurpose,limitedpurpose
OS,real-timeOS
–Useexpanding
–haveveryspecifictasks
–theyhavelittleornouserinterface,preferringto
spendtheirtimemonitoringandmanaginghardware
devices,suchasautomobileenginesandroboticarms
•Manyotherspecialcomputingenvironmentsaswell
–SomehaveOSes,someperformtaskswithoutanOS
•Real-timeOShaswell-definedfixedtimeconstraints
–Processingmustbedonewithinconstraint
–Correctoperationonlyifconstraintsmet

•EmbeddedsystemsalwaysrunReal-TimeOperating
Systems(RTOS).
•Arealtimesystemisusedwhenrigidtimerequirements
havebeenplacedontheoperationofaprocessororthe
flowofdata;
•itisoftenusedasacontroldeviceinadedicated
application.
•Sensorsbringdatatothecomputer.Thecomputermust
analyzethedataandpossiblyadjustcontrolstomodify
thesensorinputs.
•Areal-timesystemhaswell-defined,fixedtime
constraints.Processingmustbedonewithinthedefined
constraints,orthesystemwillfail
•Ex:Systemsthatcontrolscientificexperiments,medical
imagingsystems,industrialcontrolsystems,certain
displaysystems,automobile-enginefuel-injection
systems,home-appliancecontrollers,andweapon
systems

Free and Open-Source Operating Systems
•Operatingsystemsmadeavailableinsource-codeformat
ratherthanjustbinaryclosed-source
•Freesoftware(referredtoasfree/libresoftware)notonly
makessourcecodeavailablebutalsoislicensedtoallow
no-costuse,redistribution,andmodification
•Open-sourcesoftwaredoesnotnecessarilyoffersuch
licensing.
•allfreesoftwareisopensource,someopen-source
softwareisnot“free.”
•GNU/Linuxisthemostfamousopen-sourceoperating
system,withsomedistributionsfreeandothersopen
sourceonly
•Windowsisproprietarysoftware—Microsoftownsit,
restrictsitsuse,andcarefullyprotectsitssourcecode

•CountertothecopyprotectionandDigitalRights
Management(DRM)movement
•StartedbyFreeSoftwareFoundation(FSF),whichhas
“copyleft”GNUPublicLicense(GPL)
•ExamplesincludeGNU/LinuxandBSDUNIX(including
coreofMacOSX),andmanymore
•CanuseVMMlikeVMwarePlayer(FreeonWindows),
Virtualbox(opensourceandfreeonmanyplatforms-
http://www.virtualbox.com)
–Usetorunguestoperatingsystemsforexploration
Tags