0% found this document useful (0 votes)
18 views

UNIT - I

Uploaded by

NTR Thor OP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

UNIT - I

Uploaded by

NTR Thor OP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

UNIT – I

Chapter – 1
Introduction to Operating System

Describe evolution of operating system.


Generations of operating system
1. The 1940's - First Generations
2. The 1950's - Second Generation
3. The 1960's - Third Generation
4. The 1980’s-The Fourth Generation
First generation 1945 – 1955 - vacuum tubes, plug boards:
The earliest electronic digital computers had no operating systems. Machines of the time were
soprimitive that programs were often entered one bit at time on rows of mechanical switches (plug
boards).
Programming languages were unknown (not even assembly languages).
The 1950's - Second Generation:
Second generation 1955 – 1965 - transistors, batch systems. 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:
Third generation 1965 – 1980 - ICs and multiprogramming. 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 from job to job as needed to
keep
several jobs advancing while keeping the peripheral devices in use.
The Fourth Generation Fourth generation 1980:
Present personal computers 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 that it becomes possible to build desktop computers
as
powerful as the mainframes of the 1970s.
OR
Description of batch, Multi programmed Multitasking, Timesharing, Desktop,
Distributed Systems, Clustered System, Real Time system.
Batch Systems: Main function of a batch processing system is to automatically keep executing the
jobs in
a batch.
Multiprogramming: It executes multiple programs simultaneously by a single processor.
Multitasking: Multitasking is a logical extension of multiprogramming. Multiple jobs are executed
by
the CPU switching between them, but the switches occur so frequently that the users may interact
with
each program while it is running.
Time-Sharing Systems–Interactive Computing: In time sharing system, the CPU executes multiple
jobs
by switching among them.
Desktop Systems: Personal computers – computer system dedicated to a single user.
Distributed system: Distributed system or distributed data processing is the system in which
processors,
data and other aspects of a data processing system may be dispersed within on organization.
Clustered system: It is a group of connected computers working together as one unit.
Real Time system: A Real Time system is used when there are rigid time requirement on the
operation of
a processor or the flow of data and thus is often used as a control device in a dedicated application.

List characteristics of operating system for smooth functioning of a computer –


system.

1. It provides user interface in the form of command line interface (CLI), batch
interface and graphical user interface (GUI).
2. It supports program execution by loading the contents of program file into memory.
3. System provides I/O resources that may include files and I/O devices required by a
running program.
4. It supports file-system manipulation. There are many operations that are performed
for file creation, deletion, allocation, and naming.
5. It performs communications by message passing between systems that require
messages to be turned into packets of information, sent to the net-work controller,
transmitted across a communications medium, and reassembled by the destination
system.

6. It supports error detection: Error detection occurs at both the hardware and software
levels. At the hardware level, all data transfers must be inspected to ensure that data
have not been corrupted in transit. At the software level, media must be checked for
data consistency.
7. Computer system supports accounting of computers that keep track at which users
use how much and what kind of computer resources.
8. System allocates and deallocates resources to the process. When there are multiple
users or multiple jobs running at the same time, resources must be allocated to each of
them code.
9. It provides protection and security for owners of information stored in multiuser or
networked computer system may want to control use of the information in the form of
password or access permissions.

Describe 2nd and 3rd generation of operating system.


