0% found this document useful (0 votes)
1 views7 pages

OS Part 2

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 7

Operating System Operations:-

An operating system is a construct that allows the user application programs 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 major operations of the operating system are process management, memory management,
device management and file management. These are given in detail as follows:

Process Management:
The operating system is responsible for managing the processes i.e assigning the processor to
a process at a time. This is known as process scheduling. The different algorithms used for
process scheduling are FCFS (first come first served), SJF (shortest job first), priority
scheduling, round robin scheduling etc.
There are many scheduling queues that are used to handle processes in process management.
When the processes enter the system, they are put into the job queue. The processes that are
ready to execute in the main memory are kept in the ready queue. The processes that are waiting
for the I/O device are kept in the device queue.

Memory Management:
Memory management plays an important part in operating system. It deals with memory and
the moving of processes from disk to primary memory for execution and back again.
The activities performed by the operating system for memory management are:

 The operating system assigns memory to the processes as required. This can be done
using best fit, first fit and worst fit algorithms.
 All the memory is tracked by the operating system i.e. it nodes what memory parts are
in use by the processes and which are empty.
 The operating system deallocated memory from processes as required. This may
happen when a process has been terminated or if it no longer needs the memory.

Device Management:
There are many I/O devices handled by the operating system such as mouse, keyboard, disk
drive etc. There are different device drivers that can be connected to the operating system to
handle a specific device. The device controller is an interface between the device and the device
driver. The user applications can access all the I/O devices using the device drivers, which are
device specific codes.

File Management:
Files are used to provide a uniform view of data storage by the operating system. All the files
are mapped onto physical devices that are usually non-volatile so data is safe in the case of
system failure.
The files can be accessed by the system in two ways i.e. sequential access and direct access:

 Sequential Access
The information in a file is processed in order using sequential access. The files records
are accessed on after another. Most of the file systems such as editors, compilers etc.
use sequential access.

 Direct Access
In direct access or relative access, the files can be accessed in random for read and write
operations. The direct access model is based on the disk model of a file, since it allows
random accesses.

Types of Operating System:-


 Simple Batch operating system:
The users of batch operating system do not interact with the computer directly. Each
user prepares his job on an off-line device like punch cards and submits it to the
computer operator. To speed up processing, jobs with similar needs are batched
together and run as a group. Thus, the programmers left their programs with the
operator. The operator then sorts programs into batches with similar requirements.
The problems with Batch Systems are following.
 Lack of interaction between the user and job.
 CPU is often idle, because the speeds of the mechanical I/O devices are slower
than CPU.
 Difficult to provide the desired priority.
 Multiprogramming system:
 When two or more programs are in memory at the same time, sharing the
processor is referred to the multiprogramming operating system.
 Multiprogramming assumes a single processor that is being shared. It increases
CPU utilization by organizing jobs so that the CPU always has one to execute.
 The operating system keeps several jobs in memory at a time. This set of jobs
is a subset of the jobs kept in the job pool. The operating system picks and
begins to execute one of the job in the memory.
 Multiprogrammed system provides an environment in which the various system
resources are utilized effectively, but they do not provide for user interaction
with the computer system. Jobs entering into the system are kept into the
memory.
 Operating system picks the job and begins to execute one of the jobs in the
memory. Having several programs in memory at the same time requires some
form of memory management.
 Multiprogramming operating system monitors the state of all active programs
and system resources. This ensures that the CPU is never idle unless there are
no jobs.

Advantages
1. High CPU utilization.
2. It appears that many programs are allotted CPU almost simultaneously.

Disadvantages
1. CPU scheduling is requires.
2. To accommodate many jobs in memory, memory management is required.

 Multiprocessor Systems
A Multiprocessor system consists of several processors that share a common physical
memory. Multiprocessor system provides higher computing power and speed. In
multiprocessor system all processors operate under single operating system.
Multiplicity of the processors and how they do act together are transparent to the others.
Advantages of Multiprocessor Systems:
 Enhanced performance
 Execution of several tasks by different processors concurrently, increases the
system's throughput without speeding up the execution of a single task.
 If possible, system divides task into many subtasks and then these subtasks can
be executed in parallel in different processors. Thereby speeding up the
execution of single tasks.

 Desktop System:
Earlier, CPUs and PCs lacked the features needed to protect an operating system from
user programs. PC operating systems therefore were
neither multiuser nor multitasking. However, the goals of these operating systems
have changed with time; instead of maximizing CPU and peripheral utilization, the
systems opt for maximizing user convenience and responsiveness. These systems are
called Desktop Systems and include PCs running Microsoft Windows and the Apple
Macintosh. Operating systems for these computers have benefited in several ways from
the development of operating systems for mainframes.
Microcomputers were immediately able to adopt some of the technology developed
for larger operating systems. On the other hand, the hardware costs for microcomputers
are sufficiently low that individuals have sole use of the computer, and CPU utilization
is no longer a prime concern. Thus, some of the design decisions made in operating
systems for mainframes may not be appropriate for smaller systems.

 Time sharing system:


Multi-programmed batched systems provide an environment where the various system
resources (for example, CPU, memory, peripheral devices) are utilized effectively.
Time sharing, or 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.
An interactive, or hands-on, computer system provides on-line communication
between the user and the system. The user gives instructions to the operating system or
to a program directly, and receives an immediate response. Usually, a keyboard is used
to provide input, and a display screen (such as a cathode-ray tube (CRT) or monitor) is
used to provide output.
If users are to be able to access both data and code conveniently, an on-line file system
must be available. A file is a collection of related information defined by its creator.
Batch systems are appropriate for executing large jobs that need little interaction.
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
multiprogramming to provide each user with a small portion of a time-shared computer.
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 short time before it either finishes or needs to
perform I/O. I/O may be interactive; that is, output is to a display for the user and input
is from a user keyboard. Since interactive I/O typically runs at people speeds, it may
take a long time to complete.
A time-shared operating system allows the many 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 rapidly
from one user to the next, each user is given the impression that she has her own
computer, whereas actually one computer is being shared among many users.
Time-sharing operating systems are even more complex than are multi- programmed
operating systems. As in multiprogramming, several jobs must be kept simultaneously
in memory, which requires some form of memory management and protection.

 Distributed system:
Distributed systems use multiple central processors to serve multiple real time
application and multiple users. Data processing jobs are distributed among the
processors accordingly to which one can perform each job most efficiently.
The processors communicate with one another through various communication lines
(such as high-speed buses or telephone lines). These are referred as loosely coupled
systems or distributed systems. Processors in a distributed system may vary in size and
function. These processors are referred as sites, nodes, and computers and so on.

The advantages of distributed systems are following.

o With resource sharing facility user at one site may be able to use the resources
available at another.
o Speedup the exchange of data with one another via electronic mail.
o If one site fails in a distributed system, the remaining sites can potentially continue
operating.
o Better service to the customers.
o Reduction of the load on the host computer.
o Reduction of delays in data processing.

 Clustered System:
 Clustered systems differ from parallel systems, however, in that they are composed of
two or more individual systems coupled together.
 The definition of the term clustered is not concrete; the general accepted definition is
that clustered computers share storage and is closely linked via LAN networking.
 Clustering is usually performed to provide high availability.
 A layer of cluster software runs on the cluster nodes. Each node can monitor one or
more of the others. If the monitored machine fails, the monitoring machine can take
ownership of its storage, and restart the application(s) that were running on the failed
machine. The failed machine can remain down, but the users and clients of the
application would only see a brief interruption of service.
o Asymmetric Clustering - In this, one machine is in hot standby mode while
the other is running the applications. The hot standby host (machine) does
nothing but monitor the active server. If that server fails, the hot standby host
becomes the active server.
o Symmetric Clustering - In this, two or more hosts are running applications,
and they are monitoring each other. This mode is obviously more efficient, as
it uses all of the available hardware.
 Parallel Clustering - Parallel clusters allow multiple hosts to access the same data on
the shared storage. Because most operating systems lack support for this simultaneous
data access by multiple hosts, parallel clusters are usually accomplished by special
versions of software and special releases of applications.

Clustered technology is rapidly changing. Clustered system's usage and it's features should
expand greatly as Storage Area Networks(SANs). SANs allow easy attachment of multiple
hosts to multiple storage units. Current clusters are usually limited to two or four hosts due to
the complexity of connecting the hosts to shared storage.

 Real-time System:
 Real time system is defines as a data processing system in which the time interval
required to process and respond to inputs is so small that it controls the environment.
Real time processing is always on line whereas on line system need not be real time.
The time taken by the system to respond to an input and display of required updated
information is termed as response time. So in this method response time is very less as
compared to the online processing.
 Real-time systems are used when there are rigid time requirements on the operation of
a processor or the flow of data and real-time systems can be used as a control device in
a dedicated application. Real-time operating system has well-defined, fixed time
constraints otherwise system will fail. For example Scientific experiments, medical
imaging systems, industrial control systems, weapon systems, robots, and home-
appliance controllers, Air traffic control system etc.

There are two types of real-time operating systems.

 Hard real-time systems

Hard real-time systems guarantee that critical tasks complete on time. In hard real-time
systems secondary storage is limited or missing with data stored in ROM. In these systems
virtual memory is almost never found.

 Soft real-time systems

Soft real time systems are less restrictive. Critical real-time task gets priority over other
tasks and retains the priority until it completes. Soft real-time systems have limited utility
than hard real- time systems. For example, Multimedia, virtual reality, Advanced Scientific
Projects like undersea exploration and planetary rovers etc.

 Handheld Systems:-
Handheld systems include Personal Digital Assistants (PDAs), such as Palm-
Pilots or Cellular Telephones with connectivity to a network such as the Internet. They are
usually of limited size due to which most handheld devices have a small amount of
memory, include slow processors, and feature small display screens.
o Many handheld devices have between 512 KB and 8 MB of memory. As a
result, the operating system and applications must manage memory efficiently.
This includes returning all allocated memory back to the memory manager once
the memory is no longer being used.
o Currently, many handheld devices do not use virtual memory techniques, thus
forcing program developers to work within the confines of limited physical
memory.
o Processors for most handheld devices often run at a fraction of the speed of a
processor in a PC. Faster processors require more power. To include a faster
processor in a handheld device would require a larger battery that would have
to be replaced more frequently.
o The last issue confronting program designers for handheld devices is the small
display screens typically available. One approach for displaying the content in
web pages is web clipping, where only a small subset of a web page is delivered
and displayed on the handheld device.

Some handheld devices may use wireless technology such as BlueTooth, allowing remote
access to e-mail and web browsing. Cellular telephones with connectivity to the Internet
fall into this category. Their use continues to expand as network connections become more
available and other options such as cameras and MP3 players, expand their utility.

You might also like