SlideShare a Scribd company logo
1 of 16
Download to read offline
Device
Management
Content
• Device management approaches
• I/O system organization
• Direct I/O and Memory Mapped I/O
• Direct I/O with polling
• Interrupt driven direct I/O
• Direct memory access
• Buffering
• Device drivers
Device Management
Approaches (1)
• Direct I/O – CPU software explicitly transfer data
to and from the controller’s data registers
• Direct I/O with polling – the device management
software polls the device controller status register to
detect completion of the operation; device
management is implemented wholly in the device
driver, if interrupts are not used
• Interrupt driven direct I/O – interrupts simplify the
software’s responsibility for detecting operation
completion; device management is implemented
through the interaction of a device driver and
interrupt routine
Device Management
Approaches (2)
• Memory mapped I/O – device addressing simplifies the
interface (device seen as a range of memory locations);
• Memory mapped I/O with polling – the device management
software polls the device controller status register to detect
completion of the operation; device management is
implemented wholly in the device driver.
• Interrupt driven I/O – interrupts simplify the software’s
responsibility for detecting operation completion; device
management is implemented through the interaction of a
device driver and interrupt routine
• Direct memory access – involves designing of hardware to
avoid the CPU perform the transfer of information
between the device (controller’s data registers) and the
memory
I/O system organization
• An application process uses a device by
issuing commands and exchanging data with
the device management (device driver).
• Device driver responsibilities:
• Implement communication APIs that
abstract the functionality of the device
• Provide device dependent operations to
implement functions defined by the API
• API should be similar across different device
drivers, reducing the amount of info an
application programmer needs to know to
use the device
• Since each device controller is specific to a
particular device, the device driver
implementation will be device specific, to
• Provide correct commands to the controller
• Interpret the controller status register (CSR)
correctly
• Transfer data to and from device controller
data registers as required for correct device
operation
Application
Process
File Manager
Device
Driver
Device controller
command status data
Hardware
interface
API
I/O with polling
• Each I/O operation requires that the software
and hardware coordinate their operations to
accomplish desired effect
• In direct I/O pooling this coordination is done
in the device driver;
• While managing the I/O, the device manager
will poll the busy/done flags to detect the
operation’s completion; thus, the CPU starts
the device, then polls the CSR to determine
when the operation has completed
I/O with polling - read
1. Application process requests a read
operation
2. The device driver queries the CSR to
determine whether de device is idle; if
device is busy, the driver waits for it to
become idle
3. The driver stores an input command
into the controller’s command register,
thus starting the device
4. The driver repeatedly reads the
content of CSR to detect the
completion of the read operation
5. The driver copies the content of the
controller's data register(s) into the
main memory user’s process’s space.
read (device, …);
Device controller
command status data
Hardware interface
System Interface
data
read function
write function
1
2
3
4
Datatransfer
5
I/O with polling - write
1. The application process requests
a write operation
2. The device driver queries the CSR
to determine if the device is idle;
if busy, it will wait to become idle
3. The device driver copies data
from user space memory to the
controller’s data register(s)
4. The driver stores an output
command into the command
register, thus starting the device
5. The driver repeatedly reads the
CSR to determine when the
device completed its operation
write (device, …);
Device controller
command status data
Hardware interface
System Interface
data
read function
write function
1
2
4
5
Datatransfer
3
Interrupt driven I/O
• In a multiprogramming system the wasted
CPU time (in polled I/O) could be used by
another process; because the CPU is used
by other processes in addition to the one
waiting for the I/O operation completion,
in multiprogramming system may result a
sporadic detection of I/O completion; this
may be remedied by use of interrupts
• The reason for incorporating the
interrupts into a computer hardware is to
eliminate the need for a device driver to
constantly poll the CSR
• Instead polling, the device controller
“automatically” notifies the device driver
when the operation has completed.
Overlapping CPU execution
with device operation
• The software interface to an I/O device usually enables
the operating system to execute alternative processes
when any specific process is waiting for I/O to complete,
while preserving serial execution semantics for an
individual process
• That means that whenever the programmers will use
read statement in a program, they will know that the
next instruction will not execute until the read
instruction has completed.
• Consider the following code:
…
read (device, “%d”, x);
y=f(x);
….
Direct memory access
• Traditional I/O
• Polling approach:
• CPU transfer data between the
controller data registers and the
primary memory
• Output operations - device driver
copies data from the application
process data area to the
controller; vice versa for input
operations
• Interrupt driven I/O approach -
the interrupt handler is
responsible for the transfer task
Primary
memory
CPU
Controller
Device
Direct memory access• DMA controllers are able to read
and write information directly
from /to primary memory, with no
software intervention
• The I/O operation has to be
initiated by the driver
• DMA hardware enables the data
transfer to be accomplished
without using the CPU at all
• The DMA controller must include
an address register (and address
generation hardware) loaded by
the driver with a pointer to the
relevant memory block; this
pointer is used by the DMA
hardware to locate the target
block in primary memory
Primary
memory
CPU
Controller
Device
Design Objectives
• Efficiency
• Most I/O devices are extremely slow compared
with the processor and the main memory
• Buffering is one way to deal with this issue
• Generality
• It is desirable to handle all devices in a uniform
and consistent manner
• Applies for both
• The way the user processes see the devices
• The way the operating system manages the I/O devices
and operations
Buffering
• Buffering is the technique by which the device
manager can keep slower I/O devices busy during
times when a process is not requiring I/O
operations.
• Input buffering is the technique of having the
input device read information into the primary
memory before the process requests it.
• Output buffering is the technique of saving
information in memory and then writing it to the
device while the process continues execution
Device manager design
• Designing the device manager involves to
invoke controller specific I/O operations while
satisfying:
• Create an API that implements the I/O functions
available to the device, still compliant with
interfaces implemented by other drivers; this is
called device driver interface
• Achieve correct coordination among the
application processes, drivers and device
controllers
• Optimize the overall machine performance with
correct driver strategies
Device driver interface
• Each operating system defines an architecture
for its device management system
• The designs are different from operating
system to operating system; there is no
universal organization
• Each operating system has two major
interfaces to the device manager:
• The driver API
• The interface between a driver and the operating
system kernel

