Вы находитесь на странице: 1из 28

1 | Operating System

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

At the end of this chapter you must know:


What is an Operating System?
What are the objectives and functions performed by Operating System?
Different services given by an OS.
Properties of an OS.
What are the main components of OS?
Types of OS.
Advantages and disadvantages of different OS
History of OS evolution.
What are the different views of Operating Systems?

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

1.2 Introduction of Operating System

An Operating System (OS) can be defined as:

An operating system is a package that behaves as an interface or intermediate between the


user of a computer and the hardware of computer as shown in Figure 1.1.

An Operating System, or OS, is low-level software that permits an interaction of higher-level


application software or a user with a computers hardware and the data and other programs
stored on the system.

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.

An OS accomplishes basic responsibilities, such as taking response from the keyboard,


directing output to the display screen, recording track of directories and files on the disk, and
monitoring peripheral equipments such as printers.

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.

1.2.1 Objectives, Functions and Services of OS

Following are the main objectives of an operating system:

Convenience

The principal objective of an OS is to provide convenience for the system user. If an


application program is considered as a set of machine related commands then OS is entirely
responsible for supervising the hardwares of computer. It is a complex task. To reduce the
task complexity, a set of system programs are given, known as utilities. They carry out the
frequently used purposes which assist in program design, file management and controlling of
I/O equipment.
3 | Operating System

USER 1 USER 2 USER n

System Application
Softwares Softwares
SOFTWARE

Operating System

HARDWARE CPU RAM I/O

Figure 1.1: Operating System Layout

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.

Operating system will develop over time because of various reasons:


o Upgradation in hardware or new kinds of hardware. For example, observe numerous
applications at the same time through windows.
o Addition of new services in form of new measurement and control tools.
o Fixation of faults: error discovered after release requires fixes. Patches are released.

Subsequent are some of significant functions of an Operating System as shown in Figure 1.2 and
described below:
Introduction | 4

Memory Management

Management of Main Memory or Primary Memory is referred ass memory management in


OS. Primary memory is a place where each word or byte (stored in form of large array) has
its own address. Primary memory affords a fast storage that can be retrieved directly by the
CPU. For a program to be implemented, then it must be placed in the primary memory.

An Operating System does the subsequent actions for management of memory


o Keeps footpaths of main memory, i.e., which part of it is used by whom and which
part of it is free (not in use).
o In multi-programming, the operating system selects which process will get the
memory: when and how much.
o Memory is allocated to a process, when it requests to do so.
o When a process no longer needs the memory or has been terminated, then it de-
allocates the memory.

Figure 1.2: Functions of Operating System

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

Following activities are performed by operating system for processor management


o Keeps tracks of status of process and the processor. Traffic controller is the program
that is responsible for this task.
o Allocates the CPU (processor) to a process.
o When a process is no longer required, it de-allocates processor from it.

Device Management

An Operating System accomplishes device management task based on communication of


devices through their respective drivers.

Device management is achieved by performing the following activities


o All devices tracks are recorded. I/O controller is the program responsible for this
task.
o It decides which process should get the device, when and for how much time.
o Allocates the devices to process in the efficient way.
o De-allocates devices after use from process.

File Management

A file system is generally systematized into directories for easy exploration and usage. These
directories may encompasses other directions and files.

For file management, an Operating System does the following activities


o Keeps track of location, information, status, uses etc. The combined services are
sometime known as file system.
o Resolves the issue of resource allocation.
o Allocates the resources.
o De-allocates the resources.

Other Important Activities

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

o Coordination between other Softwares and users Coordination and assignment of


assemblers, interpreters, compilers and other software to the various managers
(users) of the computer systems.

Following are the few services given by OS are:

Program Execution: An environment is offered by OS where the user can appropriately


execute the programs. The user does not have to get concern about other background related
activities like CPU scheduling, memory allocation etc. All this is taken care by the operating
system.

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

Resource Allocation: In case of multi-tasking or multi-user environment, resources such as


main memory, files storage and CPU cycles are to be assigned to each user or job. The major
activities of an operating system with respect to resource management are as follows
o All kinds of resources are handled by the OS using schedulers.
o For better utilization of CPU, scheduling algorithms are used.

Protection: If a computer system have multiple users with concurrent implementation of


multiple processes, the several processes must be protected from each other's actions.
Protection denotes to a procedure or a way to control the accessing of programs, processes,
or users to the resources defined by a system. The main activities of an operating system with
respect to protection are as follows
o The OS confirms that all access to system resources is controlled.
o The OS make sure that external I/O devices are safe from invalid access efforts.
o The password as a mean of authentication features is given to each user by the
operating system.