Second generation: 1955-1965
Around 1955, transistors were introduced. The transistor was far superior to
the vacuum tube, allowing computers to become smaller, faster, cheaper,
more energy-efficient and more reliable than their first-generation
predecessors. Second-generation computers relied on punched cards for input
and printouts for output. Assembly language which allowed programmers to
specify instructions in words, introduced as second generation Language
Then IBM-7094-a faster and larger computer came into picture. In that, control
cards were in use. In this system, cards were arranged as a stack to save CPU
time. All these cards were then read one by one and copied onto a tape using
a ‘card to tape’ utility program. The prepared tape was taken to the main
computer and processed.
Technology used: Transistor
Memory: Magnetic core technology
Programming: Assembly level language
Example: IBM-1401, IBM-7094, IBM 1620, CDC 3600
Advantages:
Smaller in size as compared to first generations computers.
More reliable.
Less heat generated as compared to first generation machine.
These computers were able to reduce computational times from
milliseconds to microseconds.
Better portability.
Wider commercial use.
Less prone to hardware failure.
Other components are invented like printers, tape storage, memory,
OS, stored program.
less expensive than vacuum tube
Magnetic disk and magnetic tapes used as secondary storage devices.
High level languages such as FORTRAN, COBOL, ALGOL were used for
programming.
Third generation: 1965-1980
Third generation came with introduction of Integrated Circuits(IC). Transistors
were placed on silicon chips, called semiconductors, which drastically
increased the speed and efficiency of computers. With ICs, the cost and the size
of the computer reduced and the performance improved. 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 from
job to job as needed to keep jobs advancing while keeping the peripheral
devices in use.
Technology used: Integrated Circuits
Memory: Disk
Programming: Job Control Language
Example: IBM 360 mainframe, IBM-370, PDP-8, VAX 750
Advantages:
Smaller in size as compared to previous.
More reliable and easily portable.
Lower heat generated the second-generation computers.
Reduce computational times from microseconds to nanoseconds.
Maintenance cost is low because hardware failure is rare.
Widely used for various commercial applications all over the world.
Less power requirement.
Commercial production was easier and cheaper.
language used are BASIC (Beginners all-purpose symbolic instruction
code), PASCAL, RPG (Report Program Generator)
Keyboard used as input and VDU used as output devices.
Capable of multiprogramming.
Increase Processing Speed
List and draw a neat labelled diagram of four components of a computer system

A computer system can be divided into four components:


1) The hardware.
2) The operating system
3) Application programs
4) The users

A clustered system is a collection of connected computers working together as one unit. In this
system, any member of the cluster is capable of supporting the processing functions of any other
member. Each computer in a cluster is referred to as a node.
Characteristics:-
Clustering allows two or more system to share storage closely linked via a local area network.
A cluster has a redundant n+k configuration, where n processing nodes are actively processing the
application and k processing nodes are in a standby state, serving as peers. In the event of a failure of
an active node, the application that was running on the failed node is moved to one of the standby
nodes. The simplest redundant configuration is active/standby, in which one node is actively
processing the application and the other node is in a standby state.
Other common cluster configurations include simplex (one active node, no spare), n+1 active
nodes (n active nodes, 1 spare), and nactive nodes. In a configuration with n active nodes, the
applications from the failed node are redistributed among the other active nodes using a pre-specified
algorithm.
It provides excellent fault tolerance.

Describe first generation of operating system with its advantages and disadvantages.

With neat diagram, explain real time system. List its any four application.

A real time system has well defined fixed time constraints. Processing should be done
within the Defined constraints.
Types of real time system
Hard and Soft real time system.

Satellite Application of real time OS: Satellite application of real time OS The satellite
connected to the computer system sends the digital samples at the rate of 1000 samples
per second. The computer system has an application program that stores these samples in a file. The
sample sent by the satellite arrives every millisecond to the application. So computer must store or
respond the sample in less than 1 millisecond. If the computer does not respond to the sample within
this time, the sample will lost.
Applications:
1. Flight Control System
2. Simulations
3. Industrial control
4. Military applications
Disadvantages:
The computers were very larger in size
They consumed a large amount of energy.
They heated very soon due to thousands of vacuum tubes.
They were not very reliable.
Air conditioning is required.
Constant maintenance was required.
Not-portable.
Costly commercial production.
Very slow speed.
Limited programming capabilities.
Used machine language only.
Used punch card for input.
Not versatile and less accurate.

Explain multiprocessor system and its two types.


Multiprocessor Systems:
Multiprocessor systems with more than on CPU in close communication.
Tightly coupled system – processors share memory and a clock; communication usually takes
Place through the shared memory.

Symmetric multiprocessing (SMP):


Each processor runs and identical copy of the operating system.
Many processes can run at once without performance deterioration.

Most modern operating systems support SMP


