You are on page 1of 9

Two Main Function of Operating System

 OS as an Extended Machine
 OS as a Resource Manager

OS as an Extended Machine
 An OS
o provides an abstraction layer over the concrete hardware,
o use the computer hardware in an efficient manner (converting hardware into
useful form),
o ``hide'' the complexity of the underlying hardware.
 Most computer users sit in front of a PC, consisting of a monitor, keyboard, mouse, and
system unit. Such a system is designed for one user to monopolize its resources.
 The goal is to maximize the work (or play) that the user is performing. In this case, the
OS is designed mostly for ease of use.
 Performance is, of course, important to the user; but rather than resource utilization, such
systems are optimized for the single-user experience.
 In other cases, a user sits at a terminal connected to a mainframe or minicomputer. Other
users are accessing the same computer through other terminals. These users share
resources and may exchange information.
 The OS in such cases is designed to maximize resource utilization to assure that all
available CPU time, memory, and I/O are used efficiently and that no individual user
takes more than her fair share.
 In still other cases, users sit at workstations connected to networks of other workstations
and servers. These users have dedicated resources at their disposal, but they also share
resources such as networking and servers-file, compute, and print servers.
 Therefore, their OS is designed to compromise between individual usability and resource
utilization.
 Recently, many varieties of handheld computers have come into fashion. Most of these
devices are standalone units for individual users.
 Their OSs are designed mostly for individual usability, but performance per amount of
battery life is important as well.
 Some computers have little or no user view. For example, embedded computers in home
devices and automobiles may have numeric keypads and may turn indicator lights on or
off to show status, but they and their OSs are designed primarily to run without user
intervention.

OS as resource manager:
Modern computers consist of processors, memories, timers, disks, mice, network interfaces,
printers, and a wide variety of other devices. In the alternative view, the job of the operating
system is to provide for an orderly and controlled allocation of the processors, memories, and
input/output devices among the various programs competing for them.
When a computer (or network) has multiple users, the need for managing and protecting the
memory, input/output devices, and other resources is even greater, since the users might
otherwise interface with one another. In addition, users often need to share not only hardware,
but information (files, databases, etc.) as well. In short, this view of the operating system holds
that its primary task is to keep track of which programs are using which resources, to grant
resource requests, to account for usage, and to mediate conflicting requests from different
programs and users.

Resource management includes multiplexing (sharing) resources in two different ways:


1. Time Multiplexing
2. Space Multiplexing

Time Multiplexing
When the resource is time multiplexed, different programs or users take turns using it. First one
of them gets to use the resource, then another, and so on.

For example:

With only one CPU and multiple programs that want to run on it, operating system first allocates
the CPU to one long enough, another one gets to use the CPU, then another and ten eventually
the first one again.

Determining how the resource is time multiplexed – who goes next and for how long – is the task
of the operating system.

Space Multiplexing
In space multiplexing, instead of the customers taking turns, each one gets part of the resource.

For example:

Main memory is normally divided up among several running programs, so each one can be
resident at the same time (for example, in order to take turns using the CPU). Assuming there is
enough memory to hold multiple programs, it is more efficient to hold several programs in
memory at once rather than give one of them all of it, especially if it only needs a small fraction
of the total. Of course, this raises issues of fairness, protection, and so on, and it is up to the
operating system to solve them.

Type of Operating System


Batch operating system
The users of a 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. The
programmers leave their programs with the operator and the operator then sorts the programs
with similar requirements into batches.
The problems with Batch Systems are as follows −
 Lack of interaction between the user and the job.
 CPU is often idle, because the speed of the mechanical I/O devices is slower than the
CPU.
 Difficult to provide the desired priority.
Spooling Systems –
 SPOOL is an acronym for simultaneous peripheral operations on-line.
 It is a kind of buffering mechanism or a process in which data is temporarily held
to be used and executed by a device, program or the system.
 Data is sent to and stored in memory or other volatile storage until the program
or computer requests it for execution.
 In a computer system peripheral equipment, such as printers and punch card
readers etc. (batch processing), are very slow relative to the performance of the
rest of the system.
 Getting input and output from the system was quickly seen to be a bottleneck.
Here comes the need for spool.
 Spooling works like a typical request queue where data, instructions and
processes from multiple sources are accumulated for execution later on.
 Generally, it is maintained on computer’s physical memory, buffers or the I/O
device-specific interrupts.
 The spool is processed in FIFO manner i.e. whatever first instruction is there in
the queue will be popped and executed.
Advantage: Improves throughput and utilization
Disadvantage: Single job must wait during I/O for data
New OS feature: Buffering, DMA and Interrupt handling

Time-Sharing Operating Systems –


Each task is given some time to execute, so that all the tasks work smoothly. Each user gets time
of CPU as they use single system. These systems are also known as Multitasking Systems. The
task can be from single user or from different users also. The time that each task gets to execute
is called quantum. After this time interval is over OS switches over to next task.
Advantages of Time-Sharing OS:
 Each task gets an equal opportunity
 Less chances of duplication of software
 CPU idle time can be reduced