More Related Content

What's hot

Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory managementrprajat007
 
Memory Organisation in embedded systems
Memory Organisation in embedded systemsMemory Organisation in embedded systems
Memory Organisation in embedded systemsUthraSowrirajan1
 
BLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
BLOCK DIAGRAM OF HARDWIRED CONTROL UNITBLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
BLOCK DIAGRAM OF HARDWIRED CONTROL UNITRahul Sharma
 
Cache memory
Cache memoryCache memory
Cache memorychauhankapil
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device ManagementDamian T. Gordon
 
IOT - Design Principles of Connected Devices
IOT - Design Principles of Connected DevicesIOT - Design Principles of Connected Devices
IOT - Design Principles of Connected DevicesDevyani Vasistha
 
Direct memory access
Direct memory accessDirect memory access
Direct memory accessshubham kuwar
 
memory hierarchy
memory hierarchymemory hierarchy
memory hierarchysreelakshmikv
 
Von Neumann vs Harvard Architecture
Von Neumann vs Harvard ArchitectureVon Neumann vs Harvard Architecture
Von Neumann vs Harvard ArchitectureOLSON MATUNGA
 
Data manipulation instructions
Data manipulation instructionsData manipulation instructions
Data manipulation instructionsMahesh Kumar Attri
 
Operating systems
Operating systemsOperating systems
Operating systemsUjjwal 'Shanu'
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory managementMukesh Chinta
 
Boot process
Boot processBoot process
Boot processSalman Memon
 
Program execution, straight line sequence and branching
Program execution, straight line sequence and branchingProgram execution, straight line sequence and branching
Program execution, straight line sequence and branchingJyotiprakashMishra18
 
