BCS - SEM II - OS Unit I
BCS - SEM II - OS Unit I
BCS - SEM II - OS Unit I
UNIT – I
INTRODUCTION
Introduction
An Operating System (OS) is an interface between computer user and computer hardware.
An operating system is software which performs all the basic tasks like file management,
memory management, process management, handing input and output, and controlling
peripheral devices.
Some popular Operating System include Linux Operating System, Windows Operating
System, VMS, OS/400, AIX, z/OS, etc.
An amazing aspect of operating systems is how varied they are in accomplishing these tasks.
Mainframe operating systems are designed primarily to optimize utilization of hardware.
Personal computer (PC) operating systems support complex games, business applications, and
everything in between. Operating systems for handheld computers are designed to provide an
environment in which a user can easily interface with the computer to execute programs.
An operating system is large and complex, it must be created piece by piece. Each of
these pieces should be a well-delineated portion of the system, with carefully defined inputs,
outputs, and functions.
“An operating system is a program that acts as an interface between the user and the
computer hardware and controls the execution of all kinds of programs.”
An operating system is a construct that allows the user application program to interact with the
system hardware. Operating system by itself does not provide any function but it provides an
atmosphere in which different applications and programs can do useful work.
The operating system can be observed from the point of view of the user or the system. This is
known as the user view and the system view respectively. More details about these are given
as follows –
1) User View
The user view depends on the system interface that is used by the users. The different types of
user view experiences can be explained as follows –
If the user is using a personal computer, the operating system is largely designed to
make the interaction easy. Some attention is also paid to the performance utilization.
This is because the personal computer uses all the resources available and there is no
sharing.
If the user is using a system connected to a mainframe or a minicomputer, the operating
system is largely concerned with resource utilization. This is because there may be
multiple terminals connected to the mainframe and the operating system makes sure
that all the resources such as CPU, memory, I/O devices etc. are divided uniformly
between them.
NANDIGRAM INSTITUTE OF INFORMATION TECHNOLOGY, NANDED 2
www.nandigramiit.org
Operating System (OS) UNIT I
There are some devices that contain very or no user view because there is no interaction
with the users. Examples are embedded computers in home devices, automobiles etc.
Operating
User View System View
System
2) System View
According to the computer system, the operating system is the bridge between applications and
hardware. It is most intimate with the hardware and is used to control it as required.
The different types of system view for operating system can be explained as follows:
The system views the operating system as a resource allocator. There are many
resources such as CPU time, memory space, file storage space, I/O devices etc. that are
required by processes for execution. It is the duty of the operating system to allocate
these resources judiciously to the processes so that the computer system can run as
smoothly as possible.
The operating system can also work as a control program. It manages all the processes
and I/O devices so that the I/O devices work in a proper manner without creating
problems.
Operating systems can also be viewed as a way to make using hardware easier.
Computers were required to easily solve user problems. However, it is not easy to work
directly with the computer hardware. So, operating systems were developed to easily
communicate with the hardware,
An operating system can also be considered as a program running at all times in the
background of a computer system (known as the kernel) and handling all the application
programs. This is the definition of the operating system that is generally followed.
3) Computer-System Organization
The computer system is a combination of many parts such as peripheral
devices, secondary memory, CPU, etc. This can be explained more clearly using a
diagram.
The salient points about the above figure displaying Computer System Organisation is
two or more processors in close communication, sharing the computer bus and sometimes the
clock, memory, and peripheral devices.
The instructors to program defy kinds of resource management functions are usually
provided by the Operating System. The use program can request these Sevier by issuing
sepal supervisor call instructions that are similar to subroutine calls but transfer control
to OS rather than to one of the user’s subroutine.
Operating System provides many instructions in addition to the Basie hardware
instruction the sum of these instruction is Calles, as instruction set of extended machine.
The kernel of OS runs on brave machine will user programs run on the extended
machine.
Process 3 Process 1
Extended Machine
Bare
User Program
Machine
(OS)
Process 4 Process 2
Manages output devices to show outputs to the user. For example, Monitor. The
response time of the OS needs to be short, since the user submits and waits for the
result.
1.4.3 Multitasking
Multitasking is when multiple jobs are executed by the CPU simultaneously by switching
between them. Switches occur so frequently that the users may interact with each program
while it is running. An OS does the following activities related to multitasking:
The user gives instructions to the operating system or to a program directly, and
receives an immediate response.
The OS handles multitasking in the way that it can handle multiple operations / executes
multiple programs at a time.
Multitasking Operating Systems are also known as Time-sharing systems.
These Operating Systems were developed to provide interactive use of a computer
system at a reasonable cost.
A time-shared operating system uses the concept of CPU scheduling and
multiprogramming to provide each user with a small portion of a time-shared CPU.
Each user has at least one separate program in memory.
A program that is loaded into memory and is executing is commonly referred to as
a process.
When a process executes, it typically executes for only a very short time before it
either finishes or needs to perform I/O.
Since interactive I/O typically runs at slower speeds, it may take a long time to
complete. During this time, a CPU can be utilized by another process.
The operating system allows the users to share the computer 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 CPU rapidly from one user/program to the next, each user is
given the impression that he/she has his/her own CPU, whereas actually one CPU is
being shared among many users.
1.4.4 Job pool.
Time-sharing and multiprogramming require several jobs to be kept simultaneously in
memory. Since in general main memory is too small to accommodate all jobs, the jobs are kept
initially on the disk in the job pool. This pool consists of all processes residing on disk awaiting
allocation of main memory. If several jobs are ready to be brought into memory, and if there is not
enough room for all of them, then the system must choose among them.
Take for example, a computer system with a printer and two applications programs running. If
both programs wish to print a document at the same time, will those be printed by the primer
or will there be a contention? Here, the operating system comes into play: it manages to queue
the outputs to the printer. In short, this means that it is the ask of the operating system to manage
a computer's resources. Some of the resources that the operating system manages are:
Processor, Memory, Devices, Information
It manages the hardware and software resources of the system. In a desktop computer, these
resources include such things as the processor, memory, disk space and more (On a cell phone
they include the keypad, the screen, the address book, the phone dialer, the battery and the
network connection).
It provides a stable, consistent way for applications to deal with the hardware without having
to know all the details of the hardware.
Memory Management
Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are
not in use.
In multiprogramming, the OS decides which process will get memory when and how
much.
Allocates the memory when a process requests it to do so.
De-allocates the memory when a process no longer needs it or has been terminated
Processor Management
Keeps tracks of processor and status of process. The program responsible for this task
is known as traffic controller.
Allocates the processor (CPU) to a process.
De-allocates processor when a process is no longer required.
Device Management
Keeps tracks of all devices. Program responsible for this task is known as the I/O
controller.
Decides which process gets the device when and for how much time.
Allocates the device in the efficient way.
De-allocates devices.
Information Management
Keeps track of information, location, uses, status etc. The collective facilities are often
known as file system.
Decides who gets the resources.
Allocates the resources.
De-allocates the resources.