LECTURE 33 APPLICATION I/O INTERFACE

Similar documents
Have both hardware and software. Want to hide the details from the programmer (user).

REAL TIME OPERATING SYSTEMS. Lesson-10:

1. Computer System Structure and Components

Device Management Functions

I/O. Input/Output. Types of devices. Interface. Computer hardware

Chapter 11 I/O Management and Disk Scheduling

COS 318: Operating Systems. I/O Device and Drivers. Input and Output. Definitions and General Method. Revisit Hardware

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Linux Kernel Architecture

How To Understand And Understand An Operating System In C Programming

DEVICE DRIVERS AND TERRUPTS SERVICE MECHANISM Lesson-14: Device types, Physical and Virtual device functions

CSC 2405: Computer Systems II

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

I/O Device and Drivers

Operating Systems 4 th Class

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Computer Organization & Architecture Lecture #19

Operating System Components and Services

REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux. Lesson-12: Real Time Linux

Red Hat Linux Internals

Chapter 10 Case Study 1: LINUX

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Linux Driver Devices. Why, When, Which, How?

Devices and Device Controllers

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Operating System Tutorial

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Introduction. What is an Operating System?

Chapter 3 Operating-System Structures

ReactOS is (not) Windows. Windows internals and why ReactOS couldn t just use a Linux kernel

Chapter 6, The Operating System Machine Level

Input / Output and I/O Strategies

Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu

sndio OpenBSD audio & MIDI framework for music and desktop applications

OPERATING SYSTEMS STRUCTURES

Operating System Structures

ELEC 377. Operating Systems. Week 1 Class 3

Operating system Dr. Shroouq J.

Network Programming TDC 561

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure

1B11 Operating Systems. Input/Output and Devices

Limi Kalita / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 5 (3), 2014, Socket Programming

POSIX. RTOSes Part I. POSIX Versions. POSIX Versions (2)

Operating Systems. Lecture 03. February 11, 2013

Chapter 11 I/O Management and Disk Scheduling

Chapter 2: OS Overview

Operating System Components

windows maurizio pizzonia roma tre university

Real Time Programming: Concepts

I/O Management. General Computer Architecture. Goals for I/O. Levels of I/O. Naming. I/O Management. COMP755 Advanced Operating Systems 1

Networking Operating Systems (CO32010)

Chapter 13 Embedded Operating Systems

Operating Systems. 12. Devices. Paul Krzyzanowski. Rutgers University. Spring /9/ Paul Krzyzanowski

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

This tutorial will take you through step by step approach while learning Operating System concepts.

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Network Scanning: A New Feature for Digital Copiers

Example of Standard API

OPERATING SYSTEM SERVICES

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Lecture 1 Operating System Overview

Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

UNIX Sockets. COS 461 Precept 1

CS161: Operating Systems

Operating System Structure

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner

Intel DPDK Boosts Server Appliance Performance White Paper

COURSE OUTLINE Survey of Operating Systems

Compute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005

Lecture 25 Symbian OS

TEST CHAPTERS 1 & 2 OPERATING SYSTEMS

Outline: Operating Systems

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

Gentran Integration Suite. Archiving and Purging. Version 4.2

Mutual Exclusion using Monitors

CS222: Systems Programming

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Operating System Software

Process Description and Control william stallings, maurizio pizzonia - sistemi operativi

LECTURE-7. Introduction to DOS. Introduction to UNIX/LINUX OS. Introduction to Windows. Topics:

1 Organization of Operating Systems

Host-based Intrusion Prevention on Windows and UNIX. Dr. Rich Murphey White Oak Labs

11: I/O Device Management

Storage. The text highlighted in green in these slides contain external hyperlinks. 1 / 14

Operating Systems Design 16. Networking: Sockets

A Deduplication File System & Course Review

Scaling Networking Applications to Multiple Cores

Obj: Sec 1.0, to describe the relationship between hardware and software HW: Read p.2 9. Do Now: Name 3 parts of the computer.

Storage and File Systems. Chester Rebeiro IIT Madras

Resource Utilization of Middleware Components in Embedded Systems

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Lecture 6: Interrupts. CSC 469H1F Fall 2006 Angela Demke Brown

System Software and TinyAUTOSAR

Models For Modeling and Measuring the Performance of a Xen Virtual Server

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

Appendix. Web Command Error Codes. Web Command Error Codes

Computer-System Architecture

Transcription:

LECTURE 33 APPLICATION I/O INTERFACE

Application I/O Interface The OS software interface to the I/O devices (an API to the programmer) Attempts to abstract the characteristics of the many I/o devices into a few general classes. I/O system calls encapsulate device behaviors in generic classes Device-driver layer hides differences among I/O controllers from kernel Devices vary in many dimensions Character-stream or block units for data transfer bytes vs blocks Sequential or random-access - access methods Synchronous (predictable response times) vs asynchronous (unpredictable response times) Sharable or dedicated - implications on deadlock Speed of operation - device/software issue read-write, read only, or write only - permissions

A Kernel I/O Structure System calls ==> user API ==> Example: ioctl( ) generic call (roll your own) in UNIX (p. 468), and other more specific commands or calls open, read,... Fig. 13.6

Characteristics of I/O Devices Device driver must deal with these at a low level Use of I/O buffering

Block devices include disk drives Block and Character Devices example sectors or sector clusters on a disk Commands/calls include read, write, seek Access is typically through a file-system interface Raw I/O or file-system access - binary xfr of file data - interpretation is in application (personality of file lost) Memory-mapped (to VM) file access possible - use memory instructions rather than I/O instructions - very efficient (ex: swap space for disk). Device driver xfr s blocks at a time - as in paging DMA transfer is block oriented Character devices include keyboards, mice, serial ports Device driver xfr s byte at a time Commands include get, put - character at a time Libraries layered on top allow line editing - ex: keyboard input could be beefed up to use a line at a time (buffering) Block & character devices also determine the two general device driver catagories

Network Devices Varying enough from block and character to have own interface - OS makes network device interface distinct from disk interface - due to significant differences between the two Unix and Windows NT/9i/2000 include socket interface Separates network protocol from network operation Encapsulates details of various network devices for application analogous to a file and the disk??? Includes select functionality - used to manage and access sockets - returns info on packets waiting or ability to accept packets - avoids polling Approaches vary widely (pipes, FIFOs, streams, queues, mailboxes) you saw some of these!

Clocks and Timers Provide current time, elapsed time, timer If programmable, interval time used for timings, periodic interrupts ioctl (on UNIX) covers odd aspects of I/O such as clocks and timers - a back door for device driver writers (roll your own). Can implement secret calls which may not be documented in a users or programming manual

Blocking and Nonblocking I/O Blocking - process (making the request blocks - lets other process execute) suspended until I/O completed Easy to use and understand Insufficient for some needs multi-threading - depends on role of OS in thread management Nonblocking - I/O call returns as much as available User interface, data copy (buffered I/O) Implemented via multi-threading Returns quickly with count of bytes read or written - ex: read a small portion of a file very quickly, use it, and go back for more, ex: displaying video continuously from a disk Asynchronous - process (making the asynch request) runs while I/O executes Difficult to use - can it continue without the results of the I/O? I/O subsystem signals process when I/O completed - via interrupt (soft), or setting of shared variable which is periodically tasted.

ASSIGNMENT Q: Explain Application I/O interface.