I/O Resource Management The operating system is responsible for: Issuing commands to I/O devices Handling all interrupts and errors generated by the.

Slides:



Advertisements
Similar presentations
CP1610: Introduction to Computer Components
Advertisements

Computer Parts There are many parts that work together to make a computer work.
1 Operating Systems Input/Output Management. 2 What is the I/O System A collection of devices that different sub- systems of a computer use to communicate.
Lecture 11: Operating System Services. What is an Operating System? An operating system is an event driven program which acts as an interface between.
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Parts & Functions of a Computer. 2 Functions of a Computer.
Operating System - Overview Lecture 2. OPERATING SYSTEM STRUCTURES Main componants of an O/S Process Management Main Memory Management File Management.
1/21/2010CSCI 315 Operating Systems Design1 Computer System Structures Notice: The slides for this lecture have been largely based on those accompanying.
A “Java Fun For Everyone” Interactive Quiz
INPUT-OUTPUT ORGANIZATION
System Resources INFO1119 (Fall 2012).
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
1-1 Introduction to Computer Science Computer Hardware Components: CPU, Memory, and I/O What is the typical configuration of a computer sold today? Minia.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
Configuration.
1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)
Computer Parts There are many parts that work together to make a computer work.
System Resources.
Motherboard (Main board)
NETW 3005 I/O Systems. Reading For this lecture, you should have read Chapter 13 (Sections 1-4, 7). NETW3005 (Operating Systems) Lecture 10 - I/O Systems2.
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
The 4 functions of a computer are 1.Input 2.Output 3.Storage 4.Processing.
I/O (Input and Output) An I/O device acts as an interface between a computer and a user Without I/O devices, a computer is nothing but a box full of.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 1: Introduction What Operating Systems Do Computer-System.
There are many parts that work together to make a computer work. System Unit Computer Parts.
 There are many parts that work together to make a computer work.
O PERATING S YSTEM. What is an Operating System? An operating system is an event driven program which acts as an interface between a user of a computer,
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 2 How Hardware and Software Work Together.
Computer Parts There are many parts that work together to make a computer work.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.
Introduction To Computers
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Computer Parts There are many parts that work together to make a computer work.
PCs ENVIRONMENT and PERIPHERALS Lecture 4. An expansion cards: - An expansion card (expansion board) is an electronic circuit board that adds more functionality.
INTRODUCTION TO COMPUTERS. A computer system is an electronic device used to input data, process data, store data for later use and produce output in.
COMPUTER PARTS INSIDE - OUTSIDE. Computer Parts There are many parts that work together to make a computer work.
Computer Parts There are many parts that work together to make a computer work.
Sara Naheed Amjad Information Technology
Input / Output Chapter 9.
Sara Naheed Amjad Information Technology
Power Supply.
Operating Systems & System Software
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Operating System Review
Hardware vs. Software Question 1 What is hardware?
Operating Systems (CS 340 D)
Input/Output.
I/O Resource Management: Software
CS 286 Computer Organization and Architecture
Course Name: Computer Application Topic: Central Processing Unit (CPU)
CS703 - Advanced Operating Systems
IRQ, DMA and I/O Ports - Introduction -
Computer Parts There are many parts that work together to make a computer work.
Computer Parts There are many parts that work together to make a computer work.
Computer Parts There are many parts that work together to make a computer work.
Computer Architecture
Computer Parts There are many parts that work together to make a computer work.
Operating System Review
Computer Parts There are four main equipment functions of a computer system: Input, Processing, Storage and Output. Input: the transferring of information.
CS703 - Advanced Operating Systems
Computer Parts There are four main equipment functions of a computer system: Input, Processing, Storage and Output. Input: the transferring of information.
COMPUTER PERIPHERALS AND INTERFACES
Computer Parts There are many parts that work together to make a computer work.
Computer Parts There are many parts that work together to make a computer work.
Computer Parts There are many parts that work together to make a computer work.
Computer Parts There are many parts that work together to make a computer work.
A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting
Presentation transcript:

I/O Resource Management

