various types os

5

Click here to load reader

Upload: farhan-faruque

Post on 30-May-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Various Types OS

8/14/2019 Various Types OS

http://slidepdf.com/reader/full/various-types-os 1/5

CS322: A Brief History of Computer OperatingSystems

The Bare Machine

Stacked Job Batch Systems (mid 1950s - mid 1960s)

A batch system is one in which jobs are bundled together with the instructions necessary to allow themto be processed without intervention.

Often jobs of a similar nature can be bundled together to further increase economy

The basic physical layout of the memory of a batch job computer is shown below:

--------------------------------------

| || Monitor (permanently resident) |

| |

--------------------------------------

| |

| User Space |

| (compilers, programs, data, etc.) |

| |

--------------------------------------

The monitor is system software that is responsible for interpreting and carrying out the instructions inthe batch jobs. When the monitor started a job, it handed over control of the entire computer to the job,which then controlled the computer until it finished.

A sample of several batch jobs might look like:

$JOB user_spec ; identify the user for accounting purposes

$FORTRAN ; load the FORTRAN compiler

source program cards

$LOAD ; load the compiled program

$RUN ; run the program

data cards

$EOJ ; end of job

$JOB user_spec ; identify a new user

$LOAD application

$RUNdata

$EOJ

Often magnetic tapes and drums were used to store intermediate data and compiled programs.

1. Advantages of batch systems

move much of the work of the operator to the computer

Page 1 of 5CS322: Operating Systems History

8/11/2008http://www.math-cs.gordon.edu/courses/cs322/lectures/history.html

Page 2: Various Types OS

8/14/2019 Various Types OS

http://slidepdf.com/reader/full/various-types-os 2/5

increased performance since it was possible for job to start as soon as the previous jobfinished

2. Disadvantages

turn-around time can be large from user standpoint more difficult to debug program due to lack of protection scheme, one batch job can affect pending jobs (read too many

cards, etc) a job could corrupt the monitor, thus affecting pending jobs a job could enter an infinite loop

As mentioned above, one of the major shortcomings of early batch systems was that there was noprotection scheme to prevent one job from adversely affecting other jobs.

The solution to this was a simple protection scheme, where certain memory (e.g. where the monitorresides) were made off-limits to user programs. This prevented user programs from corrupting themonitor.

To keep user programs from reading too many (or not enough) cards, the hardware was changed toallow the computer to operate in one of two modes: one for the monitor and one for the user programs.IO could only be performed in monitor mode, so that IO requests from the user programs were passed tothe monitor. In this way, the monitor could keep a job from reading past it's on $EOJ card.

To prevent an infinite loop, a timer was added to the system and the $JOB card was modified so that amaximum execution time for the job was passed to the monitor. The computer would interrupt the joband return control to the monitor when this time was exceeded.

Spooling Batch Systems (mid 1960s - late 1970s)

One difficulty with simple batch systems is that the computer still needs to read the the deck of cardsbefore it can begin to execute the job. This means that the CPU is idle (or nearly so) during theserelatively slow operations.

Since it is faster to read from a magnetic tape than from a deck of cards, it became common forcomputer centers to have one or more less powerful computers in addition to there main computer. Thesmaller computers were used to read a decks of cards onto a tape, so that the tape would contain manybatch jobs. This tape was then loaded on the main computer and the jobs on the tape were executed. Theoutput from the jobs would be written to another tape which would then be removed and loaded on aless powerful computer to produce any hardcopy or other desired output.

It was a logical extension of the timer idea described above to have a timer that would only let jobsexecute for a short time before interrupting them so that the monitor could start an IO operation. Sincethe IO operation could proceed while the CPU was crunching on a user program, little degradation inperformance was noticed.

Since the computer can now perform IO in parallel with computation, it became possible to have thecomputer read a deck of cards to a tape, drum or disk and to write out to a tape printer while it wascomputing. This process is called SPOOLing: Simultaneous Peripheral Operation OnLine.

Page 2 of 5CS322: Operating Systems History

8/11/2008http://www.math-cs.gordon.edu/courses/cs322/lectures/history.html

Page 3: Various Types OS

8/14/2019 Various Types OS

http://slidepdf.com/reader/full/various-types-os 3/5

Spooling batch systems were the first and are the simplest of the multiprogramming systems.

One advantage of spooling batch systems was that the output from jobs was available as soon as the jobcompleted, rather than only after all jobs in the current cycle were finished.

Multiprogramming Systems (1960s - present)

As machines with more and more memory became available, it was possible to extend the idea of multiprogramming (or multiprocessing) as used in spooling batch systems to create systems that wouldload several jobs into memory at once and cycle through them in some order, working on each one for aspecified period of time.

--------------------------------------

| Monitor |

| (more like a operating system) |

--------------------------------------

| User program 1 |

