Operating System Notes MCA BPUT

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Subject: Operating System

Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

Definition of OS:
An Operating System (OS) is an interface between a computer user and
computer hardware. An operating system is a software which performs
all the basic tasks like file management, memory management, process
management, handling input and output, and controlling peripheral
devices such as disk drives and printers.

Computer System Structure


Computer system can be divided into four components:
l Hardware – provides basic computing resources
 CPU, memory, I/O devices
l Operating system
 Controls and coordinates use of hardware among various
applications and users
l Application programs – define the ways in which the system resources
are used to solve the computing problems of the users
 Word processors, compilers, web browsers, database systems,
video games
l Users
 People, machines, other computers

1|Page
Contact: 7008443534, 9090042626
Subject: Operating System
Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

How an Operating System Controls

Operating systems were originally developed to handle one of the


most complex input/output operations: communicating with a variety
of disk drives. This is evidenced by the names given to early
operating systems, which often contained the acronym DOS,
for disk operating system. Eventually, the operating system quickly
evolved into an all-encompassing bridge between your PC and the
software you run on it.

Without an operating system, such as Windows, each programmer


would have to invent from scratch the way a program displays text
or graphics onscreen, how it sends data to the printer, how it reads
etc.

Objectives of Operating System / Why OS is essential?

• Making a computer system convenient to use in an efficient


manner
• To hide the details of the hardware resources from the users
• To provide users a convenient interface to use the computer
system.
• To act as an intermediary between the hardware and its users
and making it easier for the users to access and use other
resources.
• Manage the resources of a computer system.
• keep track of who is using which resource, granting resource
requests, according for resource using and mediating conflicting
requests from different programs and users.
• The efficient and fair sharing of resources among users and
programs.

2|Page
Contact: 7008443534, 9090042626
Subject: Operating System
Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

Characteristics of Operating System


• Memory Management — It keeps tracks of primary memory i.e
what part of it are in use by whom, what part are not in use etc.
Allocates the memory when the process or program request it.
• Processor Management — Allocate the processor(CPU) to a
process. Deallocate processor when processor is no longer required.
• Device Management — Keep tracks of all devices. This is also called
I/O controller. Decides which process gets the device when and for
how much time.
• File Management — Allocates the resources. De-allocates the
resource. Decides who gets the resources.
• Security — By means of passwords & similar other techniques,
preventing unauthorized access to programs & data.
• Error-detecting aids — Production of dumps, traces, error
messages and other debugging and error-detecting methods.

Operating System - Services


An Operating System provides services to both the users and to the programs. The services
are: -

• Program execution
• I/O operations
• File System manipulation
• Communication
• Error Detection
• Resource Allocation
• Protection

Program execution
Operating systems handle many kinds of activities from user programs to system
programs like printer, name servers, file server, etc. Each of these activities is
encapsulated as a process.
A process includes the complete execution context (code to execute, data to
manipulate, registers, OS resources in use).

3|Page
Contact: 7008443534, 9090042626
Subject: Operating System
Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

I/O Operation
An I/O subsystem comprises of I/O devices and their corresponding driver software.
Drivers hide the peculiarities of specific hardware devices from the users.
I/O operation means read or write operation with any file or any specific I/O device.

File system manipulation


• The OS gives the permission to the program for operation on file.
• Permission varies from read-only, read-write, denied and so on.
• It provides an interface to the user to create/delete files and directories, also
provides an interface to create the backup of file system.

Communication
• Two processes often require data to be transferred between them
• Both the processes can be on one computer or on different computers, but
are connected through a computer network.
• Communication may be implemented by two methods, either by Shared
Memory or by Message Passing.

Error handling
• The OS constantly checks for possible errors.
• The OS takes an appropriate action to ensure correct and consistent
computing.

Resource Management
• The OS manages all kinds of resources using schedulers.
• CPU scheduling algorithms are used for better utilization of CPU.

Protection
• The OS ensures that all access to system resources is controlled.
• The OS ensures that external I/O devices are protected from invalid access
attempts.
• The OS provides authentication features for each user by means of
passwords.

4|Page
Contact: 7008443534, 9090042626
Subject: Operating System
Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

Functions of an Operating System


1. Process management:- Process management helps OS to create and
delete processes. It also provides mechanisms for synchronization and
communication among processes.

