Chapter 1 Notes
Chapter 1 Notes
Definition
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.
Hardware
• System Software
• Application Software
System Software
➢ The system software is a collection of programs designed to
operate, control, and extend the processing capabilities of the
computer itself.
• Payroll Software
• Student Record Software
• Inventory Management Software
• Income Tax Software
• Railways Reservation Software
• Microsoft Office Suite Software
• Microsoft Word
• Microsoft Excel
• Microsoft PowerPoint
• Memory Management
• Processor Management
• Device Management
• File Management
• Security
• Control over system performance
• Job accounting
• Error detecting aids
• Coordination between other software and users
1) Memory Management
Memory management refers to management of Primary Memory or Main Memory.
Main memory is a large array of words or bytes where each word or byte has its
own address.
Main memory provides a fast storage that can be accessed directly by the CPU. For
a program to be executed, it must in the main memory. An Operating System does
the following activities for 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.
2) Processor Management
In multiprogramming environment, the OS decides which process gets the
processor when and for how much time. This function is called process scheduling.
An Operating System does the following activities for 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.
3) Device Management
An Operating System manages device communication via their respective drivers.
It does the following activities for 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.
4) File Management
A file system is normally organized into directories for easy navigation and usage.
These directories may contain files and other directions.
• 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.
Other Important Activities
Following are some of the important activities that an Operating System performs
4) Multiprocessor System
Sharing the processor, when two or more programs reside in memory at the same
time, is referred as multiprogramming. Multiprogramming assumes a single
shared processor. Multiprogramming increases CPU utilization by organizing jobs
so that the CPU always has one to execute.
The following figure shows the memory layout for a multiprogramming system.
An OS does the following activities related to multiprogramming.
• 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 jobs in the
memory.
• Multiprogramming operating systems monitor the state of all active programs
and system resources using memory management programs to ensures that
the CPU is never idle, unless there are no jobs to process.
Advantages
➢ Multiple jobs are executed by the CPU by switching between them, but the
switches occur so frequently.
• Problem of reliability.
• Question of security and integrity of user programs and data.
• Problem of data communication.
Most computer systems are single processor systems i.e they only have one
processor. However, multiprocessor or parallel systems are increasing in
importance nowadays. These systems have multiple processors working in
parallel that share the computer clock, memory, bus, peripheral devices etc. An
image demonstrating the multiprocessor architecture is:
Types of Multiprocessors
There are mainly two types of multiprocessors i.e. symmetric and asymmetric
multiprocessors. Details about them are as follows:
Symmetric Multiprocessors
In these types of systems, each processor contains a similar copy of the operating
system and they all communicate with each other. All the processors are in a peer
to peer relationship i.e. no master - slave relationship exists between them.
An example of the symmetric multiprocessing system is the Encore version of
Unix for the Multimax Computer.
Asymmetric Multiprocessors
In asymmetric systems, each processor is given a predefined task. There is a
master processor that gives instruction to all the other processors. Asymmetric
multiprocessor system contains a master slave relationship.
Asymmetric multiprocessor was the only type of multiprocessor available before
symmetric multiprocessors were created. Now also, this is the cheaper option.
Advantages of Multiprocessor Systems
There are multiple advantages to multiprocessor systems. Some of these are:
More reliable Systems
In a multiprocessor system, even if one processor fails, the system will not halt.
This ability to continue working despite hardware failure is known as graceful
degradation. For example: If there are 5 processors in a multiprocessor system
and one of them fails, then also 4 processors are still working. So the system only
becomes slower and does not ground to a halt.
Enhanced Throughput
If multiple processors are working in tandem, then the throughput of the system
increases i.e. number of processes getting executed per unit of time increase. If
there are N processors then the throughput increases by an amount just under N.
More Economic Systems
Multiprocessor systems are cheaper than single processor systems in the long run
because they share the data storage, peripheral devices, power supplies etc. If
there are multiple processes that share data, it is better to schedule them on
multiprocessor systems with shared data than have different computer systems
with multiple copies of the data.
Disadvantages of Multiprocessor Systems
There are some disadvantages as well to multiprocessor systems. Some of these
are:
Increased Expense
Even though multiprocessor systems are cheaper in the long run than using
multiple computer systems, still they are quite expensive. It is much cheaper to
buy a simple single processor system than a multiprocessor system.
Complicated Operating System Required
All the processors in the multiprocessor system share the memory. So a much
larger pool of memory is required as compared to single processor systems.
v) Distributed operating System
➢ A Network Operating System runs on a server and provides the server the
capability to manage data, users, groups, security, applications, and other
networking functions.
➢ The primary purpose of the network operating system is to allow shared file
and printer access among multiple computers in a network, typically a local
area network (LAN), a private network or to other networks.
➢ 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.
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.
viii) Mobile Operating system
A mobile operating system, also called a mobile OS, is an operating system that
is specifically designed to run on mobile devices such as mobile phones,
smartphones, PDAs, tablet computers and other handheld devices. The mobile
operating system is the software platform on top of which other programs,
called application programs, can run on mobile devices.