OS Part 2
OS Part 2
OS Part 2
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.
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.
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.
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.
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 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.