Introduction to computer hardware
Introduction to computer hardwareIntroduction to computer hardware
Introduction to computer hardwaremite6025.hku
 

What's hot (20)

Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Memory Organisation in embedded systems
Memory Organisation in embedded systemsMemory Organisation in embedded systems
Memory Organisation in embedded systems
 
BLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
BLOCK DIAGRAM OF HARDWIRED CONTROL UNITBLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
BLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
 
Embedded System-design technology
Embedded System-design technologyEmbedded System-design technology
Embedded System-design technology
 
Cache memory
Cache memoryCache memory
Cache memory
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device Management
 
Device Management
Device ManagementDevice Management
Device Management
 
Multiprocessor system
Multiprocessor system Multiprocessor system
Multiprocessor system
 
IOT - Design Principles of Connected Devices
IOT - Design Principles of Connected DevicesIOT - Design Principles of Connected Devices
IOT - Design Principles of Connected Devices
 
Direct memory access
Direct memory accessDirect memory access
Direct memory access
 
memory hierarchy
memory hierarchymemory hierarchy
memory hierarchy
 
Von Neumann vs Harvard Architecture
Von Neumann vs Harvard ArchitectureVon Neumann vs Harvard Architecture
Von Neumann vs Harvard Architecture
 
Data manipulation instructions
Data manipulation instructionsData manipulation instructions
Data manipulation instructions
 
RT linux
RT linuxRT linux
RT linux
 
Operating systems
Operating systemsOperating systems
Operating systems
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
 
Lecture 37
Lecture 37Lecture 37
Lecture 37
 
Boot process
Boot processBoot process
Boot process
 
Program execution, straight line sequence and branching
Program execution, straight line sequence and branchingProgram execution, straight line sequence and branching
Program execution, straight line sequence and branching
 
Introduction to computer hardware
Introduction to computer hardwareIntroduction to computer hardware
Introduction to computer hardware
 

Viewers also liked

5. spooling and buffering
5. spooling and buffering 5. spooling and buffering
5. spooling and buffering myrajendra
 
IO Management
IO ManagementIO Management
IO ManagementJ.T.A.JONES
 
I/O Buffering
I/O BufferingI/O Buffering
I/O BufferingNadhrah Nini
 
File management ppt
File management pptFile management ppt
File management pptmarotti
 
Shashank Manu on the GoUNESCO India 2014 Challenge
Shashank Manu on the GoUNESCO India 2014 ChallengeShashank Manu on the GoUNESCO India 2014 Challenge
Shashank Manu on the GoUNESCO India 2014 ChallengeGoUNESCO
 
Programma lista per la rinascita di apice candidato sindaco vincenzo gitto
Programma lista per la rinascita di apice   candidato sindaco vincenzo gittoProgramma lista per la rinascita di apice   candidato sindaco vincenzo gitto
Programma lista per la rinascita di apice candidato sindaco vincenzo gittoVincenzo Gitto
 
Audit assicurativo
Audit assicurativoAudit assicurativo
Audit assicurativoMichele Borsoi
 
Bab ii pembahasan
Bab ii pembahasanBab ii pembahasan
Bab ii pembahasanAbd Halim
 
Dottori Commercialisti - Guida alla conoscenza della polizza di responsabilit...
Dottori Commercialisti - Guida alla conoscenza della polizza di responsabilit...Dottori Commercialisti - Guida alla conoscenza della polizza di responsabilit...
Dottori Commercialisti - Guida alla conoscenza della polizza di responsabilit...Michele Borsoi
 
5 Ways to Increase Mobile conversion rates
5 Ways to Increase Mobile conversion rates5 Ways to Increase Mobile conversion rates
5 Ways to Increase Mobile conversion ratesTambourine
 
Ylki ppt
Ylki pptYlki ppt
Ylki ppterianaey
 
Heritage Advocacy and GoUNESCO
Heritage Advocacy and GoUNESCOHeritage Advocacy and GoUNESCO
Heritage Advocacy and GoUNESCOGoUNESCO
 

