OS Lec2
OS Lec2
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.
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.
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.
Real-time systems are used when there are time requirements are very strict like missile
systems, air traffic control systems, robots etc.
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.
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.
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.
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.
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.