1.2.2 Basic Elements

OS includes the following basic components as shown in Figure 1.3:

Figure 1.3: Basic components of Operating System


Introduction | 8

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).

1.2.3 Properties of an Operating System

Following are the properties of Operating System:

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

Figure 1.4: Batch processing of jobs

An operating system performs the following events related to batch processing

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

Debugging of a program is difficult task.


A job could go into an infinite loop.
One batch job can affect pending jobs due to lack of protection scheme.

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

Figure 1.5: Multitasking of Jobs


Introduction | 10

An OS performs following activities associated to multitasking

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

Figure 1.6: Memory layout for multiprogramming

Following activities related to multiprogramming are done by an OS.

Several jobs are kept by OS in memory at a time.


This jobs-set is a part of the jobs preserved in the job pool.
The operating system picks and starts execution of one of the jobs from the memory.
Multiprogramming operating systems observes the state of all active programs and system
resources utilizing memory management programs to confirm that the CPU never remains
idle, except that when there are no jobs to execute.

Advantages

High and efficient CPU utilization.


User feels that many programs are assigned CPU nearly concurrently.

Disadvantages

CPU scheduling is needed.


Memory management is required, to accommodate many jobs in memory.

Interactivity

Interactivity denotes to the capability of users to communicate with a system. An Operating System
does the subsequent activities linked to interactivity

Provides the user an interface to communicate with the system.


Manages input/output devices to take/show inputs/outputs from/to the user. For example,
keyboard/monitor.

The OS response time needs to be short, since the user waits for the result after the submission.
Introduction | 12

Real Time System

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

The OS issues computation logics amongst several physical processors.


The OS take cares of the interactions between the processors. They interact with each other
through several communication lines.
The processors do not share a clock or memory. In its place, each processor possess its own
local memory.

Spooling

Spooling is an abbreviation given to simultaneous peripheral operations on line. Spooling refers to


keeping data of various I/O jobs in a buffer. This buffer is a special area in hard disk or memory
which is available to I/O devices as shown in Figure 1.7.

Disk

Card Reader Memory Printer

Figure 1.7: Spooling technique

The following are the activities related to distributed environment performed by an OS


13 | Operating System

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

A disk is used as a very large buffer in the spooling operation.


Spooling is capable of overlapping processor operations of one job with I/O operation for
another job.

1.3 Evolution of Operating System

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

Operating Systems by the late 1950s


Introduction | 14

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.

Operating Systems in 1960s

1961: The beginning of minicomputers era.


1962: Compatible Time-Sharing System (CTSS) from MIT
1963: Burroughs Master Control Program (MCP) for the B5000 system
1964: IBM System/360
1960s: Disks become mainstream
1966: Minicomputers get inexpensive, more influential, and really beneficial.
1967-1968: The mouse
1964 and onward: Multics
1969: The UNIX Time-Sharing System from Bell Telephone Laboratories

Supported OS Features by 1970s

Introduction to Multi User and Multi-tasking concept.


Virtual machines and dynamic address translation hardware arose into picture.
Presence of modular architectures came into picture.
Personal, interactive systems came into existence.

Accomplishments after 1970

1971: Intel announces the microprocessor


1972: IBM comes out with VM: the Virtual Machine Operating System
1973: UNIX 4th Edition is published
1973: Ethernet
1974 The Personal Computer Age begins
1974: Gates and Allen wrote BASIC for the Altair
1976: Apple II
August 12, 1981: IBM introduces the IBM PC
1983 Microsoft begins work on MS-Windows
1984 Apple Macintosh comes out
1990 Microsoft Windows 3.0 comes out
1991 GNU/Linux
1992 The first Windows virus comes out
15 | Operating System

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.

1.4Types of Operating System

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.

Application 1 Application 2 Application 3 Application 4

Operating System

All Processes CPU Assigned Process

Figure 1.8: Single Processing OS


Introduction | 16

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.

2) Simple Batch Systems

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

The problems with Batch Systems are:

Absence of communication between the user and job.


Interval will be wasted for preparation of batches.
Idle CPU condition often occurs, because the mechanical I/O devices speeds are slower in
comparison to CPU speed.
The processing speed of the job depends on the jobs and the results that are produced by the
system.
17 | Operating System

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.

3) Multi-programmed Batch Systems

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

Writing data on Disk Job A