The operating system is responsible for: Issuing commands to I/O devices Handling all interrupts and errors generated by the devices. The operating system needs some way to efficiently manage all of these devices and the flow of data coming in from them, or going out to them. These responsibilities are complicated by the fact that many processes being executed by the operating system may need to share the same I/O resources.

I/O Management Perspectives We will examine I/O resource management from four perspectives: –Hardware Perspective Device Controllers Preemptable and non-preemptable resources Block and character devices –Software Perspective (Next Lecture) –Managing Magnetic Disks (Next Lecture) –Role of the System Clock (Next Lecture)

What are I/O Resources? Input/Output resources are any I/O devices (and their supporting hardware and software components) that are available for use by processes. Resources are frequently shared between processes –The operating system must have some way to regulate access to the resources to prevent conflicts and deadlocks.

Device Controllers Device controllers are components on the motherboard (or on expansion cards) that act as an interface between the CPU and the actual device. Device controllers interpret the instructions by comparing them a list of device commands stored on the controller, which then forwards the appropriate command directly to the device. When a device needs to access the CPU, the device controller issues an Interrupt Request (IRQ),

Common Device Controllers Keyboard Controller – controls the keyboard and PS/2 mouse (not always needed in newer systems) DMA Controller – controls Direct Memory Access Network Adaptor Controller – controls the Network Adaptor/ Network Interface Card (NIC) IDE Controller – controls EIDE devices, including the hard disk and CD/DVD drive Graphics Adaptor – controls video output devices, such as a monitor or LCD projector USB Controller – controls devices connected by USB

The Interrupt Controller The interrupt controller is a special component on the motherboard that: –manages all interrupts, –prioritizes them based on a predetermined priority sequence, and –forwards the interrupts to the CPU.

When a device wants the CPU’s attention, its device driver initiates an interrupt request (IRQ). Each type of device has a different IRQ number assigned to it. When multiple devices signal for the CPU’s attention at the same time, the interrupt controller checks their IRQ number, and places them in a queue. The device with the lowest IRQ number gets the highest priority

Who is trying to call me? This better be important! Don’t worry… I can direct traffic for you! The CPU (Everyone wants his attention!) The Interrupt Controller is like a police offer directing traffic at a busy roundabout. Some devices get priority over others

Managing Interrupts A typical computer has two interrupt controllers that function as one unit. Each controller has eight lines. Since every function of the computer needs the system clock in order to manage its timing, the highest priority is given to the system clock (which is given IRQ 0). The keyboard gets the next highest priority (IRQ 1).

Although we say that the higher the IRQ number is, the lower priority the device is given, devices using IRQ numbers 8-15 actually get higher priority than devices using IRQ numbers 3-7. All interrupt requests coming from the second controller are actually sent to IRQ number 2 on the first controller, which then forwards them on to the CPU.

CPU System Clock Keyboard Floppy PS/2 Mouse Interrupt Controller Figure 5.2 Structure of the Interrupt Controller System

Preemptable I/O Resources Preemptable I/O resources are resources that can be taken away from a process that is currently using them. In order to be considered a preemptable resource, the reallocation of the resource must have no negative effect on the processes involved (other than the overall time needed to complete the process execution). A common example would be memory.

Non-Preemptable I/O Resources Non-preemptable I/O resources are resources that cannot be taken away from a process that is currently using them without having some negative effect. An example of a non-preemptable resource would be a CD/DVD drive.

Deadlocks Deadlocks occur when multiple processes are holding I/O resources, and they each require resources that currently in use by another process that is unwilling to release the resource. When this occurs, neither process is able to make any progress.

Block I/O Devices Some I/O devices send and receive data from the computer system in blocks of characters. The operating system manages reading and writing data to block devices by using a data buffer system. –Data buffers are allocated to hold a single block of characters. –When the buffer is full, the data in the buffer is then sent to or from the I/O device in one chunk. Common examples of block I/O devices are hard disks, optical storage drives, and memory regions.

Character I/O Devices Some I/O devices send and receive data from the computer one character at a time. Common examples include virtual terminals and serial modems. Character transmission to character devices is unbuffered.