2. Memory management:- Memory management module performs the task


of allocation and de-allocation of memory space to programs in need of
this resources.

3. File management:- It manages all the file-related activities such as


organization storage, retrieval, naming, sharing, and protection of files.

4. Device Management: Device management keeps tracks of all devices.


This module also responsible for this task is known as the I/O controller. It
also performs the task of allocation and de-allocation of the devices.

5. I/O System Management: One of the main objects of any OS is to hide


the peculiarities of that hardware devices from the user.

6. Secondary-Storage Management: Systems have several levels of


storage which includes primary storage, secondary storage, and cache
storage. Instructions and data must be stored in primary storage or cache
so that a running program can reference it.

7. Security:- Security module protects the data and information of a


computer system against malware threat and authorized access.

8. Command interpretation: This module is interpreting commands given


by the and acting system resources to process that commands.

9. Networking: A distributed system is a group of processors which do not


share memory, hardware devices, or a clock. The processors
communicate with one another through the network.

10. Job accounting: Keeping track of time & resource used by various job
and users.

11. Communication management: Coordination and assignment of


compilers, interpreters, and another software resource of the various
users of the computer systems.

5|Page
Contact: 7008443534, 9090042626
Subject: Operating System
Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

Evolution of OS
Evolution of OS since 1950 described in detail in this article.
Here we will discuss six main operating system types evaluated
over the past 70 years.

Evolution of Operating System

Serial Processing
History of the operating system started in 1950. Before 1950, the
programmers directly interact with the hardware there was no
operating system at that time. If a programmer wishes to
execute a program on those days, the following serial steps are
necessary.

• Type the program or punched card.


• Convert the punched card to a card reader.

6|Page
Contact: 7008443534, 9090042626
Subject: Operating System
Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

• submit to the computing machine, is there any errors, the


error was indicated by the lights.
• The programmer examined the register and main memory
to identify the cause of an error
• Take outputs on the printers.
• Then the programmer ready for the next program.

Drawback:

This type of processing is difficult for users, it takes much time


and the next program should wait for the completion of the
previous one. The programs are submitted to the machine one
after one, therefore the method is said to be serial processing.

Batch Processing
Before 1960, it is difficult to execute a program using a
computer because of the computer located in three different
rooms, one room for the card reader, one room for executing
the program and another room for printing the result.

The user/machine operator runs between three rooms to


complete a job. We can solve this problem by using batch
processing.

In batch processing technique, the same type of jobs batch


together and execute at a time. The carrier carries the group of
jobs at a time from one room to another.
Therefore, the programmer need not run between these three
rooms several times.

Multiprogramming
Multiprogramming is a technique to execute the number of
programs simultaneously by a single processor. In
multiprogramming, a number of processes reside in main
memory at a time. The OS(Operating System) picks and begins
7|Page
Contact: 7008443534, 9090042626
Subject: Operating System
Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

to execute one of the jobs in main memory. Consider the


following figure, it depicts the layout of the multiprogramming
system. The main memory consisting of 5 jobs at a time, the CPU
executes one by one.

In the non-multiprogramming system, the CPU can execute only


one program at a time, if the running program is waiting for any
I/O device, the CPU becomes idle so it will effect on the
performance of the CPU.

But in a multiprogramming environment, if any I/O wait


happened in a process, then the CPU switches from that job to
another job in the job pool. So, the CPU is not idle at any time.

Advantages:

• Can get efficient memory utilization.


• CPU is never idle so the performance of CPU will increase.
• The throughput of CPU may also increase.

8|Page
Contact: 7008443534, 9090042626
Subject: Operating System
Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

• In the non-multiprogramming environment, the


user/program has to wait for CPU much time. But waiting
time is limited in multiprogramming.

Time Sharing System


Time-sharing or multitasking is a logical extension of
multiprogramming. Multiple jobs are executed by the CPU
switching between them. The CPU scheduler selects a job from
the ready queue and switches the CPU to that job. When the
time slot expires, the CPU switches from this job to another.

In this method, the CPU time is shared by different processes.


So, it is said to be "Time-Sharing System". Generally, time slots
are defined by the operating system.

Advantages:

• The main advantage of the time-sharing system is


