OPERATING SYSTEM OVERVIEW An operating System (OS) is an intermediary between users and computer hardware. It provides users an environment in which a user can execute programs conveniently and efciently. In technical terms, It is a sotware which manages hardware. An operating System controls the allocation o resources and services such as memory, processors, devices and inormation.
Defnition An operating system is a program that acts as an interace between the user and the computer hardware and controls the execution o all !inds o programs.
"ollowing are some o important unctions o an operating System. •
#emory #anagement
•
$rocessor #anagement
•
%evice #anagement
•
"ile #anagement
•
Security
•
&ontrol over system perormance
•
'ob accounting
•
rror detecting aids
•
&oordination between other sotware and users
Memory Management #emory management reers to management o $rimary #emory or #ain #emory. #ain memory is a large array o words or bytes where each word or byte has its own address. #ain memory provides a ast storage that can be access directly by the &$. So or a program to be executed, it must in the main memory. Operating System does the ollowing activities or memory management. •
•
•
•
*eeps trac!s o primary memory i.e. what part o it are in use by whom, what part are not in use. In multiprogramming, OS decides which process will get memory when and how much. Allocates the memory when the process re+uests it to do so. %eallocates the memory when the process no longer needs it or has been terminated.
Processor Management In multiprogramming environment, OS decides which process gets the processor when and how much time. -his unction is called process scheduling. Operating System does the ollowing activities or processor management. •
*eeps trac!s o processor and status o process. $rogram responsible or this tas! is !nown as trafc controller.
•
Allocates the processor(&$) to a process.
•
%eallocates processor when processor is no longer re+uired.
Device Management OS manages device communication via their respective drivers. Operating System does the ollowing activities or device management. •
•
*eeps trac!s o all devices. $rogram responsible or this tas! is !nown as the IO controller. %ecides which process gets the device when and or how much time.
•
Allocates the device in the efcient way.
•
%eallocates devices.
Fie Management A /le system is normally organi0ed into directories or easy navigation and usage. -hese directories may contain /les and other directions. Operating System does the ollowing activities or /le management. •
*eeps trac! o inormation, location, uses, status etc. -he collective acilities are oten !nown as /le system.
•
%ecides who gets the resources.
•
Allocates the resources.
•
%eallocates the resources.
Ot!er Im"ortant Activities "ollowing are some o the important activities that Operating System does. •
•
•
•
•
Sec#rity 1y means o password and similar other techni+ues, preventing unauthori0ed access to programs and data. $ontro over system "er%ormance 2ecording delays between re+uest or a service and response rom the system. &o' acco#nting *eeping trac! o time and resources used by various 3obs and users. Error (etecting ai(s $roduction o dumps, traces, error messages and other debugging and error detecting aids. $oor(ination 'et)een ot!er so%t)ares an( #sers &oordination and assignment o compilers, interpreters, assemblers and other sotware to the various users o the computer systems.
TYPES OF OPERATING SYSTEMS Operating systems are there rom the very /rst computer generation. Operating systems !eep evolving over the period o time. "ollowing are ew o the important types o operating system which are most commonly used.
*atc! o"erating system
-he users o batch operating system do not interact with the computer directly. ach user prepares his 3ob on an o4line device li!e punch cards and submits it to the computer operator. -o speed up processing, 3obs with similar needs are batched together and run as a group. -hus, the programmers let their programs with the operator. -he operator then sorts programs into batches with similar re+uirements. -he problems with 1atch Systems are ollowing. •
•
•
5ac! o interaction between the user and 3ob. &$ is oten idle, because the speeds o the mechanical IO devices is slower than &$. %ifcult to provide the desired priority.
Time+s!aring o"erating systems -ime sharing is a techni+ue which enables many people, located at various terminals, to use a particular computer system at the same time. -imesharing or multitas!ing is a logical extension o multiprogramming. $rocessor6s time which is shared among multiple users simultaneously is termed as timesharing. -he main di4erence between #ultiprogrammed 1atch Systems and -imeSharing Systems is that in case o #ultiprogrammed batch systems, ob3ective is to maximi0e processor use, whereas in -imeSharing Systems ob3ective is to minimi0e response time. #ultiple 3obs are executed by the &$ by switching between them, but the switches occur so re+uently. -hus, the user can receives an immediate response. "or example, in a transaction processing, processor execute each user program in a short burst or +uantum o computation. -hat is i n users are present, each user can get time +uantum. 7hen the user submits the command, the response time is in ew seconds at most. Operating system uses &$ scheduling and multiprogramming to provide each user with a small portion o a time. &omputer systems that were designed primarily as batch systems have been modi/ed to timesharing systems. Advantages o -imesharing operating systems are ollowing •
$rovide advantage o +uic! response.
•
Avoids duplication o sotware.
•
2educes &$ idle time.
%isadvantages o -imesharing operating systems are ollowing. •
$roblem o reliability.
•
8uestion o security and integrity o user programs and data.
•
$roblem o data communication.
Distri'#te( o"erating System %istributed systems use multiple central processors to serve multiple real time application and multiple users. %ata processing 3obs are distributed among the processors accordingly to which one can perorm each 3ob most efciently. -he processors communicate with one another through various communication lines (such as highspeed buses or telephone lines). -hese are reerred as loosely coupled systems or distributed systems. $rocessors in a distributed system may vary in si0e and unction. -hese processors are reerred as sites, nodes, computers and so on. -he advantages o distributed systems are ollowing. •
•
•
7ith resource sharing acility user at one site may be able to use the resources available at another. Speedup the exchange o data with one another via electronic mail. I one site ails in a distributed system, the remaining sites can potentially continue operating.
•
1etter service to the customers.
•
2eduction o the load on the host computer.
•
2eduction o delays in data processing.
Net)or, o"erating System 9etwor! Operating System runs on a server and and provides server the capability to manage data, users, groups, security, applications, and other networ!ing unctions. -he primary purpose o the networ! operating system is to allow shared /le and printer access among multiple computers in a networ!, typically a local area networ! (5A9), a private networ! or to other networ!s. xamples o networ! operating systems are #icrosot 7indows Server :;;<, #icrosot 7indows Server :;;=, 9I>, 5inux, #ac OS >, 9ovell 9et7are, and 1S%. -he advantages o networ! operating systems are ollowing. •
&entrali0ed servers are highly stable.
•
Security is server managed.
•
pgrades to new technologies and hardwares can be easily integrated into the system.
•
2emote access to servers is possible rom di4erent locations and types o systems.
-he disadvantages o networ! operating systems are ollowing. •
?igh cost o buying and running a server.
•
%ependency on a central location or most operations.
•
2egular maintenance and updates are re+uired.
Rea Time o"erating System 2eal time system is de/nes as a data processing system in which the time interval re+uired to process and respond to inputs is so small that it controls the environment. 2eal time processing is always on line whereas on line system need not be real time. -he time ta!en by the system to respond to an input and display o re+uired updated inormation is termed as response time. So in this method response time is very less as compared to the online processing. 2ealtime systems are used when there are rigid time re+uirements on the operation o a processor or the @ow o data and realtime systems can be used as a control device in a dedicated application. 2ealtime operating system has well de/ned, /xed time constraints otherwise system will ail."or example Scienti/c experiments, medical imaging systems, industrial control systems, weapon systems, robots, and homeapplicance controllers, Air trafc control system etc. -here are two types o realtime operating systems.
-ar( rea+time systems ?ard realtime systems guarantee that critical tas!s complete on time. In hard real time systems secondary storage is limited or missing with data stored in 2O#. In these systems virtual memory is almost never ound.
So%t rea+time systems Sot real time systems are less restrictive. &ritical realtime tas! gets priority over other tas!s and retains the priority until it completes. Sot realtime systems have limited utility than hard realtime systems."or example, #ultimedia, virtual reality, Advanced Scienti/c $ro3ects li!e undersea exploration and planetary rovers etc.
OPERATING SERVI$ES An Operating System provides services to both the users and to the programs. •
It provides programs, an environment to execute.
•
It provides users, services to execute the programs in a convenient manner.
"ollowing are ew common services provided by operating systems. •
$rogram execution
•
IO operations
•
"ile System manipulation
•
&ommunication
•
rror %etection
•
2esource Allocation
•
$rotection
Program e.ec#tion Operating system handles many !inds o activities rom user programs to system programs li!e printer spooler, name servers, /le server etc. ach o these activities is encapsulated as a process. A process includes the complete execution context (code to execute, data to manipulate, registers, OS resources in use). "ollowing are the ma3or activities o an operating system with respect to program management. •
5oads a program into memory.
•
xecutes the program.
•
?andles program6s execution.
•
$rovides a mechanism or process synchroni0ation.
•
$rovides a mechanism or process communication.
•
$rovides a mechanism or deadloc! handling.
I/O O"eration IO subsystem comprised o IO devices and their corresponding driver sotware. %rivers hides the peculiarities o speci/c hardware devices rom the user as the device driver !nows the peculiarities o the speci/c device. Operating System manages the communication between user and device drivers. "ollowing are the ma3or activities o an operating system with respect to IO Operation.
•
•
•
IO operation means read or write operation with any /le or any speci/c IO device. $rogram may re+uire any IO device while running. Operating system provides the access to the re+uired IO device when re+uired.
Fie system mani"#ation A /le represents a collection o related inormation. &omputer can store /les on the dis! (secondary storage), or long term storage purpose. "ew examples o storage media are magnetic tape, magnetic dis! and optical dis! drives li!e &%, %%. ach o these media has its own properties li!e speed, capacity, data transer rate and data access methods. A /le system is normally organi0ed into directories or easy navigation and usage. -hese directories may contain /les and other directions. "ollowing are the ma3or activities o an operating system with respect to /le management. •
•
$rogram needs to read a /le or write a /le. -he operating system gives the permission to the program or operation on /le.
•
$ermission varies rom readonly, readwrite, denied and so on.
•
Operating System provides an interace to the user to createdelete /les.
•
•
Operating System provides an interace to the user to createdelete directories. Operating System provides an interace to create the bac!up o /le system.
$omm#nication In case o distributed systems which are a collection o processors that do not share memory, peripheral devices, or a cloc!, operating system manages communications between processes. #ultiple processes with one another through communication lines in the networ!. OS handles routing and connection strategies, and the problems o contention and security. "ollowing are the ma3or activities o an operating system with respect to communication. •
•
-wo processes oten re+uire data to be transerred between them. -he both processes can be on the one computer or on di4erent computer but are connected through computer networ!.
•
&ommunication may be implemented by two methods either by Shared #emory or by #essage $assing.
Error !an(ing rror can occur anytime and anywhere. rror may occur in &$, in IO devices or in the memory hardware. "ollowing are the ma3or activities o an operating system with respect to error handling. •
OS constantly remains aware o possible errors.
•
OS ta!es the appropriate action to ensure correct and consistent computing.
Reso#rce Management In case o multiuser or multitas!ing environment, resources such as main memory, &$ cycles and /les storage are to be allocated to each user or 3ob. "ollowing are the ma3or activities o an operating system with respect to resource management. •
OS manages all !ind o resources using schedulers.
•
&$ scheduling algorithms are used or better utili0ation o &$.
Protection &onsidering a computer systems having multiple users the concurrent execution o multiple processes, then the various processes must be protected rom each another6s activities. $rotection reers to mechanism or a way to control the access o programs, processes, or users to the resources de/ned by a computer systems. "ollowing are the ma3or activities o an operating system with respect to protection. •
•
•
OS ensures that all access to system resources is controlled. OS ensures that external IO devices are protected rom invalid access attempts. OS provides authentication eature or each user by means o a password.
OPERATING SYSTEM PROPERTIES "ollowing are ew o very important tas!s that Operating System handles
*atc! "rocessing
1atch processing is a techni+ue in which Operating System collects one programs and data together in a batch beore processing starts. Operating system does the ollowing activities related to batch processing. •
•
•
•
OS de/nes a 3ob which has prede/ned se+uence o commands, programs and data as a single unit. OS !eeps a number a 3obs in memory and executes them without any manual inormation. 'obs are processed in the order o submission i.e /rst come /rst served ashion. 7hen 3ob completes its execution, its memory is released and the output or the 3ob gets copied into an output spool or later printing or processing.
A(vantages •
•
1atch processing ta!es much o the wor! o the operator to the computer. Increased perormance as a new 3ob get started as soon as the previous 3ob /nished without any manual intervention.
Disa(vantages •
%ifcult to debug program.
•
A 3ob could enter an in/nite loop.
•
%ue to lac! o protection scheme, one batch 3ob can a4ect pending 3obs.
M#titas,ing
#ultitas!ing reers to term where multiple 3obs are executed by the &$ simultaneously by switching between them.Switches occur so re+uently that the users may interact with each program while it is running. Operating system does the ollowing activities related to multitas!ing. •
•
•
•
•
•
•
•
•
-he user gives instructions to the operating system or to a program directly, and receives an immediate response. Operating System handles multitas!ing in the way that it can handle multiple operations executes multiple programs at a time. #ultitas!ing Operating Systems are also !nown as -imesharing systems. -hese Operating Systems were developed to provide interactive use o a computer system at a reasonable cost. A timeshared operating system uses concept o &$ scheduling and multiprogramming to provide each user with a small portion o a timeshared &$. ach user has at least one separate program in memory.
A program that is loaded into memory and is executing is commonly reerred to as a process. 7hen a process executes, it typically executes or only a very short time beore it either /nishes or needs to perorm IO. Since interactive IO typically runs at people speeds, it may ta!e a long time to completed. %uring this time a &$ can be utili0ed by another process.
•
•
Operating system allows the users to share the computer simultaneously. Since each action or command in a timeshared system tends to be short, only a little &$ time is needed or each user. As the system switches &$ rapidly rom one userprogram to the next, each user is given the impression that heshe has hisher own &$, whereas actually one &$ is being shared among many users.
M#ti"rogramming 7hen two or more programs are residing in memory at the same time, then sharing the processor is reerred to the multiprogramming. #ultiprogramming assumes a single shared processor. #ultiprogramming increases &$ utili0ation by organi0ing 3obs so that the &$ always has one to execute. "ollowing /gure shows the memory layout or a multiprogramming system.
Operating system does the ollowing activities related to multiprogramming. •
-he operating system !eeps several 3obs in memory at a time.
•
-his set o 3obs is a subset o the 3obs !ept in the 3ob pool.
•
-he operating system pic!s and begins to execute one o the 3ob in the memory.
•
#ultiprogramming operating system monitors the state o all active programs and system resources using memory management programs to ensures that the &$ is never idle unless there are no 3obs
A(vantages •
?igh and efcient &$ utili0ation.
•
ser eels that many programs are allotted &$ almost simultaneously.
Disa(vantages •
•
&$ scheduling is re+uired. -o accommodate many 3obs in memory, memory management is re+uired.
Interactivity Interactivity reers that a ser is capable to interact with computer system. Operating system does the ollowing activities related to interactivity. •
•
•
•
OS provides user an interace to interact with system. OS managers input devices to ta!e inputs rom the user. "or example, !eyboard. OS manages output devices to show outputs to the user. "or example, #onitor. OS 2esponse time needs to be short since the user submits and waits or the result.
Rea Time System 2eal time systems represents are usually dedicated, embedded systems. Operating system does the ollowing activities related to real time system activity. •
•
In such systems, Operating Systems typically read rom and react to sensor data. -he Operating system must guarantee response to events within /xed periods o time to ensure correct perormance.
Distri'#te( Environment %istributed environment reers to multiple independent &$s or processors in a computer system. Operating system does the ollowing activities related to distributed environment.
•
•
•
•
OS %istributes computation logics among several physical processors. -he processors do not share memory or a cloc!. Instead, each processor has its own local memory. OS manages the communications between the processors. -hey communicate with each other through various communication lines.
S"ooing Spooling is an acronym or simultaneous peripheral operations on line. Spooling reers to putting data o various IO 3obs in a bu4er. -his bu4er is a special area in memory or hard dis! which is accessible to IO devices. Operating system does the ollowing activites related to distributed environment. •
•
•
OS handles IO device data spooling as devices have di4erent data access rates. OS maintains the spooling bu4er which provides a waiting station where data can rest while the slower device catches up. OS maintains parallel computation because o spooling process as a computer can perorm IO in parallel ashin. It becomes possible to have the computer read data rom a tape, write data to dis! and to write out to a tape printer while it is doing its computing tas!.
A(vantages •
•
-he spooling operation uses a dis! as a very large bu4er. Spooling is capable o overlapping IO operation or one 3ob with processor operations or another 3ob.