Viewers also liked (13)

operating system lecture notes
operating system lecture notesoperating system lecture notes
operating system lecture notes
 
5. spooling and buffering
5. spooling and buffering 5. spooling and buffering
5. spooling and buffering
 
IO Management
IO ManagementIO Management
IO Management
 
I/O Buffering
I/O BufferingI/O Buffering
I/O Buffering
 
File management ppt
File management pptFile management ppt
File management ppt
 
Shashank Manu on the GoUNESCO India 2014 Challenge
Shashank Manu on the GoUNESCO India 2014 ChallengeShashank Manu on the GoUNESCO India 2014 Challenge
Shashank Manu on the GoUNESCO India 2014 Challenge
 
Programma lista per la rinascita di apice candidato sindaco vincenzo gitto
Programma lista per la rinascita di apice   candidato sindaco vincenzo gittoProgramma lista per la rinascita di apice   candidato sindaco vincenzo gitto
Programma lista per la rinascita di apice candidato sindaco vincenzo gitto
 
Audit assicurativo
Audit assicurativoAudit assicurativo
Audit assicurativo
 
Bab ii pembahasan
Bab ii pembahasanBab ii pembahasan
Bab ii pembahasan
 
Dottori Commercialisti - Guida alla conoscenza della polizza di responsabilit...
Dottori Commercialisti - Guida alla conoscenza della polizza di responsabilit...Dottori Commercialisti - Guida alla conoscenza della polizza di responsabilit...
Dottori Commercialisti - Guida alla conoscenza della polizza di responsabilit...
 
5 Ways to Increase Mobile conversion rates
5 Ways to Increase Mobile conversion rates5 Ways to Increase Mobile conversion rates
5 Ways to Increase Mobile conversion rates
 
Ylki ppt
Ylki pptYlki ppt
Ylki ppt
 
Heritage Advocacy and GoUNESCO
Heritage Advocacy and GoUNESCOHeritage Advocacy and GoUNESCO
Heritage Advocacy and GoUNESCO
 

Similar to ITFT_Device management in Operating System

computer system structure
computer system structurecomputer system structure
computer system structureHAMZA AHMED
 
Operating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / OutputOperating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / OutputPeter Tröger
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfTaufeeq8
 
I/O Organization
I/O OrganizationI/O Organization
I/O OrganizationDhaval Bagal
 
Unit v: Device Management
Unit v: Device ManagementUnit v: Device Management
Unit v: Device ManagementArnav Chowdhury
 
comporgppt.pptx
comporgppt.pptxcomporgppt.pptx
comporgppt.pptxFaisalAijaz1
 
operatingsystem03handlingofinterrupts-210603182850.pdf
operatingsystem03handlingofinterrupts-210603182850.pdfoperatingsystem03handlingofinterrupts-210603182850.pdf
operatingsystem03handlingofinterrupts-210603182850.pdfChetanRaut43
 
operatingsystem03handlingofinterrupts-210603182850.pptx
operatingsystem03handlingofinterrupts-210603182850.pptxoperatingsystem03handlingofinterrupts-210603182850.pptx
operatingsystem03handlingofinterrupts-210603182850.pptxChetanRaut43
 
Operating system 03 handling of interrupts
Operating system 03 handling of interruptsOperating system 03 handling of interrupts
Operating system 03 handling of interruptsVaibhav Khanna
 
Basic-Role-of-Operating-System-send.pptx
Basic-Role-of-Operating-System-send.pptxBasic-Role-of-Operating-System-send.pptx
Basic-Role-of-Operating-System-send.pptxiloveyoucarlo0923
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organizationMazin Alwaaly
 
Os introduction
Os introductionOs introduction
Os introductionKanika Garg
 
Unit2 p1 io organization-97-2003
Unit2 p1 io organization-97-2003Unit2 p1 io organization-97-2003
Unit2 p1 io organization-97-2003Swathi Veeradhi
 
