I/O and Device Drivers
|
|
- Amice Carpenter
- 5 years ago
- Views:
Transcription
1 I/O and Device Drivers Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University
2 Topics Covered I/O Components I/O Interface I/O Operations Device Drivers 2
3 I/O Components
4 CPU Execution and I/O The two main jobs of a computer CPU execution Input/Output Usually, the main job is I/O The CPU execution is incidental 4
5 Typical I/O Data Rates 5
6 Variety of I/O Devices A computer is equipped with CPU and memory Many I/O devices VGA card, network card, disk controller, Network card CPU Main board Memory Hard disk 6
7 Types of I/O Devices Character devices (mouse, terminal, etc) Commands include get and put Block devices (disk drive, flash drive, etc) Commands include read, write, and seek Raw I/O or file-system access Memory-mapped file I/O access possible mmap( ) function: convenient programming interface mmap is faster than read, because of single copy operation Network devices NIC (network interface card) 7
8 Character Device: Mouse (1) 8
9 Character Device: Mouse (2) Brief history First mechanical mouse with a roller ball Bill English at Xerox PARC in the early 1970s Introduced by Apple Macintosh in 1984 They have helped to completely redefine the way we use computers since then Became the PC-human interface of choice quickly when Windows 3.1 made Graphical User Interface (GUI) a standard Optical Mouse Gary Gordon at Agilent Laboratories in
10 Character Device: Mouse (3) Optical mouse Tiny camera takes images per second Camera = laser + a CMOS sensor Images sent for analysis to a DSP operating typically at 18 MIPS DSP detects patterns in images and thus estimates motion Data ports are used for two-way communication Upon mouse movement, a 3/5-byte packet is sent to the port Typical description of the data (x s, y s ), (x d, y d ), mouse-up/down This data packet is decoded by the mouse driver and its internal co-ordinates are updated 10
11 Character Device: Mouse (4) PC mouse system (data transfer chain) Sensors (CMOS) Mouse Controller (DSP) Communication link (Cable/Wireless) Data interface (Serial, PS/2, USB) Device driver Application 11
12 Character Device: Mouse (5) How OS collaborate with mouse driver Applications wait for mouse movement or click When a mouse movement occurs, the mouse driver informs the event manager of OS about the event Event manager determines whether to queue the event or not Mouse driver automatically tracks the mouse and displays the cursor as the user moves the mouse When a mouse-up or mouse-down event occurs, the event manager records the action in the event queue and informs the active application about it The active program decides what action is to be taken Ex: Show the mouse cursor, hide the cursor and draw something onto screen, etc. 12
13 Character Device: Terminal (1) Example DEC VT100, Heathkit Z19 13
14 Character Device: Terminal (2) Terminal = keyboard + display Keyboard and display are handled independent in most systems (no automatic echo, full duplex serial link) I/O registers are connected to host via serial line Keyboard data/status registers Display data/status registers One interrupt per character One character (8-bit data or control function) is sent at a time ASCII encoding is used: A is 0x65 Slow speed characters per second Measure: Baud rate (bits per second) 14
15 Character Device: Terminal (3) Keyboard input When a character is typed: Its ASCII code is placed in bits [7:0] of keyboard data register The ready bit of keyboard status register is set to zero Keyboard is disabled Any typed characters will be ignored keyboard data KBDR ready bit KBSR When KBDR is read: The ready bit of KBSR is set to one Keyboard is enabled 15
16 Character Device: Terminal (4) Display output When monitor is ready to display another character The ready bit of display status register is set to one DDR display data ready bit DSR When data is written to DDR: The ready bit of DSR is set to zero Character in DDR is displayed Any other character data written to DDR is ignored 16
17 Character Device: Terminal (5) Keyboard echo Usually, input character is also printed to screen User gets feedback on character typed and knows it s ok to type the next character 17
18 Block Device: Disk Drive (1) 18
19 Block Device: Disk Drive (2) Disk characteristics (technology of 2012) 2-6 heads (platters x 2) Platter diameter between 0.8" and 8" 16,383 tracks (cylinders) per surface 63 sectors per track Sector size of 512 to 4096 bytes 4KB physical emulated at 512-byte sectors Capacity ranges up to 4 TB 19
20 Block Device: Disk Drive (3) Disk operation Select desired read/write head Move heads to the correct track ( seek ) Seek time Wait for disk to rotate desired sector into position Rotational delay Read and write sector while it spins by Transfer latency Disk performance Seek time: 0-50 ms (average ms) Rotational delay: 0-16 ms Typical drive spins at RPM 20
21 Network Interfaces Network interfaces UART and RS-232, USB, ethernet, etc 21
22 Layering (Protocol Stack) Port no. Data Message IP address TCP Data Segment/Datagram MAC address IP TCP Data Datagram Ethernet IP TCP Data Frame Bit stream Network Adapter (NIC) 22
23 TCP Socket Programming Flow Client socket() well-known port socket() bind() listen() Server Implicit bind connect() write() Connection establishment TCP three-way handshake Data (request) accept() Block until connection from client read() Process requests read() close() Data (reply) End-of-file notification write() read() close() 23
24 Clocks and Timers Provide three basic functions Give the current time Give the elapsed time Set a timer to trigger operation X at time Y Programmable interval timer The hardware for last two functions Wait and generate an interrupt CPU scheduler uses this Unfortunately, the system calls for timer functions are not standardized across operating systems alarm() in UNIX timer_create() and timer_settime() in POSIX 24
25 Unix Time Values Two different time values Calendar time Counts the number of seconds since the Epoch (Jan 1, 1970) UTC (coordinated Universal Time, Greenwich Mean Time) Process time Measures the CPU time used by a process Process time is measured in clock ticks Usually, 50, 60, or 100 ticks per second CPU time = User CPU time + System CPU time Lack of timer support on Unix We can get around by using alarm( ) system call The unit is second ioctl on UNIX covers odd aspects of I/O such as clocks and timers Catchall for I/O operations 25
26 Linux The timer interrupt is set to a default frequency linux/param.h 100 Hz for most hardware platforms Jiffies The number of clock ticks since the operating system was booted When the timer interrupt occurs, the jiffies value is incremented 26
27 I/O Interface and Operations
28 I/O Bus and Connection Devices are attached to I/O bus ISA, PCI, EISA, SCSI, CPU VGA Ethernet Sound I/O BUS 28
29 I/O Buses and Connections 29
30 Generic Model of I/O Interface I/O Interface 30
31 I/O Registers An I/O port typically consists of four registers Status register: states read by the host Whether the current command has completed Whether a byte is available to be read from data-in register Whether there is a device error Control register: command written by the host Start a command and change the mode of a device Data-in register: input read by the host Data-out register: output written by the host 31
32 I/O Register Access Memory-mapped IO Data Bus, Address Bus, Control Bus are shared e.g., Motorolla Memory and I/O access use the same instructions Port-mapped IO Data Bus and Address Bus are shared, but Control Bus not shared e.g., Intel x86 and Z80 Memory and I/O access use different instructions Data Channel Separate Data Bus, Address Bus, and Control Bus Dedicated I/O processors are used 32
33 Memory-Mapped I/O Memory mapped I/O uses special memory locations in the normal address space Possible to design address decoder to divert read or write to a device instead of memory Use move instead of in and out PCs use both port-mapped mapped I/O and memory-mapped I/O Graphics controller has I/O ports for basic control operations But it also has a large memory-mapped region to hold screen contents The controller generates the screen image based on the contents of this memory Memory-mapped I/O is vulnerable to accidental modification by using pointers, but protected memory reduces this risk 33
34 Port-mapped I/O and Address Space Port-mapped IO structure provides two address spaces Memory address space and I/O (or port) address space The I/O address space uses the same address pins on the processor as the memory address space RD and WR lines determine whether data being read or written When M/IO line is high, memory is selected When M/IO line is low, I/O is selected 34
35 Instructions for Port-Mapped I/O Port-mapped input/output uses special instructions Register I/O instructions e.g., in and out (80386) Move data between I/O ports and general registers Data may be a byte, word, or doubleword Block I/O instructions e.g., ins and outs (80386) Move blocks of data between I/O ports and memory space 35
36 Device I/O Port Locations on PCs (partial) 36
37 Basic I/O Operations 1. CPU checks I/O module status 2. I/O module return status 3. If ready, CPU requests data transfer 4. I/O module gets data from device 5. I/O module transfers data to CPU Variations for output such as DMA 37
38 Two Types of I/O Polling (Programmed I/O) The system repeatedly checks the status of the I/O module if data can be read or written Usually used for character devices Interrupts (Interrupt-Driven I/O) The system sleeps the process until data can be read or written and wakes it up upon receiving the awaited interrupt Usually used for character and block devices 38
39 DMA (Direct Memory Access) Interrupt driven and programmed I/O require active CPU intervention Transfer rate is limited CPU is tied up DMA (Direct Memory Access) DMA controller is required Bypasses CPU to transfer data directly between I/O device and memory 39
40 DMA Controllers To do DMA, I/O device attached to DMA controller Multiple devices can be connected to one controller Controller itself seen as a memory mapped I/O device Processor initializes start memory address, transfer size, etc. DMA controller takes care of bus arbitration and transfer details That s why buses support arbitration and multiple masters 40
41 Cycle Stealing When the DMA controller seizes the memory bus, The CPU is momentarily prevented from accessing main memory But, it can still access data items in its primary and secondary cache The cycle stealing can slow down the CPU computation However, offloading the data-transfer work to a DMA controller generally improves the total system performance 41
42 Device Drivers
43 Types of Linux Devices Character Devices Transfer unit: character (byte) Can be accessed like a file (open, close, read, write, ) (Ex) console, keyboard, mouse, (/dev/tty1, /dev/lp1, ) Block Devices Transfer unit: block (usually some kilobytes) Can be accessed like a file (open, close, read, write, ) (Ex) hard disk drive, CD-ROM drive, (/dev/hda1, ) Network Interfaces Not mapped to neither character or block devices (Ex) eth0 43
44 Device Files Represent an I/O device /dev/tty0 = first serial port Attributes Type: block or character Major number: specifies device driver Minor number: argument to device driver, kernel don t care Name Type Major Minor Desc /dev/fd0 Block 2 0 Floppy Disk /dev/had Block 3 0 First IDE disk /dev/hda2 Block 3 2 Second partition of first IDE disk /dev/hdb Block 3 64 Second IDE disk /dev/console Char 5 1 Console /dev/null char 1 3 Null device 44
45 Structure of Character Device Drivers Character Device Table 0 Index = major number 1 2 Name File operations Character Device Driver Device Name Character Device Registered when device being installed Open Read Write Close Ioctl Open code Read code write code 45
46 Character Device Drivers To applications Device file = Regular file To file system Regular file: read from or write to disk drive Device file: invoke device driver operations open: initialize device read: device data to user buffer write: user buffer to device close: called when removed from device table ioctl: device specific control (Ex) baud rate change, access permission set 46
47 Structure of Block Device Drivers Block Device Table Block Device Driver Open Read Write Close Ioctl Open code Handling request code (strategy routine) Block Device Buffer Cache Manager Request queue block Block Read Block Write char Buffer Buffer Block Buffer Buffer (Buffer Cache) 47
48 Interrupt Handling in Device Drivers Register interrupt handling routine Kernel invokes registered handler when interrupt occurs Linux interrupt handling (two-level processing) Interrupt handler (top half) High priority function (such as acknowledging to PIC) Run with interrupt disabled Invoked every time interrupt occurred Marks a bottom half as active Bottom half Low priority function (such as transferring data from device) Run with interrupt enabled Execution may be deferred 48
49 Bottom Half Proc In this example, the bottom half is activated twice but executed once Proc Intr_1 Ack Intr_1, activate bottom_half_1 Int_handler_1 Interrupt disabled Intr_2 Ack Intr_2, activate bottom_half_1 Int_handler_2 Interrupt disabled Bottom_half_1 Interrupt enabled 49
50 General Device Driver Routines (1) Open Reads minor number Initializes the appropriate device Initializes the device driver internal data structures If needed, changes the file operation table (according to the minor number) Increases the usage counter If needed, registers the interrupt handler and enable IRQ Close Frees dynamically allocated data structures Decreases the usage counter Un-registers the interrupt handler 50
51 General Device Driver Routines (2) Read/Write Polling vs. interrupt driven Polling Checks the device if data can be read or written Usually used for character devices Interrupt Driven Sleeps the process until data can be read or written Usually used for character and block devices Blocking vs. non-blocking Blocking If data cannot be read or written, waits until ready Non-blocking If data cannot be read or written, immediately returns 51
52 General Device Driver Routines (3) Character Device: Polling and Blocking I/O Read Character Device: Non-Blocking I/O Read Check Device Check Device Device ready? No Device ready? No Yes Yes Read Data (device user) Read Data (device user) Return to User Return to User 52
53 General Device Driver Routines (4) Character Device: Interrupt Driven and Blocking I/O Read Check Device Read ready interrupt Device Ready? No Wakeup process Yes Read Data (device user) Sleep process Return to User 53
54 General Device Driver Routines (5) Block Device: Interrupt Driven and Blocking I/O Write Write complete interrupt Check write buffer Wakeup process Buffer full? No Yes Sleep process Wakeup by another process Issue Write Command Sleep process Return to User 54
55 55
Input/Output Problems. External Devices. Input/Output Module. I/O Steps. I/O Module Function Computer Architecture
168 420 Computer Architecture Chapter 6 Input/Output Input/Output Problems Wide variety of peripherals Delivering different amounts of data At different speeds In different formats All slower than CPU
More informationOperating Systems 2010/2011
Operating Systems 2010/2011 Input/Output Systems part 1 (ch13) Shudong Chen 1 Objectives Discuss the principles of I/O hardware and its complexity Explore the structure of an operating system s I/O subsystem
More informationCS330: Operating System and Lab. (Spring 2006) I/O Systems
CS330: Operating System and Lab. (Spring 2006) I/O Systems Today s Topics Block device vs. Character device Direct I/O vs. Memory-mapped I/O Polling vs. Interrupts Programmed I/O vs. DMA Blocking vs. Non-blocking
More informationGeneric Model of I/O Module Interface to CPU and Memory Interface to one or more peripherals
William Stallings Computer Organization and Architecture 7 th Edition Chapter 7 Input/Output Input/Output Problems Wide variety of peripherals Delivering different amounts of data At different speeds In
More informationOrganisasi Sistem Komputer
LOGO Organisasi Sistem Komputer OSK 5 Input Output 1 1 PT. Elektronika FT UNY Input/Output Problems Wide variety of peripherals Delivering different amounts of data At different speeds In different formats
More informationThe control of I/O devices is a major concern for OS designers
Lecture Overview I/O devices I/O hardware Interrupts Direct memory access Device dimensions Device drivers Kernel I/O subsystem Operating Systems - June 26, 2001 I/O Device Issues The control of I/O devices
More informationInput/Output Systems
Input/Output Systems CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those from an earlier edition of the course text Operating
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance I/O Hardware Incredible variety of I/O devices Common
More informationComputer Organization ECE514. Chapter 5 Input/Output (9hrs)
Computer Organization ECE514 Chapter 5 Input/Output (9hrs) Learning Outcomes Course Outcome (CO) - CO2 Describe the architecture and organization of computer systems Program Outcome (PO) PO1 Apply knowledge
More informationOperating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester
Operating System: Chap13 I/O Systems National Tsing-Hua University 2016, Fall Semester Outline Overview I/O Hardware I/O Methods Kernel I/O Subsystem Performance Application Interface Operating System
More informationCSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware
CSE 120 July 27, 2006 Day 8 Input/Output Instructor: Neil Rhodes How hardware works Operating Systems Layer What the kernel does API What the programmer does Overview 2 Kinds Block devices: read/write
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance Objectives Explore the structure of an operating
More informationCS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14
CS 134 Operating Systems April 8, 2013 Lecture 20 Input/Output Instructor: Neil Rhodes Hardware How hardware works Operating system layer What the kernel does API What the programmer does Overview 2 kinds
More informationOPERATING SYSTEMS CS136
OPERATING SYSTEMS CS136 Jialiang LU Jialiang.lu@sjtu.edu.cn Based on Lecture Notes of Tanenbaum, Modern Operating Systems 3 e, 1 Chapter 5 INPUT/OUTPUT 2 Overview o OS controls I/O devices => o Issue commands,
More informationOperating Systems. Introduction & Overview. Outline for today s lecture. Administrivia. ITS 225: Operating Systems. Lecture 1
ITS 225: Operating Systems Operating Systems Lecture 1 Introduction & Overview Jan 15, 2004 Dr. Matthew Dailey Information Technology Program Sirindhorn International Institute of Technology Thammasat
More informationModule 12: I/O Systems
Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Performance 12.1 I/O Hardware Incredible variety of I/O devices Common
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance 13.2 Silberschatz, Galvin
More informationChapter 13: I/O Systems. Chapter 13: I/O Systems. Objectives. I/O Hardware. A Typical PC Bus Structure. Device I/O Port Locations on PCs (partial)
Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance 13.2 Silberschatz, Galvin
More informationI/O AND DEVICE HANDLING Operating Systems Design Euiseong Seo
I/O AND DEVICE HANDLING 2016 Operating Systems Design Euiseong Seo (euiseong@skku.edu) I/O Hardware Incredible variety of I/O devices Common concepts Port Bus (daisy chain or shared direct access) Controller
More informationby I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS
by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests
More informationLecture 13 Input/Output (I/O) Systems (chapter 13)
Bilkent University Department of Computer Engineering CS342 Operating Systems Lecture 13 Input/Output (I/O) Systems (chapter 13) Dr. İbrahim Körpeoğlu http://www.cs.bilkent.edu.tr/~korpe 1 References The
More informationUC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara
Operating Systems Christopher Kruegel Department of Computer Science http://www.cs.ucsb.edu/~chris/ Input and Output Input/Output Devices The OS is responsible for managing I/O devices Issue requests Manage
More informationSilberschatz and Galvin Chapter 12
Silberschatz and Galvin Chapter 12 I/O Systems CPSC 410--Richard Furuta 3/19/99 1 Topic overview I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O requests to hardware operations
More informationI/O Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University
I/O Systems Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics Device characteristics Block device vs. Character device Direct I/O vs.
More informationChapter 13: I/O Systems. Operating System Concepts 9 th Edition
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne 2013 Chapter 13: I/O Systems Overview I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations
More information操作系统概念 13. I/O Systems
OPERATING SYSTEM CONCEPTS 操作系统概念 13. I/O Systems 东南大学计算机学院 Baili Zhang/ Southeast 1 Objectives 13. I/O Systems Explore the structure of an operating system s I/O subsystem Discuss the principles of I/O
More informationI/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)
I/O Systems Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) I/O Systems 1393/9/15 1 / 57 Motivation Amir H. Payberah (Tehran
More informationModule 12: I/O Systems
Module 12: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Performance Operating System Concepts 12.1 Silberschatz and Galvin c
More informationI/O SYSTEMS. Sunu Wibirama
I/O SYSTEMS Sunu Wibirama Are you surely IT class member? Then you should know these pictures... Introduction Main job of computer : I/O and processing (the latter is rarely happened) Browsing: read and
More informationChe-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University
Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University l Chapter 10: File System l Chapter 11: Implementing File-Systems l Chapter 12: Mass-Storage
More informationI/O Systems. Jo, Heeseung
I/O Systems Jo, Heeseung Today's Topics Device characteristics Block device vs. Character device Direct I/O vs. Memory-mapped I/O Polling vs. Interrupts Programmed I/O vs. DMA Blocking vs. Non-blocking
More informationChapter 8. A Typical collection of I/O devices. Interrupts. Processor. Cache. Memory I/O bus. I/O controller I/O I/O. Main memory.
Chapter 8 1 A Typical collection of I/O devices Interrupts Cache I/O bus Main memory I/O controller I/O controller I/O controller Disk Disk Graphics output Network 2 1 Interfacing s and Peripherals I/O
More informationModule 11: I/O Systems
Module 11: I/O Systems Reading: Chapter 13 Objectives Explore the structure of the operating system s I/O subsystem. Discuss the principles of I/O hardware and its complexity. Provide details on the performance
More informationOperating Systems. V. Input / Output
Operating Systems V. Input / Output Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Devices of a Computer System Applications OS CPU Memory
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance 13.2 Silberschatz, Galvin
More informationCSE 451: Operating Systems Winter I/O System. Gary Kimura
CSE 451: Operating Systems Winter 2012 I/O System Gary Kimura What s Ahead Principles of I/O Hardware Structuring of I/O Software Layers of an I/O System Operation of an I/O System 2 Hardware Environment
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne 2013! Chapter 13: I/O Systems I/O Hardware" Application I/O Interface" Kernel I/O Subsystem" Transforming I/O Requests to Hardware Operations" STREAMS"
More informationComputer Architecture CS 355 Busses & I/O System
Computer Architecture CS 355 Busses & I/O System Text: Computer Organization & Design, Patterson & Hennessy Chapter 6.5-6.6 Objectives: During this class the student shall learn to: Describe the two basic
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems DM510-14 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations STREAMS Performance 13.2 Objectives
More informationInput-Output (I/O) Input - Output. I/O Devices. I/O Devices. I/O Devices. I/O Devices. operating system must control all I/O devices.
Input - Output Input-Output (I/O) operating system must control all I/O devices issue commands to devices catch interrupts handle errors provide interface between devices and rest of system main categories
More informationCOT 4600 Operating Systems Fall Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM Lecture 23 Attention: project phase 4 due Tuesday November 24 Final exam Thursday December 10 4-6:50
More informationDevice-Functionality Progression
Chapter 12: I/O Systems I/O Hardware I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Incredible variety of I/O devices Common concepts Port
More informationChapter 12: I/O Systems. I/O Hardware
Chapter 12: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations I/O Hardware Incredible variety of I/O devices Common concepts Port
More informationRef: Chap 12. Secondary Storage and I/O Systems. Applied Operating System Concepts 12.1
Ref: Chap 12 Secondary Storage and I/O Systems Applied Operating System Concepts 12.1 Part 1 - Secondary Storage Secondary storage typically: is anything that is outside of primary memory does not permit
More informationChapter 12: I/O Systems
Chapter 12: I/O Systems Chapter 12: I/O Systems I/O Hardware! Application I/O Interface! Kernel I/O Subsystem! Transforming I/O Requests to Hardware Operations! STREAMS! Performance! Silberschatz, Galvin
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations STREAMS Performance Silberschatz, Galvin and
More informationChapter 12: I/O Systems. Operating System Concepts Essentials 8 th Edition
Chapter 12: I/O Systems Silberschatz, Galvin and Gagne 2011 Chapter 12: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations STREAMS
More informationIntroduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices
Introduction Operating Systems Input/Output Devices (Ch12.1-12.3, 12.7; 13.1-13.3, 13.7) One OS function is to control devices significant fraction of code (80-90% of Linux) Want all devices to be simple
More informationIntroduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. (done)
Introduction Operating Systems Input/Output Devices (Ch 13.3, 13.5; 14.1-14.3) One OS function is to control devices significant fraction of code (80-90% of Linux) Want all devices to be simple to use
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance 13.2 Silberschatz, Galvin
More informationIntroduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices
Introduction Operating Systems Input/Output Devices (Ch12.1-12.3, 12.7; 13.1-13.3, 13.7) One OS function is to control devices significant fraction of code (80-90% of Linux) Want all devices to be simple
More informationI/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13
I/O Handling ECE 650 Systems Programming & Engineering Duke University, Spring 2018 Based on Operating Systems Concepts, Silberschatz Chapter 13 Input/Output (I/O) Typical application flow consists of
More informationLecture 15: I/O Devices & Drivers
CS 422/522 Design & Implementation of Operating Systems Lecture 15: I/O Devices & Drivers Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken from previous versions
More informationCSCI-GA Operating Systems I/O. Hubertus Franke
Operating Systems I/O CSCI-GA.2250-001 Hubertus Franke frankeh@cs.nyu.edu External devices that engage in I/O with computer systems can be grouped into three categories: Human readable suitable for communicating
More informationIntroduction to Computer Systems and Operating Systems
Introduction to Computer Systems and Operating Systems Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr Topics Covered 1. Computer History 2. Computer System
More informationOperating Systems. V. Input / Output. Eurecom
Operating Systems V. Input / Output Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Issues OS manages devices Protection Sharing Ease-of-use
More informationI/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)
I/O Fall 2011 Tore Larsen Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum) Big Picture Today we talk about I/O characteristics interconnection devices & controllers (disks
More informationI/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)
I/O Fall 2010 Tore Larsen Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum) Big Picture Today we talk about I/O characteristics interconnection devices & controllers (disks
More information[08] IO SUBSYSTEM 1. 1
[08] IO SUBSYSTEM 1. 1 OUTLINE Input/Output (IO) Hardware Device Classes OS Interfaces Performing IO Polled Mode Interrupt Driven Blocking vs Non-blocking Handling IO Buffering & Strategies Other Issues
More informationReading and References. Input / Output. Why Input and Output? A typical organization. CSE 410, Spring 2004 Computer Systems
Reading and References Input / Output Reading» Section 8.1-8.5, Computer Organization and Design, Patterson and Hennessy CSE 410, Spring 2004 Computer Systems http://www.cs.washington.edu/education/courses/410/04sp/
More informationINPUT/OUTPUT ORGANIZATION
INPUT/OUTPUT ORGANIZATION Accessing I/O Devices I/O interface Input/output mechanism Memory-mapped I/O Programmed I/O Interrupts Direct Memory Access Buses Synchronous Bus Asynchronous Bus I/O in CO and
More informationECE232: Hardware Organization and Design
ECE232: Hardware Organization and Design Lecture 29: Computer Input/Output Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Announcements ECE Honors Exhibition Wednesday, April
More informationAccessing I/O Devices Interface to CPU and Memory Interface to one or more peripherals Generic Model of IO Module Interface for an IO Device: CPU checks I/O module device status I/O module returns status
More informationComp 204: Computer Systems and Their Implementation. Lecture 18: Devices
Comp 204: Computer Systems and Their Implementation Lecture 18: Devices 1 Today Devices Introduction Handling I/O Device handling Buffering and caching 2 Operating System An Abstract View User Command
More informationInput/Output. 198:231 Introduction to Computer Organization Lecture 15. Instructor: Nicole Hynes
Input/Output 198:231 Introduction to Computer Organization Instructor: Nicole Hynes nicole.hynes@rutgers.edu 1 Organization of a Typical Computer System We ve discussed processor and memory We ll discuss
More informationChapter 13: I/O Systems
COP 4610: Introduction to Operating Systems (Spring 2015) Chapter 13: I/O Systems Zhi Wang Florida State University Content I/O hardware Application I/O interface Kernel I/O subsystem I/O performance Objectives
More informationDevices. Today. Comp 104: Operating Systems Concepts. Operating System An Abstract View 05/01/2017. Devices. Devices
Comp 104: Operating Systems Concepts Devices Today Devices Introduction Handling I/O Device handling Buffering and caching 1 2 Operating System An Abstract View User Command Interface Processor Manager
More informationINPUT/OUTPUT ORGANIZATION
INPUT/OUTPUT ORGANIZATION Accessing I/O Devices I/O interface Input/output mechanism Memory-mapped I/O Programmed I/O Interrupts Direct Memory Access Buses Synchronous Bus Asynchronous Bus I/O in CO and
More informationOperating Systems (CS1022) Input/Output. Yagiz Özbek Evren
Operating Systems (CS1022) Input/Output Yagiz Özbek Evren 1 Content Principles of IO Hardware...3 IO Devices.. Device Controllers.. Memory-Mapped IO... Direct Memory Access... Interrupts. Principles of
More informationCS162 Operating Systems and Systems Programming Lecture 17. Disk Management and File Systems
CS162 Operating Systems and Systems Programming Lecture 17 Disk Management and File Systems March 18, 2010 Ion Stoica http://inst.eecs.berkeley.edu/~cs162 Review: Want Standard Interfaces to Devices Block
More informationComputer System Overview
Computer System Overview Operating Systems 2005/S2 1 What are the objectives of an Operating System? 2 What are the objectives of an Operating System? convenience & abstraction the OS should facilitate
More informationComputer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.
BASIC ELEMENTS Simplified view: Processor Slide 1 Computer System Overview Operating Systems Slide 3 Main Memory referred to as real memory or primary memory volatile modules 2004/S2 secondary memory devices
More information-Device. -Physical or virtual thing that does something -Software + hardware to operate a device (Controller runs port, Bus, device)
Devices -Host -CPU -Device -Controller device) +memory +OS -Physical or virtual thing that does something -Software + hardware to operate a device (Controller runs port, Bus, Communication -Registers -Control
More informationUnit 5. Memory and I/O System
Unit 5 Memory and I/O System 1 Input/Output Organization 2 Overview Computer has ability to exchange data with other devices. Human-computer communication Computer-computer communication Computer-device
More informationECE331: Hardware Organization and Design
ECE331: Hardware Organization and Design Lecture 31: Computer Input/Output Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Overview for today Input and output are fundamental for
More informationDigital Design Laboratory Lecture 6 I/O
ECE 280 / CSE 280 Digital Design Laboratory Lecture 6 I/O Input/Output Module Interface to CPU and Memory Interface to one or more peripherals Generic Model of I/O Module External Devices Human readable
More informationInput/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security
Input/Output Today Principles of I/O hardware & software I/O software layers Disks Next Protection & Security Operating Systems and I/O Two key operating system goals Control I/O devices Provide a simple,
More informationCSE 380 Computer Operating Systems
CSE 380 Computer Operating Systems Instructor: Insup Lee University of Pennsylvania Fall 2003 Lecture Note on Disk I/O 1 I/O Devices Storage devices Floppy, Magnetic disk, Magnetic tape, CD-ROM, DVD User
More informationI/O. CS 416: Operating Systems Design Department of Computer Science Rutgers University
I/O Design Department of Computer Science http://www.cs.rutgers.edu/~vinodg/416 I/O Devices So far we have talked about how to abstract and manage CPU and memory Computation inside computer is useful only
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 2 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 2 System I/O System I/O (Chap 13) Central
More informationQUIZ Ch.6. The EAT for a two-level memory is given by:
QUIZ Ch.6 The EAT for a two-level memory is given by: EAT = H Access C + (1-H) Access MM. Derive a similar formula for three-level memory: L1, L2 and RAM. Hint: Instead of H, we now have H 1 and H 2. Source:
More informationHow Computer Mice Work
How Computer Mice Work Inside this Article 1. Introduction to How Computer Mice Work 2. Evolution of the Computer Mouse 3. Inside a Mouse 4. Connecting Computer Mice 5. Optical Mice 6. Optical Mouse Accuracy
More informationI/O 1. Devices and I/O. key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling
I/O 1 Devices and I/O key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling reading Three Easy Pieces: Chapters 36-37 I/O 2 Sys/161 Device
More informationOutline. Operating Systems: Devices and I/O p. 1/18
Outline Diversity of I/O devices block and character devices Organization of I/O subsystem of kernel device drivers Common hardware characteristics of device I/O subsystem tasks Operating Systems: Devices
More informationLast class: Today: Course administration OS definition, some history. Background on Computer Architecture
1 Last class: Course administration OS definition, some history Today: Background on Computer Architecture 2 Canonical System Hardware CPU: Processor to perform computations Memory: Programs and data I/O
More informationI/O MANAGEMENT CATEGORIES OF I/O DEVICES 1. Slide 1. Slide 3. Controller: Three classes of devices (by usage):
Monitor Keyboard Floppy disk drive Hard disk drive Slide I/O MANAGEMENT Categories of I/O devices and their integration with processor and bus Design of I/O subsystems Slide CPU Memory Video controller
More informationI/O Systems. 04/16/2007 CSCI 315 Operating Systems Design 1
I/O Systems Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating Systems Concepts with Java, by Silberschatz, Galvin, and Gagne (2007). Many, if not
More informationInput Output (IO) Management
Input Output (IO) Management Prof. P.C.P. Bhatt P.C.P Bhatt OS/M5/V1/2004 1 Introduction Humans interact with machines by providing information through IO devices. Manyon-line services are availed through
More informationChapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel
Chapter-6 SUBJECT:- Operating System TOPICS:- I/O Management Created by : - Sanjay Patel Disk Scheduling Algorithm 1) First-In-First-Out (FIFO) 2) Shortest Service Time First (SSTF) 3) SCAN 4) Circular-SCAN
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 Lecture 2 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 2 What is an Operating System? What is
More informationCPS104 Computer Organization and Programming Lecture 18: Input-Output. Outline of Today s Lecture. The Big Picture: Where are We Now?
CPS104 Computer Organization and Programming Lecture 18: Input-Output Robert Wagner cps 104.1 RW Fall 2000 Outline of Today s Lecture The system Magnetic Disk Tape es DMA cps 104.2 RW Fall 2000 The Big
More informationI/O Management and Disk Scheduling. Chapter 11
I/O Management and Disk Scheduling Chapter 11 Categories of I/O Devices Human readable used to communicate with the user video display terminals keyboard mouse printer Categories of I/O Devices Machine
More informationDevices and Device Controllers. secondary storage (disks, tape) and storage controllers
I/O 1 Devices and Device Controllers network interface graphics adapter secondary storage (disks, tape) and storage controllers serial (e.g., mouse, keyboard) sound co-processors... I/O 2 Bus Architecture
More informationBus Architecture Example
I/O 1 network interface graphics adapter Devices and Device Controllers secondary storage (disks, tape) and storage controllers serial (e.g., mouse, keyboard) sound co-processors... I/O 2 Bus Architecture
More informationOS And Hardware. Computer Hardware Review PROCESSORS. CPU Registers. CPU Registers 02/04/2013
OS And Hardware Computer Hardware Review An operating system is intimately tied to the hardware of the computer it runs on. It extends the computer s instruction set and manages its resources. To work
More informationAnswer to exercises chap 13.2
Answer to exercises chap 13.2 The advantage of supporting memory-mapped I/O to device-control registers is that it eliminates the need for special I/O instructions from the instruction set and therefore
More information19: I/O Devices: Clocks, Power Management
19: I/O Devices: Clocks, Power Management Mark Handley Clock Hardware: A Programmable Clock Pulses Counter, decremented on each pulse Crystal Oscillator On zero, generate interrupt and reload from holding
More informationChapter 5 Input/Output Organization. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan
Chapter 5 Input/Output Organization Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Accessing I/O Devices Interrupts Direct Memory Access Buses Interface
More informationChapter 5 - Input / Output
Chapter 5 - Input / Output Luis Tarrataca luis.tarrataca@gmail.com CEFET-RJ L. Tarrataca Chapter 5 - Input / Output 1 / 90 1 Motivation 2 Principle of I/O Hardware I/O Devices Device Controllers Memory-Mapped
More informationReview Questions on Computer Basics
Review Questions on Computer Basics 1. Distinguish between and define (see glossary in Maxfield and Brown s Bebop Bytes Back for the definition of terms not found in Andrews A Guide to Managing and Maintaining
More information