--------------------------------------

| User program 2 |

--------------------------------------

| User program 3 |

--------------------------------------

| User program 4 |

--------------------------------------

At this point the monitor is growing to the point where it begins to resemble a modern operating system.It is responsible for:

starting user jobs spooling operations IO for user jobs switching between user jobs ensuring proper protection while doing the above

As a simple, yet common example, consider a machine that can run two jobs at once. Further, supposethat one job is IO intensive and that the other is CPU intensive. One way for the monitor to allocate CPUtime between these jobs would be to divide time equally between them. However, the CPU would beidle much of the time the IO bound process was executing.

A good solution in this case is to allow the CPU bound process (the background job) to execute untilthe IO bound process (the foreground job) needs some CPU time, at which point the monitor permits itto run. Presumably it will soon need to do some IO and the monitor can return the CPU to the

background job.

Timesharing Systems (1970s - present)

Back in the days of the "bare" computers without any operating system to speak of, the programmer hadcomplete access to the machine. As hardware and software was developed to create monitors, simpleand spooling batch systems and finally multiprogrammed systems, the separation between the user andthe computer became more and more pronounced.

Page 3 of 5CS322: Operating Systems History

8/11/2008http://www.math-cs.gordon.edu/courses/cs322/lectures/history.html

Page 4: Various Types OS

8/14/2019 Various Types OS

http://slidepdf.com/reader/full/various-types-os 4/5

Users, and programmers in particular, longed to be able to "get to the machine" without having to gothrough the batch process. In the 1970s and especially in the 1980s this became possible two differentways.

The first involved timesharing or timeslicing. The idea of multiprogramming was extended to allow formultiple terminals to be connected to the computer, with each in-use terminal being associated with oneor more jobs on the computer. The operating system is responsible for switching between the jobs, now

often called processes, in such a way that favored user interaction. If the context-switches occurredquickly enough, the user had the impression that he or she had direct access to the computer.

Interactive processes are given a higher priority so that when IO is requested (e.g. a key is pressed), theassociated process is quickly given control of the CPU so that it can process it. This is usually donethrough the use of an interrupt that causes the computer to realize that an IO event has occurred.

It should be mentioned that there are several different types of time sharing systems. One type isrepresented by computers like our VAX/VMS computers and UNIX workstations. In these computersentire processes are in memory (albeit virtual memory) and the computer switches between executingcode in each of them. In other types of systems, such as airline reservation systems, a single application

may actually do much of the timesharing between terminals. This way there does not need to be adifferent running program associated with each terminal.

Personal Computers

The second way that programmers and users got back at the machine was the advent of personalcomputers around 1980. Finally computers became small enough and inexpensive enough that anindividual could own one, and hence have complete access to it.

Real-Time, Multiprocessor, and Distributed/Networked Systems

A real-time computer is one that execute programs that are guaranteed to have an upper bound on tasksthat they carry out. Usually it is desired that the upper bound be very small. Examples included guidedmissile systems and medical monitoring equipment. The operating system on real-time computers isseverely constrained by the timing requirements.

Dedicated computers are special purpose computers that are used to perform only one or more tasks.Often these are real-time computers and include applications such as the guided missile mentionedabove and the computer in modern cars that controls the fuel injection system.

A multiprocessor computer is one with more than one CPU. The category of multiprocessor computerscan be divided into the following sub-categories:

shared memory multiprocessors have multiple CPUs, all with access to the same memory.Communication between the the processors is easy to implement, but care must be taken so thatmemory accesses are synchronized.

distributed memory multiprocessors also have multiple CPUs, but each CPU has it's ownassociated memory. Here, memory access synchronization is not a problem, but communicationbetween the processors is often slow and complicated.

Page 4 of 5CS322: Operating Systems History

8/11/2008http://www.math-cs.gordon.edu/courses/cs322/lectures/history.html

Page 5: Various Types OS

8/14/2019 Various Types OS

http://slidepdf.com/reader/full/various-types-os 5/5

Related to multiprocessors are the following:

networked systems consist of multiple computers that are networked together, usually with acommon operating system and shared resources. Users, however, are aware of the differentcomputers that make up the system.

distributed systems also consist of multiple computers but differ from networked systems in that

the multiple computers are transparent to the user. Often there are redundant resources and asharing of the workload among the different computers, but this is all transparent to the user.

$Id: history.html,v 1.3 2000/01/07 17:03:38 senning Exp $ 

These notes are based on a set of notes by Prof. R. Bjork, Gordon College and the textbooks Operating System Concepts by Silberschatz and Galvin,Addison-Wesley, 1998 and Operating Systems: Design and Implementation by Tanenbaum and Woodhull, Prentice-Hall, 1997. 

Page 5 of 5CS322: Operating Systems History

8/11/2008h // h d d / / 322/l /hi h l