You are on page 1of 15
CH:-1 @perating System Concepts Gk UH Evolution of operating System & history 1.2. Need of an Operating system 1.3 Single User & Multi user Operating System 5uR \+4 Elements of an operating System 5 Operating System as a Resource Manager % < RUG Types of Operating system 1.7 Usage of Operating System Scanned with CamScanner Definition of Operating system: “Operating System is an inte; resources and overall operati A&E S grated set of programs that is used to manage the Various ion of the computer System. Application Keyboard Printer It is a program that acts as an intermediary between a user of a computer and the computer hardware. It enables effective communication in effective manner. Ti is software that controls the execution of programs and that provides services such as resource allocation, scheduling, I/O control and data management, Essential system software which co-ordinates & controls the scheduling of work on system & the use of system’s resources is called operating system. 1.1 Evolution of operating System & Histo % Evolution of Operating System 1, Serial processing operating system 2. Simple batch operating system . Multiprogrammed batch operating system . Time sharing operating system 3 4. 8 6. 7. 8. Personal computer operating system . Parallel operating system Distributed operating system . Real time operating system Scanned with CamScanner 1. Serial Drocessing operating system: VL With the earliest computer, from the late 1940's to_mic ' interacted directly wit h computer har The_mach Awere’ run_with a Nere’ run with a rogrammer dware, there was no operating system. c wsole_consisting_of-display—lights,togele— —Switches,some_form_of input_det -{punch_card,-card-reider)-and_an_output_, device (printer), \” Programs iii machine code were loaded with the input. device (card reader). If an crror occurs the program was halled-and the erro condition was indi Tights Progia ‘Kamine the registers and main memory to determine e {the program is success, then output will appear on the printer. % % Disadvantages: — rere (1) Scheduling:- Hardcopy sign-up sheet to reserve machine time. 8 block of time and may not finish within that limi computers time or may not finish in allotted tim stop before resolving the problem. (2) Setup tim A single program called a job, could involve loading the compiler plus the high level language (source program) into memory, saving the compiled program (object program), and then loading and linking together the object program and common functions, Each of these steps could involve mounting or dismounting tapes or setting up card decks. If an error occurred, the hopeless user typically had to go back to the beginning of the setup sequence. Thus a considerable amount of time was spent just in setting up the program to run. This mode of operation could be termed serial processing, reflecting the fact that users had access to the computer in series. Over time, various system software tools were developed to attempt to make serial processing more efficient. These include libraries of common functions, linkers, loaders, debuggers, and W/O driver routines that were available as common S/W for all users. User signup for it. It might west e and forced to 2. Simple Batch Operating System: Via The task of this type of an operating system was transfer control automatically from one job to the next job. “Job consisted of the program, the data & some control information about the nature of the job.] \ 2-10 speed up processing, jobs with similar needs were batched together and were fun through the computer as a group. Thus, the programmers will leave their programs with the operator. > The operator would sort programs into batches with similar requirements and as the computer became available, would tun each batch. Scanned with CamScanner +} The output from each job would be sent back to the appropriate programmer, he isadvantages: ; : een > Disadvantages: | of interaction between the user and job, while the joy, executing. m CPU is often idle, ae devices are slower than CPU. i Ling is introd * vantages a te called spooling is introduceg a ta OE altaneOES| Peripheral Operation On Line] > Lisa disk technology. which is_overlapping of input of one joy “executi job._ exceution of other job, and output. of some other jl > Spooling ,In essence ;uses the disk as a huge buffer for reading for ahead as possible on iny put ‘devices and for storing O/ fi unfil the O/P devices are able to accept them. —" Eg py he GPU = .\ 3. Multiprogrammed Batch Operating System: \_2 Principal Objective: Maximize processor use ‘Source of directives to operating system: Job control language [JCL] commands provided with the job. — ° operating system because the speeds of the mechanical yp job 1 job2 job 3 job 4 512M ‘The Memory layout for a multiprogramming system Scanned with CamScanner Program A Time ———________, (a) Uniprogramming ProgramA | Run Walt [on] Walt Program B = Wall [x] Walt Run Walt Run] Run ; Run Run Combined Als Walt 4. |e Walt ‘Time ——______, (b) Multiprogramming with two programs: VS The operating system keeps job in memory at a time. \> This set of jobs is a subset of the jobs kept in the job pool (since the number of jobs that can be kept simultaneously in memory is usually much smaller than the number of jobs that can be in the job pool.) \’>_ The operating system picks and begins to execute one of the jobs in the memory. \ Eventually, the job may’ have to wait for somé task, such as the tape to be mounted or an I/O operation to complete. >In a nonmultiprogrammed system, the CPU could sit idle._ \® Ina multiprogramming system, the OS simply switches to and executes another ur Titcn the job needs to wait, the CPU is switched to and executes another job, and soon. \ > Eventually the first job finishes waiting and gets the CPU back. > As.long as there is always some job to execute, the CPU will never be idle. > Eventually, the job may have to wait for some task, such as a tape to be mounted, or an I/O operation to complete. > Ina multiprogramming system, the OS simply switches to and executes another job. ‘When ‘one job needs to wait, the CPU is switched to another job, and so on. Eventually, the first job finishes waiting and gets the CPU back. As long as there is always some job to execute, the CPU will never be idle. Multiprogramming operating system are fairly sophisticated compared to single program or uniprogramming system. a Scanned with CamScanner vvvv 7 = > To have several jobs ready to run they must be kept in main memory, f it. some form of memory managemen| psesiete mud decile wis > In additional if several jobs are ready to run, the pi le Which oy to run, which requires some algorithm for scheduling. "iting Advantages: , a , a } “Appropriate-for-executing_large_jobs.that.need. little interaction, Dev can submit jobs and return lattér-for-the. result;.it is not necessary for Ue {fo wait while the job'is processed. > Disadvantages: \2©_User can not directly interact with the system. \ Tough debugging. we Time Sharing Operating System: Principal objective: Minimize response time ___ Source of directives to operating system: Commands entered at the terminal_ o> Time sharing me ice by.a number of usei L- Multiprogramming used to handle multiple interactive jobs is referred to as time sharing OS, because the processor’s time is shated.among multiple-users. \> Tn time ‘Sharing system, multiple.users-simultaneously access the system through terminals, with OS interleaving the execution of each user program in short burst~ or quantum of computation, a > Thus, if there are N-users-actively-requesting service at one time, each user will only see on the avetage I/N of the effective computer speed, not counting-OS. overhead. ee eee > The response time on a properly designed system should be comparable to that on dedicated computer: * > It should give an illusion to each user as if the entire computer resources are available to itself solely. ° - \> Most_time-sharing.OS.has.FCES [First Come First Serve] queue. A program requiring service is’ put at-the end of the queue. When the process reaches the nt of the queue, it is dispatched, ~~ —— it is not completed within the time ‘slice, it is pre- slice and put at the end of the queues Now, it has to wait for the next time slice to resume its execution from the poitt where it left at the end of previous time slice. A process continues to run in bursts like this, till it terminated. ame sharing is . ose extension of multiprogramming. Multiple jobs * feauolly i hen fe ry switching between them, but the switches occur E Ts may interact with each program while it is running. > If the process have CPU burst of less than | time quantum, the process itself will release the CPU voluntarily [freely].The next process will be dispatched. ¢ end of the time vv viv Scanned with CamScanner \ EXAMPLE: Process Time(milliseconds) ia 24 P2 3 P3 13 Time Quantum=4 milliseconds Pr |P2_ |p3_ [pr [P3 [Pl [P3 [Pi [P3 [PI [PI o 4° 7 It 1s 19 23 27 31 32 «36 «40 > Disadvantages: ‘* More complex then multiprogrammed OS. * It may slow down if number of user's increases. 5. Personal Computer System: is type of system is referred to as_ personal, computer system. > Personal computers are microcomputers that are considerably smaller and less apne Ta : > The goal of these type of OS is to maximizing user convince and responsiveness ~~ instead of maximizing CPU & peripheral utilization. > OS for these comp Sanpate hate peed on have benefited from the development of OS for mainframes in several.ways. > However, since individuals have sole use of the computer, CPU utilization is no longer a prime,concern. Hence; some of the design decisions that are made in OS for mainframes may not be appropriate for smaller system. 6. Parallel Operating System: (Tightly Coupled) system. Such systems have more than one iS, the-etock,_and— system. > ‘Thiere are several reasons for building such systems. - Itincreases the throughput. ( Process’) — Pas sing Srvough sy Seen © “Multi sors_can_.also~-save_money_comparedto__multiple Malti ‘systems. «They increase the reliability. »f ; ; > The ability to continue providing setvice proportional to the level of serving H/W _is called graceful degradation ie > “Systems that are designed for graceful degradation are also called fault tolerant. > “There are mainty two Types of multiprocessing model. 1 Symmetric multiprocessing model. Qe A Symmetric multiprocessing model. Scanned with CamScanner — Ay symmetric multiprocessing model > In this type of processing model ,cach PFOCeSSOr runs ay identical job (copy) of the operating, system, and these cop Communicate with one another as needed. . > E.g., If two processors are connected by a bus. One is prim, and thé other is the backupy At fixed check points in the execution of the system, the state information of each job is copied from the primary machine to the backup. If a failure jg detected, the backup copy is activated, and is restarted from the most recent checkpoint. But it is expensive. {2. Asymmetric multiprocessing model a > In.this type of. processing model_each processor _is assigned specific task, A master processor controls the system; the other ‘processor either Ibok to the mastér for instruction or have Predefined tasks, This scheme defines a master slg lationship. The master processor schedules and_allocates rel jork to slave processors. Workitojslave processors. 9 7 Distributed Operating System: C Loosely, Coupe) WY \ 2 Autecent trend_in computer system is 10 distribute computation among several _ ‘Processors... ———— i memory. ors communicate with ‘buses oF fell ally-refered to_as loosely coupled system, or distributed mmunication “The progessor-in-a-distributed-system may vary in size and function. They may Include_small microprocessors, ‘workstation, minicomputer, and large general ~ _-Purpose computer system. “ . \ > These_processors are referred to by a number of different names, such as site, nodes,.. computers; and’ so'on, depending on the context in which they are mentioned. + ~ ¢ > There are variety, of reasons for building distributed systems, the major ones being vated (MC these.” Resource sharing | © Computation speedup ~_; © Reliability © © © Communication I XN « > Advantages of uted System: (D-Performane Very often a collection of processors can provide higher performance (and better price/performance ratio) than a centralized computer. 2. Distribution: , — Scanned with CamScanner > om ications i many applications involve, by their nature, spatially separated machines (@anking, Commercial, automotive system). 1-3. Reliability (fault tolerance): Some of the machines crash, th i 4,- Incremental grosate fe system can survive. Ue" As requirements on processi i j ssiny inerrant on p iB power grow, new machines can be added 5: Sharing of date/resources: > Shared data ‘is essential to many applications (banking, computer a pported cooperative work, reservation systems); other resources can be also shared (c.g, expensive printers), \S—Communication:! Facilit : . ‘acilitates human-to-human communication, > Disadvantages of Distribiited Systems: 1) Security problems: 1’ > Sharing generates the problem of data security. 12?)_Networking’problems: : » 6 2) gy al Seyeral problems are created by the network infrast ucture, which have to ‘be dealt with: loss of messages,,overléading, ' ' . 1 Coy a \ 8. Real time Operating System: bat refers to the environment of system, with a very rigid requirement to complete _ “the processing of input data, in a pre specified a - \> The input data in such systert is invariably received ft vé_ The output may be used to control some real world j Ve EX=An air defense. system, receiving information about aircraft movements from radars and control weapons for the elimination of hostile.aircraft. \ % For such application, it can be well appreciated that the processing of data inputs, within specified-time limits, is absolutely article, >> Real time systems are used in erivironments, with a large number of events mostly external to the computer system, must be accepted & processed in highly time bound manner. Psu é rocess_cont in_indust jilitary_system_for. ‘tom ean he catesorized into Scanned with CamScanner > Historically operating systems hi n architecture, it is good idea to study the history \ e If the intervals, the resul may lose its.utility. © These types of sys! defense use. iti | time system. ¢ restrictive type of real sys / a data is not processed within specified inp\ ts may not be catastrophic, but the Outpy, tems are not suitable for industrial g ave been tightly related to the computer of operating systems from the architecture of the computers on which they run. > Operating systems have evolved through a number of distinct phases op generations which corresponds roughly to the decades. 1 could be using the CPU. The 1940's - First Generations: > The_earliest_electronic_digital_comput rating systems. Machines of the time were so primitive that programs were often entere: one bit at time on rows of mechanical_switches (plug boards), Programming languages were unknown (not even assembly languages). Operating systems were unheard of. . The 1950's - Second Generation: > By the early 1950's, the routine had improved somewhat with the introduction of punch cards. The General Motors Research Laboratories implemented the first operating systems in early 1950's for their IBM 701. The system of the 50's generally ran one job at a time. These were called single-stream batch processing systems because programs and data were submitted in groups or batches. }.. The 1960's - Third Generation: » The systems of the 1960's were also batch processing systems, but they were able to take better advantage of the computer's resources by running several_jobs at_once. So operating systems designers developed the concept of multiprogramming in which several jobs are in main memory at once; a processor is switched ftom job to job as needed to keep several Jobs advancing while keeping the peripheral devices in use. For example, on the system with no multiprogramming, when the current Job pauséd to wait for other 1/O operation to complete, the CPU simply sat idle until the 1/0 finished. The solution for this problem that evolved Was to partition memory into several pieces, with a different job in each Partition, While one job was waiting for /O to complete, another job Scanned with CamScanner > Another major feature in third-generation operating system was the technique called spooling, (simultaneous peripheral operations on line). In spooling, a highspeed device like a disk interposed between ® funn! program and a low-speed device involved with the program in to for example, outputs fro Programs can run to com fon faster, and other firograms.can-be initiated sooner when the. printer bee: es available, the — outputs may be printed, > “Note that spooling teclnique is much like thread being spun to a spool So that it may be later be unwound as needed. > Another feature present in this generation was.timeshain ee = variant of multiprogramming technique, in whicl h each user has an on-line (i.e, directly connected) terminal. Because the user is present and interacting with the computer, the computer system must respond quickly to user requests, otherwise user productivity could suffer. Timesharing systems were developed to multiprogram large number of simultaneous interactive users. 4, Fourth Generation > With the development of LSI (Large Scale Integration) circuits, chips. . operating system entered in the system entered in the personal computer _ “and the workstation age. Microprocessor technology evolved to the point ‘hat it becomes possible Py intdesktop computers as powerful as the mainframes of the 1970s, Two operating systems have dominated the personal computer scene: MS-DOS, written by Microsoft, Inc. for the TBM PC and other machines using the Intel 8088 CPU and its successors, and UNIX, which is dominant on the large personal computers using the Motorola 6899 CPU family. Scanned with CamScanner 1.4 Function/Components/Elements of Operating system / N eedS V1, Process Management Memory Management 4. File Management -4. Security \S. Command Interpretation \“6. Input/output Or Device Management _J= Job Control 1, Process Management: __ ® “The process management module of an operating sistem takes care of the creation & deletion of processes, scheduling of various system resources to the different Process requesting them, & providing 1 ‘siti for_ Synchronization & . communication among processes, — 2. Memory management: he “memory-management module of an operating system takes care of allocation & reallocation of memory space to the various programs in need of this — resouree meta Ous progr 3. Filemanagement: “> Computer use a lot of data & programs, whic! device. File management functions of an operating stored on secondary storage _ ystem Scanned with CamScanner 15 of all different files & maintaining the integrity of data stored in the files ncluding file directory structure, 4. Secuitity: > The security modules of an operating system protect the resources & information of a computer system against destruction & unauthorized access. 5. Comnitatid Interpretation: fee eee The command interpretation module of an operating system takes care of interpreting of user commands & directing the system_resources to handle the. TRUSTS. With this mode of interaction with the system, the user is usually not too concerned with the hardware details of the system, 6. Lap output_or Device Managem ination & control of various input & output device is an important function, J perating system. This involves receiving the request for 1/0 interrupts & ‘communicating back to the requesting process. 7. Job Control; > When the user wants to run an application program, the operating system felling it what to do. He does this using operating system job “control language or JCL. JCL consists of number of operating systems commands, called system commands that control thé functioning oF the-operating system. _ aust communicate with Operating system as a Resource manager > A-computer is set of resources forthe movement, storage,_and processing of data and for the control of these Tunctions. The OS is responsible for managing these resources. > By managing the computer resources, the OS is in control of the computer’s basic function. et > OS functions in the same way as ordinary computer S/W; that is, it is a program or suite of programs executed by the processor. > The OS frequently exti control and must depend on the processor to allow it to regain control. Fr eeryy > The OS is, in fact, nothing more than a set of computer programs. Like other computer programs, t provides in Tnstactions rprocessor- The processor. The key difference is in the intent of the program. > The Os directs the processor in the use of the other system resources and in the timing of its execution of other programs. > But in order for the processor to do any of these things, it must ease executing the OS program and execute other programs. > Thus, the OS aléeayadstx> contro! for the processor to do some “useful” w. resumes control long enough to prepare the processor to do the next piece of work. > “The OS decides when an 1/0 device can be used by a program in execution and “controls access to and use-oFfiles.. —— Scanned with CamScanner ind the operating system must determine how > The processor itself is a resource; g syeteticular user PrOsram. In Thuch processor time Ts to be devoted to the execution © ° Ay ofthe processors. the ease of a multiple-processor system, this decision MUS! SPEC a So. OS has to > Frequently it is necessary for users to share expensive :- a mediate confficting requests for resources among DSOREAmS ann i who is usi > “Insshor, this view of the OS holds it primary task is (0 KesP. ta a vetting which resources, to grant resource requested to account fo! conflicting requests from different programs and users. 1.6 Types of Operating system: > Within the broad family of operating systems, there are general based on the types of computers they control and the sort of app! The categories are: yy four types, categorized ications they support. 1) Real-time operating system(RTOS): * Real-time operating systems are used to control_machinery, scientifi instruments and industrial_systems, An RTOS typically has very little user-inter ity, and no end-user utilities, since the system will be an RTOS ‘a “sealed box" when delivered for use. A very impol executes in precisely the same amount of time, every time it occurs. In a ‘complex machine, having a part move more quickly just because system resources are available may be just as catastrophic as having it not move at all because the system is busy. un forvansbe 2) Single-user, single task: = As the name implies, this operating 3) is designed to_mat 1 so that one user can effectively do one thing at a time. The Palm OS for Palm handheld computers is a good example of a modem single- user, single-task operating system. 3) Single-user, multi-tasking : : laplop_computers_today.—Miroso > Windows an a platforms are both examples of operating systems that will let a single user have several $ same time. For example, it’ entirely_possib vs io be writing a note in a word Pr - z 7 iter the text of an e-mail message. jet while printing ee Scanned with CamScanner 17 NAWERYWNS 4) Multiuser: A multi-user operating system allows many different_users_to take ge of the computers resources simultaneously. The operating . ‘ystem_must_make sure that the requirements of the various users are and that each of the programs they are using has sufficient and s ‘¢parate resources so that a problem with one user doesn't affect the entire Community of users. UNIX, VMS and mainframe operating systems, such 8S MVS, are examples of multi-user operating systems. 7 important to differentiate between multi-user operating systems and Nea gstser operating systems that support networking. Windows 2000 and tonal! Netware can each support hundreds or thousands of networked ers, | but the operating systems themselves aren't true multi-user Operating systems. The system administrator is the only "user" for Windows 2000 or Netware. The network support and all of the remote User logins the network enables are, in the overall plan of the operating system, a program being run by the administrative user. Usage of Operating System: Easy interaction between the human & computer. . Starting computer operation automatically when power in turned on. . Loading & scheduling users program. . Controlling input & output. . Controlling program execution. Managing use of main memory. Providing security to users program. Scanned with CamScanner

You might also like