What is operating system
What is operating systemWhat is operating system
What is operating systemSuvithak
 
AN INTRODUCTION TO OPERATING SYSTEMS : CONCEPTS AND PRACTICE - PHI Learning
AN INTRODUCTION TO OPERATING SYSTEMS : CONCEPTS AND PRACTICE - PHI LearningAN INTRODUCTION TO OPERATING SYSTEMS : CONCEPTS AND PRACTICE - PHI Learning
AN INTRODUCTION TO OPERATING SYSTEMS : CONCEPTS AND PRACTICE - PHI LearningPHI Learning Pvt. Ltd.
 

Similar to ITFT_Device management in Operating System (20)

computer system structure
computer system structurecomputer system structure
computer system structure
 
Operating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / OutputOperating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / Output
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdf
 
I/O Organization
I/O OrganizationI/O Organization
I/O Organization
 
Unit v: Device Management
Unit v: Device ManagementUnit v: Device Management
Unit v: Device Management
 
comporgppt.pptx
comporgppt.pptxcomporgppt.pptx
comporgppt.pptx
 
1_to_10.pdf
1_to_10.pdf1_to_10.pdf
1_to_10.pdf
 
OS Introduction
OS IntroductionOS Introduction
OS Introduction
 
operatingsystem03handlingofinterrupts-210603182850.pdf
operatingsystem03handlingofinterrupts-210603182850.pdfoperatingsystem03handlingofinterrupts-210603182850.pdf
operatingsystem03handlingofinterrupts-210603182850.pdf
 
operatingsystem03handlingofinterrupts-210603182850.pptx
operatingsystem03handlingofinterrupts-210603182850.pptxoperatingsystem03handlingofinterrupts-210603182850.pptx
operatingsystem03handlingofinterrupts-210603182850.pptx
 
Operating system 03 handling of interrupts
Operating system 03 handling of interruptsOperating system 03 handling of interrupts
Operating system 03 handling of interrupts
 
Lec 2
Lec 2Lec 2
Lec 2
 
Basic-Role-of-Operating-System-send.pptx
Basic-Role-of-Operating-System-send.pptxBasic-Role-of-Operating-System-send.pptx
Basic-Role-of-Operating-System-send.pptx
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
 
IO_ORGANIZATION.pdf
IO_ORGANIZATION.pdfIO_ORGANIZATION.pdf
IO_ORGANIZATION.pdf
 
Os introduction
Os introductionOs introduction
Os introduction
 
Os introduction
Os introductionOs introduction
Os introduction
 
Unit2 p1 io organization-97-2003
Unit2 p1 io organization-97-2003Unit2 p1 io organization-97-2003
Unit2 p1 io organization-97-2003
 
What is operating system
What is operating systemWhat is operating system
What is operating system
 
AN INTRODUCTION TO OPERATING SYSTEMS : CONCEPTS AND PRACTICE - PHI Learning
AN INTRODUCTION TO OPERATING SYSTEMS : CONCEPTS AND PRACTICE - PHI LearningAN INTRODUCTION TO OPERATING SYSTEMS : CONCEPTS AND PRACTICE - PHI Learning
AN INTRODUCTION TO OPERATING SYSTEMS : CONCEPTS AND PRACTICE - PHI Learning
 

More from Sneh Prabha

ITFT_Telephone network
ITFT_Telephone networkITFT_Telephone network
ITFT_Telephone networkSneh Prabha
 
ITFT_Switching techniques in networking
ITFT_Switching techniques in networkingITFT_Switching techniques in networking
ITFT_Switching techniques in networkingSneh Prabha
 
ITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded bufferITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded bufferSneh Prabha
 
ITFT_Osi reference model
ITFT_Osi reference modelITFT_Osi reference model
ITFT_Osi reference modelSneh Prabha
 
ITFT_Computer Network
ITFT_Computer NetworkITFT_Computer Network
ITFT_Computer NetworkSneh Prabha
 
