You are on page 1of 14

Process

Management
and
CH. 2 Synchronization
BY DR. VEEJYA KUMBHAR
Ch. 2
Process Management and Synchronization
Syllabus

• Process 
• PCB 
• Job and processor scheduling 
• Problems of concurrent processes-
• Critical sections, Mutual exclusion,
Synchronization 
• Deadlock 
• Device and File Management
Device Management

 The process of implementation, operation, and maintenance of a device by an


operating system is called device management.
 When we use computers, we will be having various devices connected to our system
like mouse, keyboard, scanner, printer, and pen drives.
 So, all these are the devices and the operating system acts as an interface that allows
the users to communicate with these devices.
 An operating system is responsible for successfully establishing the connection
between these devices and the system.
 The operating system uses the concept of drivers for establishing a connection
between these devices with the system.
Functions of Device Management

 Keeps track of all devices and the program which is responsible


to perform this is called the I/O controller.
 Monitoring the status of each device such as storage drivers,
printers, and other peripheral devices.
 Enforcing preset policies and taking a decision on which process
gets the device when and for how long.
 Allocates and deallocates the device in an efficient way.
Types of Devices

 Block Device:

It stores information in fixed-size block, each one with its own


address. Example, disks.
 Character Device:

It delivers or accepts a stream of characters. the individual characters


are not addressable. For example, printers, keyboards etc.
 Network Device:

It is for transmitting data packets.


Features of Device Management

 Operating system is responsible in managing device communication


through their respective drivers.
 Operating system keeps track of all devices by using a program known as
an input output controller.
 It decides which process to assign to CPU and for how long.
 O.S. is responsible in fulfilling the request of devices to access the process.
 It connects the devices to various programs in efficient way without error.
 Deallocate devices when they are not in use.
Device Drivers

 These are the dedicated system programs used to operate device.


 Operating system is responsible for managing device communication through their
respective drivers.
 As we know that the operating system will have many devices like the mouse, printer,
and scanner and operating system is responsible for managing these devices and
establishing the communication between these devices with the computer through
their respective drivers.
 So, operating system uses its respective drivers each and every device will have its
own driver.
 Without the use of their respective driver, that device cannot make communication
with other systems.
Device Tracking

 Operating system keeps track of all devices by using a program known as input output
controller.
 Apart from allowing the system to make the communication between these drivers operating
system is also responsible in keeping track all these devices which are connected with the
system.
 If any device request any process which is under execution by the CPU then the operating
system has to send a signal to the CPU to immediately release that process and moves to the
next process from the main memory so that the process which is asked by the device fulfills the
request of this device.
 That’s why operating system has to continuously keep on checking the status of all the devices
and for doing that operating system uses a specialized program which is known
as Input/Output controller.
Process Assignment

 Operating system decides which process to assign to CPU and for how long.
 So, operating system is responsible in assigning the processes to the CPU and it is also
responsible in selecting appropriate process from the main memory and setting up the
time for that process like how long that process needs to get executed inside the CPU.
 Operating system is responsible in fulfilling the request of devices to access the process.
 If the printer requests for the process which is now getting executed by the CPU then it is
the responsibility of the operating system to fulfill that request.
 So, what operating system will do is it will tell the CPU that you need to immediately
release that process which the device printer is asking for and assign it to the printer.
Connection

 Operating system connects the devices to various programs in efficient way


without error.
 So, we use software to access these drivers because we cannot directly
access to keyboard, mouse, printers, scanners, etc.
 We have to access these devices with the help of software.
 Operating system helps us in establishing an efficient connection with these
devices with the help of various software applications without any error.
Device Allocation & Deallocation

 Device Allocation
 Device allocation refers to the process of assigning specific devices to
processes or users. It ensures that each process or user has exclusive access
to the required devices or shares them efficiently without interference.
 Device Deallocation
 Operating system deallocates devices when they are no longer in use. When
these drivers or devices are in use, they will be using certain space in the
memory so it is the responsibility of the operating system to continuously
keep checking which device is in use and which device is not in use so that it
can release that device if we are no longer using that device.
common techniques used by device management

 Using device controllers or I/O controllers to communicate with


devices
 Using device queues or spooling to buffer requests for devices
 Using device scheduling algorithms to determine the order of
servicing requests
 Using device drivers or modules to provide a standard interface for
devices
 Using interrupts or polling to detect device events or status changes.
common challenges in device management

 Managing concurrent access to shared devices


 Balancing performance and fairness among different users or
processes
 Supporting a wide range of devices with different characteristics
and capabilities
 Handling device dependencies and conflicts
 Providing security and protection for devices and data
Thank
You

You might also like