Академический Документы
Профессиональный Документы
Культура Документы
UNIT 1: Introduction
Structure
1.0 Objective
1.1 Introduction
1.2 Introduction of Operating System
1.3 Evolution of Operating Systems
1.4 Types of Operating System
1.5 Different views of the Operating Systems
1.6 Summary
1.7 Exercise
1.8 Suggested Readings
1.0 Objective
1.1 Introduction
This chapter will give brief introduction to an Operating System. Introduction will include the
definition of operating system, basic elements an OS compose of, its functions in system, its main
objectives and different types of services OS provides to user and system. After the introduction of
OS, history of evolution of OS will be presented that tells that how an OS has evolve over time to
fulfil users requirement. Then the will cover the concept of different types of operating system
existed or is existing in the environment. This topic main emphasis will be the advantages and
disadvantages of different types of an OS gives to system and user. In the end of the chapter different
views that an OS perceives will be discussed.
Introduction | 2
OS derives benefits from the resources (hardware) of one or more processors to deliver a set
of facilities to users of system. It also administrates the systems secondary memory and
Input/Output (I/O) equipments on the account of its users.
OS is a set of program segments which offers a friendly interface between the computer
resources and user such as memory, processors, I/O devices and information.
An operating system is a software which accomplishes all the basic responsibilities like
memory management, file management, process management, handling of input and output,
and peripheral devices controlling such as printers and disk drives.
Some popular Operating Systems are: Microsoft Windows, mainframe, DOS (Disk Operating
System), OS/2 (Operating System/2, later on developed by IBM exclusively), Linux (Red Hat,
Ubuntu, Fedora etc.), Apple MAC OS (previously known as OS X), VMS (Virtual Memory System),
Chrome OS, OS/400, AIX (Advanced Interactive eXecutive, series of Unix OS), z/OS (Developed by
IBM for IBM Mainframe Computer), AmigaOS etc.
Convenience
System Application
Softwares Softwares
SOFTWARE
Operating System
Efficiency
The secondary goal of an OS involves an efficient system operation. Operating system has
the responsibility to manage the resources. That is the data movement, storing and its
handling. A portion of OS resides in main memory of the system. This includes the Kernel or
nucleus of the system that comprises the most regularly used functions in the operating
system. The remaining main memory consists of other programs and data of users. Operating
system decides that how much time a processor will spend in the execution time of a
program. That is the competent resources utilization.
Ability to Evolve
Operating system ought to be fabricated in such a way that allows the effective advancement
(evolution), testing, and introduction of novel system functions.
Subsequent are some of significant functions of an Operating System as shown in Figure 1.2 and
described below:
Introduction | 4
Memory Management
Processor Management
In multi-programming environment, the OS plays main role. It allocates the processor to the
processes and decides for how much time and when it should be given. This function is
called process scheduling.
5 | Operating System
Device Management
File Management
A file system is generally systematized into directories for easy exploration and usage. These
directories may encompasses other directions and files.
Following are some of the essential activities that an Operating System completes
o Error detecting aids Production of error messages, traces, dumps and other
debugging and error detecting aids.
o Security Achieves by the using PIN, password or similar other techniques. It
avoids unauthorized admission to data and programs.
o Job accounting Keeping track of resources and time used by various users and
jobs.
o Control over system performanceAccounting (storing) delays between demand for
a service and reply from the system.
Introduction | 6
I/O Operations: Each program needs an input and delivers an output. The OS shields some
of the information of the core hardware for such I/O operation. All the user realizes is that the
I/O has been completed, without those particulars.
Communications: There are situations where processes requires to interconnect with each
other for exchange of information. It may be between running processes on the same
computer or processes running on distinct computers. The OS offers these services to
application programs, creating inter-process communication attainable, and releasing the user
from the worry of how this actually accomplished.
File System Manipulation: A file denotes a group of associated information kept under one
roof. Systems can store files on the secondary storage (disk) for long-term storage desire.
Examples of storage media include magnetic disk, magnetic tape and optical disk drives like
DVD, CD. Every media has its individual properties like capacity, data transfer rate, speed
and data access methods.
A file system is usually systematized into directories for easy usage and navigation. These
directories may comprise of files and other directories. Following are the main actions of an
OS with respect to file management
o Program requires to read a file or write a file.
o The OS offers the permission to the program for execution on file.
o Permission differs from read-write, read-only, denied and so on.
o OS gives an interface to the user to make/remove files, make/remove directories and
to create the backup of file system.
Error Detection: Errors can happen anytime and anyplace. An error may befall in CPU, in
the memory hardware or in I/O devices. Following are the key actions of an operating system
with respect to error handling
o The OS continuously checks for possible errors.
o The OS takes a suitable step to safeguard consistent and correct computing.
7 | Operating System
Processor: Processor regulates the process of computer system and completes its data processing
tasks like logic, arithmetic and others.
Primary Memory: Primary memory is also known as main memory, real memory, volatile
memory or temporary memory, because it stores program and its related data provisionally
throughout the processing time only.
Input/Output Modules: Input/Output components interchange data between the computer system
and its external environment like communications equipment, terminals and secondary memory, etc.
System Inter Connection: System inter connection gives more or less a structure and mechanisms
that is used for interaction among main memory, processors and Input/ Output components
(modules).
Batch processing
The technique in which an Operating System gathers the data and programs together in a batch
before starting their processing is known as Batch Processing as shown in Figure 1.4.
Job 1 Batch
Job 2 Batch
OPERATING
SYSTEM CPU
Batch
Job n
The OS outlines a job which has predefined order of instructions, programs and data as a
single unit.
9 | Operating System
The OS retains a number a jobs in memory and does not requires any manual information to
execute them.
Jobs are handled in the sequence of submission, i.e., first come first served fashion.
When a job finishes its execution, its memory is freed and the result for the job gets stored
into an output spool for future processing or printing.
Advantages
Much of the work of the operator is given to the computer in batch processing.
Increased performance: As without any manual intervention, a new job get executed as soon
as the previous job is completed.
Disadvantages
Multitasking
When several jobs are performed by the CPU concurrently by swapping between them is known as
Multitasking as shown in Figure 1.5. Shifting between jobs occur so frequently that the users may
communicate with each program while it is running.
Job 1
Job 2
OPERATING
SYSTEM CPU
Job n
The user receives an immediate response by directly giving instructions to the operating
system or to a program.
The OS tackles multitasking in the way that it can manage multiple operations or executes
multiple programs at a time.
These Operating Systems provides interactive use of a system at a practical cost.
Multitasking Operating Systems also called as Time-sharing systems.
A time-shared operating system uses CPU scheduling concept and multiprogramming to
offer each user with a small slice of a time-shared CPU.
Each user has at least one isolated program in memory.
A process is a program that is loaded into memory and is executing.
When a process executes, it normally executes for only a very small duration of time afore it
either get completed or requires I/O for execution.
Since interactive I/O usually runs at slower speeds, it may complete in long time. During this
time, a CPU can be employed to execute another process.
Only a little CPU time is needed for each user, as each action or command in a time-shared
system tends to be short.
In real one CPU is used by the system in multitasking environment, but it gives an
impression to the user that he/she has his/her own CPU for executing their programs.
Multiprogramming
When two or more programs reside in memory at the same time, the processor is to be shared
among them, then it is referred as multiprogramming. Multiprogramming has a single shared
processor. Through multiprogramming CPU utilization increases as it organizes jobs in such a
manner that CPU always has one job to execute. Figure 1.6 shows the memory layout for a
multiprogramming system.
OPERATING SYSTEM
Job 1
Job 2
.
11 | Operating System
Job n
Empty Space
Advantages
Disadvantages
Interactivity
Interactivity denotes to the capability of users to communicate with a system. An Operating System
does the subsequent activities linked to interactivity
The OS response time needs to be short, since the user waits for the result after the submission.
Introduction | 12
Real-time systems are generally dedicated, embedded systems. An operating system performs the
following activities related to real-time system activity.
In such systems, Operating Systems normally read from and respond to sensor data.
The Operating System must assures that the events executed must get response within fixed
periods of time to ensure correct performance.
Distributed Environment
A distributed environment denotes to several independent CPUs or processors in a computer system.
The following activities are performed by an OS, related to distributed environment
Spooling
Disk
Since devices have different data access rates, it handles I/O device data spooling.
Preserves the spooling buffer which offers a waiting place where data can reside while the
slower device catches up.
Spooling process helps to maintain the parallel computation, hence computer can
implements I/O in parallel fashion. It becomes possible in parallel with computation task to
read data from a tape, write data out to a tape printer or to disk.
Advantages
The evolution of operating systems is straightway reliant on the development and growth of computer
systems and how actually users use them. Here is a rapid visit of computing systems determined in
the past fifty years in the timeline form is described below.
Early Evolution
1945: ENIAC (Electronic Numerical Integrator and Computer): It is the first operational
electronic digital computer in the United States, developed by Army Ordnance (Moore
School of Engineering, University of Pennsylvania) to calculate World War II ballistic firing
tables.
1949: EDSAC(Electronic Delay Storage Automatic Calculator):First full-size stored-
program computer, developed by Maurice Wilkes and others, built at the University of
Cambridge, England to provide a proper computing service for users. And EDVAC
(Electronic Discrete Variable Automatic Computer): It was one of the earliest electronic
computers. In contrast to its antecedent the ENIAC, it was binary rather than decimal, and
was a stored-program system.
1949 BINAC (Binary Automatic Computer): a successor to the ENIAC. It was built by the
Eckert-Mauchly Computer Corporation, the world's first commercial digital computer
system.
1951: UNIVAC (UNIVersal Automatic Computer) developed by Remington.
1952: IBM (International Business Machines Corporation) 701
1956: The interrupt
1954-1957: FORTRAN was developed
By the late 1950s Operating systems were well improved and started supporting following usages:
Program evolution capabilities that reduces the overhead of beginning a new job was added.
After a job terminated abnormally, an error recovery to clean it up was added.
It was capable of single stream batch handling (processing).
For accessing the device it could use standardized, common, input/output routines.
Job controlling languages that allowed users to state the definition of job and requirements
for resource were made possible.
1993 Windows NT
2007: iOS
2008: Android OS
And the research and development work still goes on, with new operating systems being developed
and existing ones being improved to enhance the overall user experience while making operating
systems fast and efficient like they have never been before.
There are several Operating Systems those have been established for execution of the operations
those are demanded by the user. And there are many Operating Systems which have the competence
to accomplish the requirements those are received from the computer system. The Operating system
at a time can perform a single operation and also multiple operations. So based on working
techniques, following are the types of Operating systems classification.
1) Serial Processing
The Serial Processing Operating Systems are those which executes all the commands into a
sequential manner or the instructions those are given by the user will be performed by using the First
in First Out style represented as FIFO. It means that all the instructions those are moving in first in
the environment will be completed foremost and the instructions those are coming later will be
implemented afterwards. The program counter (PC) is used for running all the instructions as shown
in Figure 1.8.
Operating System
The PC actually decides which instruction is going to accomplish first and which instruction will be
executed after this. Punch cards are generally used for this purpose. For this first all the jobs are
organized and stored on the card. After that card is entered in the system and thereafter one by one all
the instructions will be executed. If an error occurs in the program, then it will be halted and the error
conditions are indicated by lights. Programmers examine the registers and main memory to identify
error. If the program is success, then output will appear on the printer. But the main issue is that a
user who is currently working on the system isnt able to interact with the system, means the user
cant enter data for purpose of execution.
Main problem here is the setup time. That is single program needs to load source program into
memory, saving the compiled (object) program and then loading and linking together.
To speed up time of processing, jobs with associated needs are accumulated together in a batch and
executed as a group. Same as serial processing systems it also uses cards for processing the jobs.
Users are not able to interact with the system directly. Thus, the programmers will leave their
programs with the operator. The operator will arrange the programs with similar requirements into
batches as shown in Figure 1.9.The system then one by one execute all the procedures on the
instructions.
User
Batch
job
job
User s
job Computer
OPERATOR
User job
jobs
Batch
job
User
Figure 1.9: Simple Batch Processing OS
For overpowering this problem Spooling Technique is used. Spool is a memory (buffer) that holds
output for a device, such as printer, that cannot admit interleaved streams of data. That is when the
program (job) demands the printer to give the output that output is copied into a system buffer and is
written to the disk. When the job gets finished, the output is finally printed. Spooling technique
allows both the CPU and the I/O devices functioning at much higher rates.
As in Batch Processing System, the computer executes multiple jobs. It first prepare a batch and then
execute that stored batch of jobs. But the main problem is when a job or process requires an I/O
Operation, then it is not possible. Secondly there will be the time wastage while in preparation of the
batch. For that time CPU has to remain idle.
Hence, jobs must be executed sequentially, on a first-come, first-served base. However when several
processes are on a direct-access device like disk, scheduling of job is possible. The main feature
behind job scheduling is to adopt multiprogramming. As a single user cannot retain the CPU or I/O
devices busy at all times. Thus CPU utilization get increases by using multiprogramming concept.
This is when one process needs to pause, the CPU is swapped to another process, and so on.
Eventually, the first process waits gets over when CPU returns back to it as shown in Figure 1.10.
Multiprogramming helps to execute multiple jobs on the system at a time and in this situation CPU
will certainly not get idle. The multiprogramming OS never uses any cards because the process is
entered at instant by the user. But the OS uses the method of memory allocation and memory de-
allocation meaning it is responsible for giving the memory space to all the running and waiting jobs.
There must be the appropriate controlling over all the running jobs.
MAIN MEMORY
Supervisor
CPU
4) Time-Sharing Systems
Multiple jobs are executed by the CPU by switching between them, but the switches occur so
frequently as shown in Figure 1.11. Thus, the user can receives an immediate response. For example,
in a processing a transaction, processor execute each program of user in a short burst or quantum of
computation. That is there are m users existing, each user can be allotted a time period equal to
quantum value. When the user submits the command, the response time is seconds at most.
USER 3 USER 4
CPU
USER 2 USER 5
USER 6
USER 1
5) Parallel Systems
Most systems till date have only one main CPU i.e. they possesses single-processor in the systems.
Multiprocessor systems have more than one processor.
The advantages of parallel system are as follows:
Instructio Data
Control n n Processor n
Stream n Stream
n
Figure 1.12: Parallel System
Introduction | 20
Memory sharing permits the operating system to run very rapidly, but it is generally not as powerful.
Processors have to access both their personal local memory and the other processors memory, when
distributed shared memory is used; this spreading may sluggish the operating system, but it is often
more efficient and flexible.
6) Multiprocessing
Mostly a system has a single processor indicates that a system having just one CPU for handling the
instructions. But if multiple jobs have to be executed, then this speed of the CPU will get decreased.
The speed of processing can be increased by the use of multiprocessing. In the multiprocessing
system two or more CPUs are there in a single operating system such that if one CPU fails, then the
other CPU can provide backup to the first CPU as shown in Figure 1.13. With the help of multi-
processing, one can execute many jobs at a time. All the operations are divided among the number of
CPUs. If first CPU completes the job before the second CPU, then the job of second CPU will be
distributed between the first and second CPU.
MEMORY
Each processor runs same type (copy) of job of the operating system, and these replicas can
communicate with each other as shown in Figure 1.14.UNIX operating system, encore's version is an
example of symmetric model.
E.g., If two processors are joined together by a bus. One is assigned as primary processor and the
other is considered as the backup of the primary. At fixed interval of check points the state
information of each work is copied from the primary machine to the backup that are executing in the
system, If a catastrophe is discovered, the backup copy is activated, and is revived from the latest
checkpoint. But it is costly.
21 | Operating System
Operating System
Operating System
7) Distributed Systems
Distributed data means when data is processed and stored on multiple locations. When a data is
stored on to the several systems, those are placed in different places. Distributed in the network
means, network collections of systems are linked with each other. Then if wants to access some data
from other system, then distributed processing system can be used as shown in Figure 1.16. And
insertion and removal of the data from out location to another location can also be done. In this data
is shared between several users. And all the input and output devices are accessible to multiple users.
Introduction | 22
Processor Processor
Memory Memory
Processor
Processor
Memory
Memory
Distributed systems allocate working of jobs among several processors. In difference to parallel
systems (or tightly- coupled systems), the processors do not share a clock or memory. In its place,
each processor possess its personal local memory space.
The processors share messages with one another processor over various communication lines (such
as telephone lines or high-speed buses). These are denoted as loosely coupled systems or distributed
systems. In a distributed system, processors may differ in size and function. These processors are
stated as nodes, sites and computers and so on.
The benefits of distributed systems are as follows:
Resource Sharing: With facility of sharing a resource, user at one site may be adequate to
use the resources accessible at another.
Communication Speedup: With electronic mail use the speed of exchange of data with one
another can be increased.
Reliability: In a distributed system environment, if one site fails in operation the remaining
sites can potentially continue their operating.
Customers get the better service facility.
Load on the host computer reduces.
Less delays in processing of data.
8) Real-time Systems
In real-time systems, replying (response) time is fixed in previous. Means that the processor or CPU
has fixed the time to display the results after possessing. Real Time System is used in those situations
that involves higher and well-timed response. These sorts of systems are used in reservation. So when
the request is specified, the CPU will execute that request at that time. When there are inflexible time
boundaries for the processor operation or the data flow then real time systems are used. The real-time
systems are used as a device controller that controls the dedicated application. Real-time systems
23 | Operating System
uses real-time operating system that has well-defined, fixed time restrictions or else the system will
fail.
E.g., medical imaging systems, scientific experiments, weapon systems, industrial control systems,
robots, and home-appliance controllers.
There are two kinds of real-time systems:
Hard real-time systems: Hard real-time systems assures that cautious tasks are always
completed on specified time-period i.e. time is fixed and cant be changed at any moments of
the time while processing. Meaning CPU will process the data as it is entered in the system.
In hard real-time systems, there is limitation of secondary storage or data stored in ROM are
missing. In these systems virtual memory is certainly not found.
Soft real-time systems: Soft real time systems are less restraining. At some moments of time
it can be changed. Meaning after giving the command to the CPU, CPU accomplishes the
operation after a microsecond. Cautious real-time jobs are given more priority over other jobs
and preserves the priority till its get completed. Soft real-time systems have limited function
than hard real-time systems.
E.g., Virtual reality, multimedia, advanced scientific projects like planetary rovers undersea
exploration.
Examples of network operating systems include UNIX, Linux, Microsoft Windows Server 2003,
Microsoft Windows Server 2008, Novell NetWare, Mac OS X, and BSD.
The following are the advantages of network operating systems
Designing of an Operating System is done by considering both the users view and the systems
view. Following section discusses the users and system views about Operating System.
The user view of the computer changes as soon as the interface being used changes. Examples are
windows (XP, vista, 7), Linux, Mac OS etc. Most computer users uses a personal computer,
containing of a keyboard, monitor, mouse and system unit. Such a system is intended for one user to
exploit its resources and to make best use ofit while the user is performing. In this circumstance, the
operating system is designed typically for ease of use, with some consideration given to performance
and to resource utilization.
Some users uses a mainframe or minicomputer connected with a terminal. Other users are using the
same system through other terminals. These users share resources and may do the conversation via
information exchange. The operating system is intended to maximize resource utilization by
assuming that all memory, CPU time and I/O available are used efficiently and no single user profits
more than their fair and share.
25 | Operating System
Other users uses the workstations, that are connected to networks of servers and other workstations.
Dedicated resources are with these users at their disposal, however they also share resources such as
servers and networking like file, compute and print server. Here the operating system is designed to
negotiate between resource utilization and individual usability.
Recently, several varieties of handheld computers have come into market. These devices are
generally standalone, used by individual users. Some are attached to networks, either by wires
directly or through wireless modems. Because of interface and power restrictions they execute
comparatively few remote processes. These operating systems are intended generally for individual
usability, but performance per amount of battery life is essential as well.
Some system have slight or no user view. For example, embedded computers in automobiles and
home devices may have numeric keypad, and may turn indicator lights on or off to demonstrate
status, but mostly they and their operating systems are aimed to execute without user interference.
From the system point of view the operating system is the package which is most intermediate with
the hardware. An operating system can be viewed as a resource allocator. A system has several
resources- software and hardware - that may be essential for solving a problem (memory space, CPU
time, I/O devices, file storage space and so on). The operating system behaves as resource manager
for these.
An operating system can too be viewed as a control program. It achieves the execution of user
programs to inhibit errors and inappropriate use of the computer. It is specifically concerned with the
control and operation of I/O devices.
It is a program that executes all the time in the system in the form of Kernel. It also controls
application programs that are not portion of Kernel.
1.6 Summary
An operating system is the low-level software that supports a computer's basic functions, such as
scheduling tasks and controlling peripherals. The principal objective of an OS is to provide
convenience for the system user. The secondary goal of an OS involves an efficient system operation.
Another important objective of OS is memory management. In multi-programming environment, the
OS plays main role. It allocates the processor to the processes and decides for how much time and
when it should be given. Other tasks of the operating system are file management and device
management etc. The following are the basic components of an operating system central processing
unit, storage unit, input unit and the output unit. The central processing unit consists of the control
unit and the arithmetic and logical unit. The technique in which an Operating System gathers the
data and programs together in a batch before starting their processing is known as Batch Processing.
When several jobs are performed by the CPU concurrently by swapping between them, it is known as
Introduction | 26
Multitasking. When two or more programs reside in memory at the same time, then the processor is
shared among them. It is referred to as multiprogramming.
1.7 Exercise
i) In spooling high speed device like a disk is interposed between running program and low-speed
device in Input/output.
ii) By using spooling for example instead of writing directly to a printer, outputs are written to the
disk.
A. i-True, ii-False B. i-True, ii-True C. i-False, ii-True D. i-False, ii-False
4. Which of the following is/are the functions of operating system?
i) Sharing hardware among users.
ii) Allowing users to share data among themselves.
iii) Recovering from errors.
iv) Preventing users from interfering with one another.
v) Scheduling resources among users.
A. i, ii, iii and iv only B. ii, iii, iv and v only
C. i, iii, iv and v only D. All i, ii, iii, iv and v
5. With ................ only one process can execute at a time; meanwhile all other process are waiting
for the processer. With .............. more than one process can be running simultaneously each on
a different processer.
A. Multiprocessing, Multiprogramming B. Multiprogramming, Uniprocessing
C. Multiprogramming, Multiprocessing D. Uniprogramming, Multiprocessing
6. The basic types of OS are ...................
A. batch and time sharing B. sequential and real time
C. direct and interactive D. batch and interactive
27 | Operating System
7. The technique, for sharing the time of a computer among several jobs, which switches jobs so
rapidly such that each job appears to have the computer to itself, is called ...............................
A. time sharing B. time out C. time domain D. multitasking
8. Which technique was introduced because a single job could not keep both the CPU and I/O
devices busy?
A. Time-sharing B. Spooling
C. preemptive scheduling D. Multiprogramming
9. Distributed OS works on the ....................... principle.
A. file foundation B. single system image
C. multi system image D. networking image
10. What is the primary job of the operating system is a computer?
A. Command resources B. Manage resources
C. Provide utilities D. Be user friendly
11. Define OS. Point out the important tasks of OS. Explain them in brief.
12. What are the different types of OS? Explain in brief.
13. What are the basic components of an OS? Draw a neat and labelled diagram to support your
answer.
14. Explain the following terms:
A. Batch processing B. Multiprogramming
C. Multitasking D. Spooling
15. What do you mean by distributed OS? What are its advantage and disadvantages?
16. Differentiate between a users view and the systems view of the OS.
17. With the help of a figure explain in detail the working of a multiprocessing OS.
18. Briefly describe how operating systems have evolved through the years. Give examples to
support your answer.
19. In multiprogramming and time-sharing model, users share same system at same time. This
result in many problems.
a) What are these problems?
b) Explain how can we ensure some security in a time shared system?
20. How Network computers are different from traditional PC? Explain the scenarios where
network computers are advantageous.
Introduction | 28