SECONDARY
STORAGE Job B
DEVICE I/O Operation
Job C

(Waiting for the


Job B is in CPU Time)
execution

CPU

Figure 1.10: Multi-programmed Batched Systems


Introduction | 18

4) Time-Sharing Systems

A logical extension of multiprogramming is time-sharing or multitasking. That is time of processor is


pooled among several users at the same time is called time-sharing. Time-sharing is a method which
allows several users, situated at different terminals, to use a specific computer system at the same
time. The main difference between multi-programmed batch systems and time-sharing systems is in
multi-programmed batch systems its objective is maximize processor use, whereas in time-sharing
systems its objective is minimize response time.

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

Figure 1.11: Time sharing Systems


Operating system uses multiprogramming and CPU scheduling to offer each user with a small slice
of a time. Computer systems that were intended primarily to perform as batch systems have been
revised to time-sharing systems.
For example IBM's OS/360. Complexity of time-sharing operating systems are even more than multi-
programmed operating systems. As in multiprogramming, numerous jobs must be retained
concurrently in memory.
Advantages of time-sharing operating systems are as following
Offers the benefit of quick reply.
Avoids replication of software.
Decreases CPU idle time.
19 | Operating System

Disadvantages of Time-sharing operating systems are as following


Reliability problem.
Security and integrity of user programs and data is a question.
Data communication problem may occur.

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:

Increase in throughput (Amount of jobs to complete in a time period)


Money saving by sharing cabinets, peripherals and power supplies
Reliability increases
Fault-tolerant (Catastrophe of one processor will not terminate the system).
Multiple networked computers are interfaced by using parallel operating systems so that parallel
processing of the tasks can be achieved. UNIX-based platform architecture is often adopted for
software that permits to organize loads distribution between numerous computers in a network.
Parallel operating systems are capable of using software that manages all of the different resources of
the system running in parallel, such as caches, memory, processing power and storage space. Parallel
operating systems too allow users that they can directly integrate with all of the other systems in the
network.
A parallel operating system mechanizes its calculations by dividing them into smaller parts and
issuing them between the computers on a network as shown in Figure 1.12. To enable interaction
between the memory arrays and processor cores, software that is routing has to either share its
memory by allocating the same address space to all of the computers networked, or dispense its
memory by allocating a different address space to each processing core.
Instructio Data
Control 1 n Processor 1
Stream 1 Stream
1
Instructio Data
Control Processor Shared
n
2 Stream 2 2 Stream
Memory
2

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.

CPU0 CPU1 CPU2

registers registers registers

cache cache cache

MEMORY

Figure 1.13: Multiprocessing OS

Symmetric multiprocessing model

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

User User User User

Operating System

CPU CPU CPU CPU

Figure 1.14: Symmetric Multiprocessing System

Asymmetric multiprocessing model


In asymmetric model, each processor is allocated a particular job as shown in Figure 1.15. A
controlling processor (master) controls the system. Sun's operating system, version 4 SunOS is an
example of asymmetric multiprocessing. Personal system keyboard contains a microprocessor that
converts the key strokes into codes to be directed to the CPU.

User User User User

Operating System

CPU CPU CPU CPU


All I/O

Interrupts Figure 1.15: Asymmetric Multiprocessing 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

Figure 1.16: Distributed System

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.

9) Network operating System


A Network Operating System runs on a server and offers the server the skill of managing the data,
security, users, groups, applications and other functions of networking as shown in Figure 1.17. The
principal objective of the network operating system is to permit shared file and printer access among
multiple systems in a network, normally on a private network, a local area network (LAN) or to
other networks.

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

Stability as centralized servers are highly stable.


The server manages the security.
Upgradation to new technologies and hardware can be easily incorporated into the system.
Use of servers from remote areas is possible from different locations and types of systems.
Introduction | 24

Figure 1.17: Networking OS

The following are the disadvantages of network operating systems

High cost is involved in buying and running a server.


Dependence on a centralized location for several operations.
Regular updates and maintenance is required.

1.5 Different views of the 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.

1.5.1 User View

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.

1.5.2 System View

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

1. Multiprogramming of computer system increases


A. memory B. storage C. CPU utilization D. cost
2. Main memory of computer system is also called

A. non-volatile B. volatile C. reserved D. large


3. State True or False.

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

1.8 Suggested Readings

1. Operating System Concepts by Abraham Silberschatz, Peter B. Galvin, Greg Gagne,Wiley.


2. Operating Systems: Internals and Design Principles by William Stallings, Pearson.

Вам также может понравиться