ITFT_Microwave, infrared & bluetooth communication
ITFT_Microwave, infrared & bluetooth communicationITFT_Microwave, infrared & bluetooth communication
ITFT_Microwave, infrared & bluetooth communicationSneh Prabha
 
ITFT_Introduction to Operating system
ITFT_Introduction to Operating systemITFT_Introduction to Operating system
ITFT_Introduction to Operating systemSneh Prabha
 
ITFT_Inter process communication
ITFT_Inter process communicationITFT_Inter process communication
ITFT_Inter process communicationSneh Prabha
 
ITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemSneh Prabha
 
ITFT_Data Link Layer issues
ITFT_Data Link Layer  issuesITFT_Data Link Layer  issues
ITFT_Data Link Layer issuesSneh Prabha
 

More from Sneh Prabha (10)

ITFT_Telephone network
ITFT_Telephone networkITFT_Telephone network
ITFT_Telephone network
 
ITFT_Switching techniques in networking
ITFT_Switching techniques in networkingITFT_Switching techniques in networking
ITFT_Switching techniques in networking
 
ITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded bufferITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded buffer
 
ITFT_Osi reference model
ITFT_Osi reference modelITFT_Osi reference model
ITFT_Osi reference model
 
ITFT_Computer Network
ITFT_Computer NetworkITFT_Computer Network
ITFT_Computer Network
 
ITFT_Microwave, infrared & bluetooth communication
ITFT_Microwave, infrared & bluetooth communicationITFT_Microwave, infrared & bluetooth communication
ITFT_Microwave, infrared & bluetooth communication
 
ITFT_Introduction to Operating system
ITFT_Introduction to Operating systemITFT_Introduction to Operating system
ITFT_Introduction to Operating system
 
ITFT_Inter process communication
ITFT_Inter process communicationITFT_Inter process communication
ITFT_Inter process communication
 
ITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemITFT_File system interface in Operating System
ITFT_File system interface in Operating System
 
ITFT_Data Link Layer issues
ITFT_Data Link Layer  issuesITFT_Data Link Layer  issues
ITFT_Data Link Layer issues
 

Recently uploaded

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 