Disadvantages of Time-Sharing OS:
 Reliability problem
 One must have to take care of security and integrity of user programs and data
 Data communication problem
Examples of Time-Sharing OSs are: Multics, Unix etc.

Distributed Operating System

These types of operating system are a recent advancement in the world of computer technology
and are being widely accepted all-over the world and, that too, with a great pace. Various
autonomous interconnected computers communicate each other using a shared communication
network. Independent systems possess their own memory unit and CPU. These are referred
as loosely coupled systems or distributed systems. These system’s processors differ in size and
function. The major benefit of working with these types of operating system is that it is always
possible that one user can access the files or software which are not actually present on his
system but on some other system connected within this network i.e., remote access is enabled
within the devices connected in that network.

Advantages of Distributed Operating System:


 Failure of one will not affect the other network communication, as all systems are
independent from each other
 Electronic mail increases the data exchange speed
 Since resources are being shared, computation is highly fast and durable
 Load on host computer reduces
 These systems are easily scalable as many systems can be easily added to the network
 Delay in data processing reduces
Disadvantages of Distributed Operating System:
 Failure of the main network will stop the entire communication
 To establish distributed systems the language which are used are not well defined yet
 These types of systems are not readily available as they are very expensive. Not only that
the underlying software is highly complex and not understood well yet
Examples of Distributed Operating System are- LOCUS etc.

Network Operating System –


These systems run on a server and provide the capability to manage data, users, groups, security,
applications, and other networking functions. These type of operating systems allow shared
access of files, printers, security, applications, and other networking functions over a small
private network. One more important aspect of Network Operating Systems is that all the users
are well aware of the underlying configuration, of all other users within the network, their
individual connections etc. and that’s why these computers are popularly known as tightly
coupled systems.

Advantages of Network Operating System:


 Highly stable centralized servers
 Security concerns are handled through servers
 New technologies and hardware up-gradation are easily integrated to the system
 Server access are possible remotely from different locations and types of systems
Disadvantages of Network Operating System:
 Servers are costly
 User has to depend on central location for most operations
 Maintenance and updates are required regularly
Examples of Network Operating System are: Microsoft Windows Server 2003, Microsoft
Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD etc.
Real-Time Operating System –
These types of OSs serves the real-time systems. The time interval required to process and
respond to inputs is very small. This time interval is called response time.

Real-time systems are used when there are time requirements are very strict like missile
systems, air traffic control systems, robots etc.

Two types of Real-Time Operating System which are as follows:


 Hard Real-Time Systems:
These OSs are meant for the applications where time constraints are very strict and even
the shortest possible delay is not acceptable. These systems are built for saving life like
automatic parachutes or air bags which are required to be readily available in case of any
accident. Virtual memory is almost never found in these systems.
 Soft Real-Time Systems:
These OSs are for applications where for time-constraint is less strict.

Advantages of RTOS:
 Maximum Consumption: Maximum utilization of devices and system, thus more output
from all the resources
 Task Shifting: Time assigned for shifting tasks in these systems are very less. For example
in older systems it takes about 10 micro seconds in shifting one task to another and in latest
systems it takes 3 micro seconds.
 Focus on Application: Focus on running applications and less importance to applications
which are in queue.
 Real time operating system in embedded system: Since size of programs are small,
RTOS can also be used in embedded systems like in transport and others.
 Error Free: These types of systems are error free.
 Memory Allocation: Memory allocation is best managed in these type of systems.
Disadvantages of RTOS:
 Limited Tasks: Very few tasks run at the same time and their concentration is very less
on few applications to avoid errors.
 Use heavy system resources: Sometimes the system resources are not so good and they
are expensive as well.
 Complex Algorithms: The algorithms are very complex and difficult for the designer to
write on.
 Device driver and interrupt signals: It needs specific device drivers and interrupt
signals to response earliest to interrupts.
 Thread Priority: It is not good to set thread priority as these systems are very less prone
to switching tasks.

Examples of Real-Time Operating Systems are: Scientific experiments, medical imaging


systems, industrial control systems, weapon systems, robots, air traffic control systems, etc.
Got what you were looking for? Learn more and become self-sufficient. Start learning Data
Structures & Algorithms with the help of the most trusted DSA Self-Paced course, and that too at
the most student-friendly price.

Desktop Systems
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.

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.

 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.
 Currently, many handheld devices do not use virtual memory techniques, thus forcing
program developers to work within the confines of limited physical memory.
 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.
 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.

Function of 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. Deadlock Prevention: During processing, a situation can arise in which a resource


shared by two or more processes cannot continue because the resource required by one
process is held by the other. This situation is called deadlock. OS ensures that the above
condition do not hold by carefully allocating resources

11. 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.
12. Job accounting: Keeping track of time & resource used by various job and users.
13. Communication management: Coordination and assignment of compilers, interpreters,
and another software resource of the various users of the computer systems.

You might also like