Asymmetric multiprocessing:
Each processor is assigned a specific task; master processor schedules and allocated work to slave
processors.
More common in extremely large systems.

Explain multiprogrammed O.S with suitable diagram.


Multiprogramming is a rudimentary form of parallel processing in which several programs are run at
the same time on a uniprocessor. Since there is only one processor, there can be no true simultaneous
execution of different programs. Instead, the operating system executes part of one program, then
part of another, and so on. To the user it appears that all programs are executing at the same time.
Why Multiprogramming?
Multiprogramming needed for efficiency:
• Single user cannot keep CPU and I/O devices busy at all times.

Multiprogramming organizes jobs (code and data) so CPU always has one to execute.
• A subset of total jobs in system is kept in memory.
• One job selected and run via job scheduling.
• When it has to wait (for I/O for example), OS switches to another job.

Multiprogramming is a technique used to utilize maximum CPU time by running multiple programs
simultaneously. The execution begins with the first program and continues till an instruction waiting
for a peripheral is reached, the context of this program is stored, and the second program in memory
is given a chance to run. The process continued until all programs finished running.
Multiprogramming has no guarantee that a program will run in a timely manner. Usually on a
mainframe - the computer has a number of programs loaded into memory and the operating system
switches quickly between them, processing a little bit of each one in turn. The high speed of the
processor makes it seem like more than one program is being run at the same time. On a PC it is
usually called multitasking. If the machine has the capability of causing an interrupt after a specified
time interval, then the operating system will execute each program for a given length of time, regain
control, and then execute another program for a given length of time, and so on. In the absence of
this mechanism, the operating system has no choice but to begin to execute a program with the
expectation, but not the certainty, that the program will eventually return control to the operating
system. If the machine has the capability of protecting memory, then a bug in one program is less
likely to interfere with the execution of other programs. In a system without memory protection, one
program can change the contents of storage assigned to other programs or even the storage assigned
to the operating system. The resulting system crashes are not only disruptive, they may be very
difficult to debug since it may not be obvious which of several programs is at fault. If memory can
hold several programs, then CPU can switch to another one whenever a program is awaiting for an
I/O to complete.

Explain Time sharing OS in detail.


time sharing system, the CPU executes multiple jobs by switching among them. The switches occur
so frequently that the users can interact with each program while it is running. It includes an
interactive computer system which provides direct communication between the user and the system.
A time sharing system allows many users to share the computer resources simultaneously. The time
sharing system provides the direct access to a large number of users where CPU time is divided
among all the users on scheduled basis. The operating system allocates a time slice to each user.
When this time is expired, it passes control to the next user on the system. The time allowed is
extremely small and the users are given the impression that each of them has their own CPU and they
are the sole owner of the CPU. In this time slice each user gets attention of the CPU. The objective of
time sharing system is to minimize response time of process.
Example:-
The concept of time sharing system is shown in figure:

In above figure, the user 5 is active but user 1, user 2, user 3, and user 4 are in waiting state whereas
user 6 is in ready status.

List Advantages and Disadvantages of Batch Monitoring functions.


Advantages of batch systems:-
● Grouping the jobs in batch reduce the time required for loading system setup for execution of each
job.
● No need of special hardware and system support to input data in batch systems.
● Best for large organizations but small organizations can also benefit from it.
● Batch systems can work offline so it makes less stress on processor.
● Processor consumes good time while processing that mean it knows which job to process next. In
real time systems we don‟t have expectation time of how long the job is and what is estimated time
to complete it. But in batch systems the processor knows how long the job is as it is queued.
● Sharing of batch system for multiple users.
● The batch systems can manage large repeated work easily.

Disadvantages of batch processing systems


● Computer operators must be trained for using batch systems.
● It is difficult to debug batch systems.
● Batch systems are sometime costly.
● If some job takes too much time i.e. if error occurs in job then other jobs will wait for unknown
time.

Explain Real Time Operating System. Explain its types