ITFT_Device management in Operating System

  • 2. Content • Device management approaches • I/O system organization • Direct I/O and Memory Mapped I/O • Direct I/O with polling • Interrupt driven direct I/O • Direct memory access • Buffering • Device drivers
  • 3. Device Management Approaches (1) • Direct I/O – CPU software explicitly transfer data to and from the controller’s data registers • Direct I/O with polling – the device management software polls the device controller status register to detect completion of the operation; device management is implemented wholly in the device driver, if interrupts are not used • Interrupt driven direct I/O – interrupts simplify the software’s responsibility for detecting operation completion; device management is implemented through the interaction of a device driver and interrupt routine
  • 4. Device Management Approaches (2) • Memory mapped I/O – device addressing simplifies the interface (device seen as a range of memory locations); • Memory mapped I/O with polling – the device management software polls the device controller status register to detect completion of the operation; device management is implemented wholly in the device driver. • Interrupt driven I/O – interrupts simplify the software’s responsibility for detecting operation completion; device management is implemented through the interaction of a device driver and interrupt routine • Direct memory access – involves designing of hardware to avoid the CPU perform the transfer of information between the device (controller’s data registers) and the memory
  • 5. I/O system organization • An application process uses a device by issuing commands and exchanging data with the device management (device driver). • Device driver responsibilities: • Implement communication APIs that abstract the functionality of the device • Provide device dependent operations to implement functions defined by the API • API should be similar across different device drivers, reducing the amount of info an application programmer needs to know to use the device • Since each device controller is specific to a particular device, the device driver implementation will be device specific, to • Provide correct commands to the controller • Interpret the controller status register (CSR) correctly • Transfer data to and from device controller data registers as required for correct device operation Application Process File Manager Device Driver Device controller command status data Hardware interface API
  • 6. I/O with polling • Each I/O operation requires that the software and hardware coordinate their operations to accomplish desired effect • In direct I/O pooling this coordination is done in the device driver; • While managing the I/O, the device manager will poll the busy/done flags to detect the operation’s completion; thus, the CPU starts the device, then polls the CSR to determine when the operation has completed
  • 7. I/O with polling - read 1. Application process requests a read operation 2. The device driver queries the CSR to determine whether de device is idle; if device is busy, the driver waits for it to become idle 3. The driver stores an input command into the controller’s command register, thus starting the device 4. The driver repeatedly reads the content of CSR to detect the completion of the read operation 5. The driver copies the content of the controller's data register(s) into the main memory user’s process’s space. read (device, …); Device controller command status data Hardware interface System Interface data read function write function 1 2 3 4 Datatransfer 5
  • 8. I/O with polling - write 1. The application process requests a write operation 2. The device driver queries the CSR to determine if the device is idle; if busy, it will wait to become idle 3. The device driver copies data from user space memory to the controller’s data register(s) 4. The driver stores an output command into the command register, thus starting the device 5. The driver repeatedly reads the CSR to determine when the device completed its operation write (device, …); Device controller command status data Hardware interface System Interface data read function write function 1 2 4 5 Datatransfer 3
  • 9. Interrupt driven I/O • In a multiprogramming system the wasted CPU time (in polled I/O) could be used by another process; because the CPU is used by other processes in addition to the one waiting for the I/O operation completion, in multiprogramming system may result a sporadic detection of I/O completion; this may be remedied by use of interrupts • The reason for incorporating the interrupts into a computer hardware is to eliminate the need for a device driver to constantly poll the CSR • Instead polling, the device controller “automatically” notifies the device driver when the operation has completed.
  • 10. Overlapping CPU execution with device operation • The software interface to an I/O device usually enables the operating system to execute alternative processes when any specific process is waiting for I/O to complete, while preserving serial execution semantics for an individual process • That means that whenever the programmers will use read statement in a program, they will know that the next instruction will not execute until the read instruction has completed. • Consider the following code: … read (device, “%d”, x); y=f(x); ….
  • 11. Direct memory access • Traditional I/O • Polling approach: • CPU transfer data between the controller data registers and the primary memory • Output operations - device driver copies data from the application process data area to the controller; vice versa for input operations • Interrupt driven I/O approach - the interrupt handler is responsible for the transfer task Primary memory CPU Controller Device
  • 12. Direct memory access• DMA controllers are able to read and write information directly from /to primary memory, with no software intervention • The I/O operation has to be initiated by the driver • DMA hardware enables the data transfer to be accomplished without using the CPU at all • The DMA controller must include an address register (and address generation hardware) loaded by the driver with a pointer to the relevant memory block; this pointer is used by the DMA hardware to locate the target block in primary memory Primary memory CPU Controller Device
  • 13. Design Objectives • Efficiency • Most I/O devices are extremely slow compared with the processor and the main memory • Buffering is one way to deal with this issue • Generality • It is desirable to handle all devices in a uniform and consistent manner • Applies for both • The way the user processes see the devices • The way the operating system manages the I/O devices and operations
  • 14. Buffering • Buffering is the technique by which the device manager can keep slower I/O devices busy during times when a process is not requiring I/O operations. • Input buffering is the technique of having the input device read information into the primary memory before the process requests it. • Output buffering is the technique of saving information in memory and then writing it to the device while the process continues execution
  • 15. Device manager design • Designing the device manager involves to invoke controller specific I/O operations while satisfying: • Create an API that implements the I/O functions available to the device, still compliant with interfaces implemented by other drivers; this is called device driver interface • Achieve correct coordination among the application processes, drivers and device controllers • Optimize the overall machine performance with correct driver strategies
  • 16. Device driver interface • Each operating system defines an architecture for its device management system • The designs are different from operating system to operating system; there is no universal organization • Each operating system has two major interfaces to the device manager: • The driver API • The interface between a driver and the operating system kernel