efficient CPU utilization. It was developed to provide
interactive use of a computer system at a reasonable cost.
A time shared OS uses CPU scheduling and
multiprogramming to provide each user with a small
portion of a time-shared computer.
• Another advantage of the time-sharing system over the
batch processing system is, the user can interact with the
job when it is executing, but it is not possible in batch
systems.

Parallel System
There is a trend multiprocessor system, such system have more
than one processor in close communication, sharing the
computer bus, the clock, and sometimes memory and peripheral
devices.

9|Page
Contact: 7008443534, 9090042626
Subject: Operating System
Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

These systems are referred to as "Tightly Coupled" system. Then


the system is called a parallel system. In the parallel system, a
number of processors are executing there job in parallel.

Advantages:

• It increases the throughput.


• By increasing the number of processors(CPU), to get more
work done in a shorter period of time.

Distributed System
In a distributed operating system, the processors cannot share
a memory or a clock, each processor has its own local memory.
The processor communicates with one another through various
communication lines, such as high-speed buses. These systems
are referred to as "Loosely Coupled" systems.

Advantages:

• If a number of sites connected by high-speed


communication lines, it is possible to share the resources
from one site to another site, for example, s1 and s2 are
two sites. These are connected by some communication
lines. The site s1 having a printer, but the site does not have
any print. Then the system can be altered without moving
from s2 to s1. Therefore, resource sharing is possible in the
distributed operating system.
• A big computer that is partitioned into a number of
partitions, these sub-partitions are run concurrently in
distributed systems.
• If a resource or a system fails in one site due to technical
problems, we can use other systems/resources in some
other sites. So, the reliability will increase in the
distributed system.

10 | P a g e
Contact: 7008443534, 9090042626
Subject: Operating System
Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

Generations of Operating Systems


Operating Systems have evolved over the years. So, their evolution
through the years can be mapped using generations of operating systems.
There are four generations of operating systems. These can be described
as follows –

The First Generation ( 1945 - 1955 ): Vacuum Tubes and


Plugboards
Digital computers were not constructed until the second world war. Calculating
engines with mechanical relays were built at that time. However, the mechanical relays
were very slow and were later replaced with vacuum tubes. These machines were
enormous but were still very slow.
These early computers were designed, built and maintained by a single group of
people. Programming languages were unknown and there were no operating systems
so all the programming was done in machine language. All the problems were simple
numerical calculations.
By the 1950’s punch cards were introduced and this improved the computer system.
Instead of using plugboards, programs were written on cards and read into the system.

11 | P a g e
Contact: 7008443534, 9090042626
Subject: Operating System
Created By: Asst. Prof. SK ABDUL ISRAR College: ABA, BLS

The Second Generation ( 1955 - 1965 ): Transistors and Batch


Systems
Transistors led to the development of the computer systems that could be
manufactured and sold to paying customers. These machines were known as
mainframes and were locked in air-conditioned computer rooms with staff to operate
them.
The Batch System was introduced to reduce the wasted time in the computer. A tray
full of jobs was collected in the input room and read into the magnetic tape. After that,
the tape was rewound and mounted on a tape drive. Then the batch operating system
was loaded in which read the first job from the tape and ran it. The output was written
on the second tape. After the whole batch was done, the input and output tapes were
removed and the output tape was printed.

The Third Generation ( 1965 - 1980 ): Integrated Circuits and


Multiprogramming
Until the 1960’s, there were two types of computer systems i.e the scientific and the
commercial computers. These were combined by IBM in the System/360. This used
integrated circuits and provided a major price and performance advantage over the
second generation systems.
The third generation operating systems also introduced multiprogramming. This meant
that the processor was not idle while a job was completing its I/O operation. Another
job was scheduled on the processor so that its time would not be wasted.

The Fourth Generation ( 1980 - Present ): Personal Computers


Personal Computers were easy to create with the development of large-scale
integrated circuits. These were chips containing thousands of transistors on a square
centimeter of silicon. Because of these, microcomputers were much cheaper than
minicomputers and that made it possible for a single individual to own one of them.
The advent of personal computers also led to the growth of networks. This created
network operating systems and distributed operating systems. The users were aware
of a network while using a network operating system and could log in to remote
machines and copy files from one machine to another.

12 | P a g e
Contact: 7008443534, 9090042626

You might also like