Real time system has well defined fixed time constraints. Processing should be
done within the Defined constraints. A primary objective of real-time systems
is to provide quick event response time and thus meet the scheduling
deadlines. User convenience and resource utilization are of secondary concern
to real-time system designers. In Real time systems, processor is allocated to
the highest priority process among those that are ready to execute. Higher
priority processes preempt execution of the lower priority processes. This form
is called as ‘priority–based preemptive scheduling’.
The primary functions of the real time operating system are to:
Manage the processor and other system resources to meet the
requirements of an application.
Synchronize with and respond to the system events.
Move the data efficiently among processes and to perform
coordination among these processes.
Types of real time system:
1. Hard Real Time: - Hard real time means strict about adherence to each task
deadline. When an event occurs, it should be serviced within the predictable
time at all times in a given hard real time system.
Example: Video Transmission, each picture frame and audio must be
transferred at fixed rate.
2. Soft Real Time: Soft real time means that only the precedence and sequence
for the task operations are defined, interrupt latencies and context switching
latencies are small. There can be few deviations between expected latencies of
the tasks and observed time constraints and a few deadline misses are
accepted.
Example: Mobile phone, Digital Cameras and orchestra playing robots.
Describe Multiprocessor Operating System with its two advantages
Multiprocessor systems are also known as parallel systems or tightly coupled
systems. These systems have two or more processors in close communication
and they share computer resources such as bus, clock, memory and peripheral
devices.
The whole task of multiprocessing is managed by the operating system, which
allocates different tasks to be performed by the various processors in the
system. Applications designed for the use in multiprocessing are said to be
threaded, which means that they are broken into smaller routines that can be
run independently. This allows the operating system to let these threads run
on more than one processor simultaneously, which is multiprocessing that
results in improved performance. Generally, the parallel processing is used in
the fields like artificial intelligence and expert system, image processing,
weather forecasting etc.

Advantages:
Increased throughput: Increase in number of processors requires less
time for more work. Number of processes completing their task for a
particular duration is more.
Economy of scale: Cost is less than multiple single processor systems.
If several programs operate on the same set of data, then it is cheaper
to store those data on one disk and to have all the processors share
them.
Increase reliability: Functions can be distributed properly among
several processors and then the failure of one processor will not halt
the system.
Explain distributed Operating System with advantages and disadvantages
A distributed system consists of a collection of autonomous
computers, connected through a network and distribution
middleware, which enables computers to coordinate their activities
and to share the resources of the system, so that users perceive the
system as a single, integrated computing facility.
In such system the processors do not share memory or a clock;
instead each processor has its own local memory.
In such systems, if one machine or site fails the remaining sites can
continue operation.
So these types of systems are the reliable systems.
The processors communicate with one another through various
communications lines, such as a high speed buses or telephone lines.
These systems are usually referred to as Loosely Coupled Systems or
Distributed Systems
The structure shown in figure contains a set of individual computer
systems and workstations connected via communication systems.
By this structure we cannot say it is a distributed system because it is
the software, not the hardware, that determines whether a system is
distributed or not.
The users of a true distributed system should not know, on which
machine their programs are running and where their files are stored.

Advantages:
With resource sharing facility, a user at one site may be able to use
the resources available at another.
Speedup the exchange of data with one another via electronic mail.
If one site fails in a distributed system, the remaining sites can
potentially continue operating.
Better service to the customers.
Reduction of the load on the host computer.
Reduction of delays in data processing.
Disadvantages:
Security problem due to sharing
Some messages can be lost in the network system
Bandwidth is another problem if there is large data then all network
wires to be replaced which tends to become expensive
Overloading is another problem in distributed operating systems
If there is a database connected on local system and many users
accessing that database through remote or distributed way, then
performance become slow
The databases in network operating is difficult to administrate then
single user system
Describe multiprogramming and multitasking.
Multiprogramming: In multiprogramming, more than one program lies in the memory.
The scheduler selects the jobs to be placed in ready queue from a number of programs. The
ready queue is placed in memory and the existence of more than one program in main
memory is known as multiprogramming. Since there is only one processor, there multiple
programs cannot be executed at a time. Instead the operating system executes part of one
program, then the part of another and so on. Example of multiprogramming: user can open
word, excel, access and other applications in a system.

