Professional Documents
Culture Documents
Unit 1 Advanced Operating Systems 23pcsce24 3
Unit 1 Advanced Operating Systems 23pcsce24 3
Dr. S.Sivakumar, Assistant Professor, PG Department of Computer Science, C.Mutlur, Chidambaram. 1|Page
ADVANCED OPERATING SYSTEMS
UNIT 1- BASICS OF OPERATING SYSTEMS
Desktop Systems:
Personal computers – computer system dedicated to a single
user.
I/O devices – keyboards, mice, display screens, small printers.
User convenience and responsiveness.
Can adopt technology developed for larger operating system
often individuals have sole use of computer and do not need
advanced CPU utilization of protection features.
May run several different types of operating systems
(Windows, MacOS, UNIX, Linux)
Multiprocessor Systems:
In multiprocessor system, two or more processors work together.
In this system, multiple programs (more than one program) are
executed on different processors at the same time. This type of
processing is known as multiprocessing.
Some operating systems have features of multiprocessing.
UNIX is an example of multiprocessing operating system.
Some versions of Microsoft Windows also support multiprocessing.
Multiprocessor system is also known as parallel system.
Mostly the processors of multiprocessor system share the common
system bus, clock, memory and peripheral devices.
This system is very fast in data processing.
Dr. S.Sivakumar, Assistant Professor, PG Department of Computer Science, C.Mutlur, Chidambaram. 2|Page
ADVANCED OPERATING SYSTEMS
UNIT 1- BASICS OF OPERATING SYSTEMS
Dr. S.Sivakumar, Assistant Professor, PG Department of Computer Science, C.Mutlur, Chidambaram. 3|Page
ADVANCED OPERATING SYSTEMS
UNIT 1- BASICS OF OPERATING SYSTEMS
Types of DOS:
There are various types of Distributed Operating systems.
Some of them are as follows:
1. Client-Server System
2. Three-tier
3. N-tier
4. Peer -to-peer
1. Client server system:
This type of system requires the client to request a resource,
after which the server gives the requested resource.
2. Three-tier:
The information about the client is saved in the intermediate
tier rather than in the client, which simplifies development.
This type of architecture is most commonly used in online
applications.
3. N-tier:
N-tier system is used when the server application needs to
forward requests to additional enterprise services on the
network.
Dr. S.Sivakumar, Assistant Professor, PG Department of Computer Science, C.Mutlur, Chidambaram. 4|Page
ADVANCED OPERATING SYSTEMS
UNIT 1- BASICS OF OPERATING SYSTEMS
4. Peer-to-Peer Systems:
The nodes play an important role in the systems
This type of system contains nodes that are equal participants
in data sharing.
Furthermore all the tasks are equally divided between all the
nodes.
These nodes will interact with each other as required as
“shared resources”.
To accomplish this is a network is needed.
Issues of distributed system:
1. Heterogeneity
2. Openness
3. Security
4. Scalability
5. Failure Handling
6. Concurrency
7. Transparency
Clustered Systems:
A cluster is a group of servers and other resources that act like a
single system.
Cluster systems are similar to parallel systems because
both systems use multiple CPUs.
The primary difference is that clustered systems are
made up of two or more independent systems linked
together.
They have independent computer systems and a shared
storage media, and all systems work together to
complete all tasks.
All cluster nodes use two different approaches to
interact with one another, like message passing
interface (MPI) and parallel virtual machine (PVM).
Dr. S.Sivakumar, Assistant Professor, PG Department of Computer Science, C.Mutlur, Chidambaram. 5|Page
ADVANCED OPERATING SYSTEMS
UNIT 1- BASICS OF OPERATING SYSTEMS
Cluster components are generally linked via fast area networks, and each
node executing its instance of an operating system.
In most cases, all nodes share the same hardware and operating system,
while different hardware or different operating systems could be used in
other cases.
The primary purpose of using a cluster system is to assist with weather
forecasting, scientific computing, and supercomputing systems.
There are two clusters available to make a more efficient cluster. These
are as follows:
1. Software Cluster
2. Hardware Cluster
1. Software Cluster
The Software Clusters allows all the systems to work together.
2. Hardware Cluster
It helps to allow high-performance disk sharing among systems.
Dr. S.Sivakumar, Assistant Professor, PG Department of Computer Science, C.Mutlur, Chidambaram. 6|Page
ADVANCED OPERATING SYSTEMS
UNIT 1- BASICS OF OPERATING SYSTEMS
Classification of clusters
Computer clusters are managed to support various purposes, from general-
purpose business requirements like web-service support to computation-
intensive scientific calculations.
There are various classifications of clusters. Some of them are as follows:
1. Fail over Clusters
The process of moving applications and data resources from a failed system
to another system in the cluster is referred to as fail-over.
These are the databases used to cluster important missions, application
servers, mail, and file.
2. Load Balancing Cluster
The cluster requires better load balancing abilities amongst all available
computer systems.
All nodes in this type of cluster can share their computing workload with
other nodes, resulting in better overall performance.
For example, a web-based cluster can allot various web queries to various
nodes, so it helps to improve the system speed.
When it comes to grabbing requests, only a few cluster systems use the
round-robin method.
3. High Availability Clusters
These are also referred to as "HA clusters". They provide a high probability
that all resources will be available.
If a failure occurs, such as a system failure or the loss of a disk volume, the
queries in the process are lost.
If a lost query is retried, it will be handled by a different cluster computer.
It is widely used in news, email, FTP servers, and the web.
Advantages
Various advantages of Clustered Operating System are as follows:
1. High Availability
Although every node in a cluster is a standalone computer, the failure of a
single node doesn't mean a loss of service.
A single node could be pulled down for maintenance while the remaining
clusters take on a load of that single node.
Dr. S.Sivakumar, Assistant Professor, PG Department of Computer Science, C.Mutlur, Chidambaram. 7|Page
ADVANCED OPERATING SYSTEMS
UNIT 1- BASICS OF OPERATING SYSTEMS
2. Cost Efficiency
When compared to highly reliable and larger storage mainframe computers,
these types of cluster computing systems are thought to be more cost-
effective and cheaper.
3. Additional Scalability
A cluster is set up in such a way that more systems could be added to it in
minor increments.
Clusters may add systems in a horizontal fashion.
It means that additional systems could be added to clusters to improve
their performance, fault tolerance, and redundancy.
4. Fault Tolerance
Clustered systems are quite fault-tolerance, and the loss of a single node
does not result in the system's failure.
They might also have one or more nodes in hot standby mode, which allows
them to replace failed nodes.
5. Performance
The clusters are commonly used to improve the availability and
performance over the single computer systems, whereas usually being
much more cost-effective than the single computer system of comparable
speed or availability.
6. Processing Speed
The processing speed is also similar to mainframe systems and other types
of supercomputers on the market.
Disadvantages
Dr. S.Sivakumar, Assistant Professor, PG Department of Computer Science, C.Mutlur, Chidambaram. 8|Page
ADVANCED OPERATING SYSTEMS
UNIT 1- BASICS OF OPERATING SYSTEMS
Real-Time Systems:
Real-time operating system (RTOS) is a special-purpose operating
system used in computers that has strict time constraints for any job to
be performed.
Real-time Operating System is used in environments where a large number
of events, mostly external to the computer system, must be accepted and
processed in a short time or within certain deadlines. It is employed mostly
in those systems in which the results of the computations are used to
influence a process while it is executing.
Examples of real-time operating systems are airline traffic control
systems, Command Control Systems, airline reservation systems, Heart
pacemakers, Network Multimedia Systems, robots, etc.
Types of RTOS:
Following are the three types of RTOS systems are:
Hard Real-Time Operating System
Soft Real-Time Operating System
Firm Real-Time Operating System
Dr. S.Sivakumar, Assistant Professor, PG Department of Computer Science, C.Mutlur, Chidambaram. 9|Page
ADVANCED OPERATING SYSTEMS
UNIT 1- BASICS OF OPERATING SYSTEMS
Advantages:
The advantages of real-time operating system are as follows,
1.Maximum consumption: Maximum utilization of devices and systems. Thus
more output from all the resources.
2.Task Shifting: Time assigned for shifting tasks in these systems is very less.
For example, in older systems, it takes about 10 microseconds. Shifting one
task to another and in the largest systems, it takes 3 microseconds.
3.Focus on Application: Focus on running applications and less importance
to applications that are in the queue.
4.Real-Time Operating System in Embedded System: Since the size of
programs is small, RTOS can also be embedded systems like in transport and
others.
5.Error Free: These types of systems are error-free.
6.Memory Allocation: Memory allocation is best managed in these types of
systems.
Disadvantages:
The disadvantages of real-time operating systems are as follows,
1. Limited Tasks: Very few tasks run simultaneously, and their concentration
is very less on few applications to avoid errors.
2. Use Heavy System Resources: Sometimes the system resources are not so
good and they are expensive as well.
3. Complex Algorithms: The algorithms are very complex and difficult for the
designer to write on.
4. Device Driver and Interrupt signals: It needs specific device drivers and
interrupts signals to respond earliest to interrupts.
5. Thread Priority: It is not good to set thread priority as very less prone to
switching tasks.
6. Minimum Switching: RTOS performs minimal task switching.
Handheld Systems:
Operating systems for handheld systems are software programs that
manage the hardware and software resources of small portable devices
such as smart phones, tablets, and personal digital assistants (PDAs).
It is sometimes also known as a Personal Digital Assistant (PDA).
The popular handheld device in today’s world is Android and iOS.
These operating systems need a high-processing processor and are also
embedded with various types of sensors.
Types of Handheld Operating Systems are as follows:
1. Palm OS
2. Symbian OS
3. Linux OS
4. Windows
5. Android
6. iOS
Feature Migration:
Feature migration in operating system is the process of transferring some
or all of the functionalities and settings of an operating system from one
computer to another.
This can be done for various reasons, such as upgrading to a newer version
of the operating system, switching to a different operating system, or
moving to a more powerful or reliable hardware .
There are different methods and tools for feature migration, depending on
the source and destination operating systems, the type and amount of data
to be transferred, and the level of automation and customization required.
Some of the common methods and tools are:
Windows Server Migration Tools: This is a feature built in to Windows
Server that enables you to migrate server roles, features, operating
system settings, and other data and shares to servers, including later
versions of Windows Server.
Storage Migration Service: This is a feature of Windows Admin Center
that helps you migrate servers and their data without reconfiguring
applications or users.
User State Migration Tool (USMT): This is a command-line tool that
allows you to migrate user profiles and data from one Windows computer
to another.
Windows Easy Transfer: This is a graphical tool that allows you to
transfer files and settings from one Windows computer to another .
Linux Migration Assistant: This is a tool that helps you migrate your
personal data and settings from a Windows or Linux computer to a Linux
computer .
Mac Migration Assistant: This is a tool that helps you transfer your
documents, apps, user accounts, and settings from another Mac, or from
a Windows PC, to your Mac.
Computing Environments
The computing environment involves the collection of computer machinary,
data storage devices, work stations, software applications, and networks
that support the processing and exchange of electronic information
demanded by the software solution.
Types of Computing Environments: There are
Process Scheduling:
CPU is always busy in Multiprogramming. Because CPU switches
from one job to another job.
But in simple computers CPU sit idle until the I/O request granted.
Scheduling is an important OS function.
All resources are scheduled before use. (CPU, memory, devices…..)
Process scheduling is an essential part of Multiprogramming
operating systems.
Such operating systems allow more than one process to be loaded
into the executable memory at a time and the loaded process
shares the CPU using time multiplexing.
Scheduling Objectives
o Maximize throughput.
o Maximize number of users receiving acceptable response times.
o Be predictable.
o Balance resource use.
o Avoid indefinite postponement.
o Enforce Priorities.
o Give preference to processes holding key resources
Cooperating Processes:
The concurrent processes executing in the operating system may be
either independent processes or cooperating processes.
Independent process cannot affect or be affected by the execution
of another process
Cooperating process can affect or be affected by the execution of
another process
Advantages of process cooperation
1. Information sharing
2. Computation speed-up
3. Modularity
4. Convenience
Basic structure:
If processes P and Q want to communicate, they must send
messages to and receive messages from each other; a
communication link must exist between them.
Physical implementation of the link is done through a hardware
bus , network etc,
There are several methods for logically implementing a link and the
operations:
1. Direct or indirect communication
2. Symmetric or asymmetric communication
3. Automatic or explicit buffering
4. Send by copy or send by reference
5. Fixed-sized or variable-sized messages
Naming
Processes that want to communicate must have a way to refer to
each other. They can use either direct or indirect communication.
1. Direct Communication
Processes must name each other explicitly:
o send (P, message) – send a message to process P
o receive(Q, message) – receive a message from process Q
Properties of communication link
o Links are established automatically
o A link is associated with exactly one pair of communicating
processes
o Between each pair there exists exactly one link
o The link may be unidirectional, but is usually bi-directional
2. Indirect Communication
With indirect communication, the messages are sent to and
received from mailboxes, or ports.
The send and receive primitives are defined as follows:
o Send (A, message) Send a message to mailbox A.
o Receive (A, message) Receive a message from mailbox A.
Messages are directed and received from mailboxes (also referred to
as ports)
o Each mailbox has a unique id
o Processes can communicate only if they share a mailbox
Properties of communication link
o Link established only if processes share a common mailbox
o A link may be associated with many processes
o Each pair of processes may share several communication
links
o Link may be unidirectional or bi-directional
3. Buffering
A link has some capacity that determines the number of message
that can reside in it temporarily. This property can be viewed as a
queue of messages attached to the link.
There are three ways that such a queue can be implemented.
o Zero capacity: Queue length of maximum is 0. No message is
waiting in a queue. The sender must wait until the recipient
receives the message. (message system with no buffering)
o Bounded capacity: The queue has finite length n. Thus at most
n messages can reside in it.
o Unbounded capacity: The queue has potentially infinite length.
Thus any number of messages can wait in it. The sender is
never delayed
4. Synchronization
Message passing may be either blocking or non-blocking.
1. Blocking Send - The sender blocks itself till the message sent by
it is received by the receiver.
2. Non-blocking Send - The sender does not block itself after
sending the message but continues with its normal operation.
3. Blocking Receive - The receiver blocks itself until it receives the
message.
4. Non-blocking Receive – The receiver does not block itself.
Deadlocks:
Deadlock is a situation where a set of processes are blocked because each
process is holding a resource and waiting for another resource acquired by
some other process.
Deadlock Characteristics:
The deadlock has the following characteristics
1. Mutual Exclusion
2. Hold and Wait
3. No preemption
4. Circular Wait
1. Mutual Exclusion:
Only one process can use a resource at any given time i.e. the resources
are non-sharable.
At least one resource must be held non-sharable; i.e. only a single process
at a time can utilize the resources.
If another process demands that resources, the request must be
postponed until the resource is released.
One or more than one resource is non-sharable (only one process can use
at a time).
For Example:
3. No preemption:
The resource can be released by a process voluntarily i.e. after execution
of the process.
Resources can’t be anticipated; i.e., a resource can get released only
willingly by the process holding it, and then after that, the process has
completed its task.
For Example:
4. Circular wait:
A set of processes are waiting for each other in a circular fashion. For
example, let’s say there are a set of processes {p0,p1,p2,p3}such that p0
depends on p1,
P1 depends on p2, p2 depends p3 and p3 depends p0.
This creates a circular relation between all these processes and they have
to wait forever to be executed.
The circular-wait situation implies the hold-and-wait state or condition;
hence, all four conditions are not entirely independent. they are
interconnected among each other.
For Example:
1. Deadlock Ignorance:
In the Deadlock ignorance method, the OS acts like the deadlock never
occurs and completely ignores it even if the deadlock occurs.
This method only applies if the deadlock occurs very rarely.
The algorithm is very simple.
It says” if the deadlock occurs, simply reboot the system and act like the
deadlock never occurred.”
2. Deadlock prevention:
The possibility of deadlock is excluded before making requests, by
eliminating one of the necessary conditions for deadlock.
Example: Only allowing traffic from one direction, will exclude the
possibility of blocking the road.
The operating system takes steps to prevent deadlocks from occurring by
ensuring that the system is always in a safe state, where deadlocks cannot
occur.
3. Deadlock Avoidance:
The Operating system runs an algorithm on requests to check for a safe
state. Any request that may result in a deadlock is not granted.
Example: Checking each car and not allowing any car that can block the
road. If there is already traffic on the road, then a car coming from the
opposite direction can cause blockage.
In deadlock avoidance, the request for any resource will be granted if the
resulting state of the system doesn’t cause deadlock in the system.
DEADLOCK DETECTION:
Detecting deadlocks is one of the most important steps in preventing
them.
A deadlock can happen anytime when two or more processes are trying to
acquire a resource, and each process is waiting for other processes to
release the resource.
The deadlock can be detected in the resource-allocation graph as shown in
fig below.
This graph checks if there is a cycle in the Resource Allocation Graph and
each resource in the cycle provides only one instance, If there is a cycle in
this graph then the processes will be in a deadlock state.
So always remember detecting deadlocks is one of the most important
steps in preventing them.
DEADLOCK RECOVERY:
A traditional operating system such as Windows doesn’t deal with
deadlock recovery as it is a time and space-consuming process.
Real-time operating systems use Deadlock recovery.
2. Resource Preemption:–
Resources are preempted from the processes involved in the deadlock,
and preempted resources are allocated to other processes so that there
is a possibility of recovering the system from the deadlock. In this
case, the system goes into starvation.
3. Concurrency Control:–
Concurrency control mechanisms are used to prevent data
inconsistencies in systems with multiple concurrent processes.
These mechanisms ensure that concurrent processes do not access
the same data at the same time, which can lead to inconsistencies and
errors.
Deadlocks can occur in concurrent systems when two or more
processes are blocked, waiting for each other to release the resources
they need.
This can result in a system-wide stall, where no process can make
progress. Concurrency control mechanisms can help prevent
deadlocks by managing access to shared resources and ensuring that
concurrent processes do not interfere with each other.