Multitasking:
A multitasking operating system is any type of system that is capable of running more than
one task at a time. It also maintains the synchronization between I/O devices and processes
so that user can use different application in background and current application in
foreground. In multitasking the resources are made continuously working. The CPU
switches from one task to another for reading and processing. Thus idle time of peripherals
gets reduced. In multitasking Operating System the code as well as data of several
processes is stored into main memory. For example, when you are printing a document of
100 pages, you can do other jobs like typing a new document. So, more than one task is
performed.
Explain time sharing operating system and state its advantages and disadvantages.
The main idea of time sharing systems is to allow a large number of users to interact
with a single computer system concurrently. In time sharing system, the CPU executes
multiple jobs by switching among them. The switches occur so frequently that the users
can interact with each program while it is running.
A time sharing system allows many users to share the computer resources
simultaneously. Since each action or command in a time shared system tends to be short,
only a little CPU time is needed for each user. As the system switches rapidly from one
user to the next, each user is given the impression that the entire computer system is
dedicated to his use, even though it is being shared among many users. The time sharing
systems were developed to provide an interactive use of the computer system.
Most time sharing systems use time-slicing (Round Robin) scheduling. A program
executing longer than the system defined time slice is interrupted by the operating system
and place at the end of the queue of waiting programs for execution.

In above figure the user 5 is active but user 1, user 2, user 3, and user 4 are in waiting state
whereas user 6 is in ready status. As soon as the time slice of user 5 is completed, the
control moves on to the next ready user i.e. user 6. In this state user 2, user 3, user 4, and
user 5 are in waiting state and user 1 is in ready state. The process continues in the same
way and so on.
Advantages of Time Sharing System
Each user can get CPU time.
Efficient CPU utilization.
Time sharing systems were developed to provide interactive use of a computer
system at a reasonable cost.
A time shared operating system uses CPU scheduling and multi programming to
provide each user with a small portion of a time-Shared Computer.
Disadvantages of Time Sharing System:
The time-shared systems are more complex than the multi-programming systems.
Context switching occurs frequently. i.e. Multiple processes are managed
simultaneously which requires an adequate management of main memory so that
the processes can be swapped in or swapped out within a short time.

Explain distributed system in detail.


Adistributed system consists of a collection of autonomous computers, connected
through a network and distribution middleware, which enables computers to coordinate
their activities and to share the resources of the system, so that users perceive the system
as a single, integrated computing facility.
In such system the processors do not share memory or a clock; instead each processor has
its own local memory. In such systems, if one machine or site fails the remaining sites
can continue operation. So these types of systems are the reliable systems. The
processors communicate with one another through various communications lines, such as
a high speed buses or telephone lines. These systems are usually referred to as Loosely
Coupled Systems or Distributed Systems.

The structure shown in figure contains a set of individual computer systems and
workstations connected via communication systems. By this structure we cannot say it is a
distributed system because it is the software, not the hardware, that determines whether a
system is distributed or not. The users of a true distributed system should not know, on
which machine their programs are running and where their files are stored.
Describe real time system. State any one example of its application.
A real time system has well defined fixed time constraints. Processing should be done
within the defined constraints.
A primary objective of real-time systems is to provide quick event response time and thus
meet the scheduling deadlines.
Types of real time system:
1. Hard real time:-Hard real time means strict about adherence to each task deadline.
When an event occurs, it should be serviced within the predictable time at all times in a
given hard real time system.
2. Soft real time:-Soft real time means that only the precedence and sequence for the task
operations are defined, interrupt latencies and context switching latencies are small.
There can be few deviations between expected latencies of the tasks and observed time
constraints and a few deadline misses are accepted.
Example – Flight Control System
All tasks in that system must execute on time.
Example: Satellite application of real time OSThe
satellite connected to the computer system sends the digital samples at the rate of 1000
samples per second. The computer system has an application program that stores these
samples in a file. The sample sent by the satellite arrives every millisecond to the
application. So computer must store or respond the sample in less than 1 millisecond. If the
computer does not respond to the sample within this time, the sample will lost. Some of the
examples of Real time systems are: A web server, A word processor, An audio/video
media center, A microwave oven, A chess computer.
Define UNIX operating system.
Unix is a portable, multitasking, multiuser, time sharing operating system originally developed in
1969 by a group of employees at AT& T.
The Unix operating system is a set of programs that act as a link between the computer and the
user. The computer programs that allocate the system resources and coordinate all the details of
the computer's internals is called the operating system or the kernel.
Users communicate with the kernel through a program known as the shell. The shell is a
command line interpreter; it translates commands entered by the user and converts them into a
language that is understood by the kernel

Explain the features of UNIX operating system.


Features of UNIX are:
1. Multiuser capability: In multiuser system, the same computer resources that is hard disk, memory
etc.
is accessible to many users. The users are given separate terminals from where they can operate. All
terminals are connected to the main computer whose resources are shared by all users. Such a step is
economical, when a data needs to be shared among multiple users.
2. Multitasking capability: UNIX supports multitasking; it means that it can do multiple tasks at the
same time. It uses the technique of background and foreground processes to achieve multitasking.
For
example: A user is listening to the music and also typing a program when the music is playing. The
CPU
time is shared among multiple processes.
3. Communication: UNIX has excellent support for networking because of which the users of UNIX
can
easily exchange information even when they are geographically apart.
4. Security: UNIX has three provisions for protecting data. First can be assigning login ID and
password.
Second can be by granting permissions to the file. Third is files can be encrypted.
5. Portability: UNIX can be ported to almost any computer architecture because it is coded in ‘C’.
Describe real time system and state any two example of its application.
Real time system has well defined fixed time constraints. Processing should be done within the
Defined
constraints. A primary objective of real-time systems is to provide quick event response time and
thus
meet the scheduling deadlines. User convenience and resource utilization are of secondary concern to
real-time system designers. In Real time systems, processor is allocated to the highest priority
process
among those that are ready to execute. Higher priority processes preempt execution of the lower
priority
processes. This form is called as ‘priority –based preemptive scheduling’.
The primary functions of the real time operating system are to:
1. Manage the processor and other system resources to meet the requirements of an application.
2. Synchronize with and respond to the system events.
3. Move the data efficiently among processes and to perform coordination among these
processes.
Types of real time system:
1. Hard real time:-
Hard real time means strict about adherence to each task deadline. When an event occurs, it should
be serviced within the predictable time at all times in a given hard real time system.
Example: -video transmission, each picture frame and audio must be transferred at fixed rate.
2. Soft real time:-
Soft real time means that only the precedence and sequence for the task operations are defined,
interrupt latencies and context switching latencies are small. There can be few deviations between
expected latencies of the tasks and observed time constraints and a few deadline misses are
accepted.
Example: - Mobile phone, digital cameras and orchestra playing robots.
Satellite Application of real time OS: Satellite application of real time OS The satellite connected to
the
computer system sends the digital samples at the rate of 1000 samples per second. The computer
system
has an application program that stores these samples in a file. The sample sent by the satellite arrives
every millisecond to the application. So computer must store or respond the sample in less than 1
millisecond. If the computer does not respond to the sample within this time, the sample will lost.

Applications:
1. Flight Control System
2. Simulations
3. Industrial control
4. Military applications
Explain Batch Monitoring functions. 4
A batch operating system normally reads a stream of separate jobs (from a card reader. For
example,), each with its own control cards that predefine to prevent errors and improper use of
the computer. It is concerned with the operation and control if I/O devices.
A batch system is one in which jobs are bundled together with the instruction necessary to allow
them to be processed without intervention. Often jobs of a similar nature can be bundled together
to further increase economy.
Common input devices were card readers and tape drives. The basic physical layout of the
memory of batch job computer is shown in fig.
The OS was simple; its major task was to transfer control from one job to the next. The job was
submitted to the computer operator in form of punch cards. At some later time, the output
appeared.
The OS was always resident in memory. Often magnetic tapes and drums were used to store
intermediate data and compiled programs.
Example: Payroll system, stock control and billing systems.

You might also like