Linux API Dr. Michael L. Collard 1.

Slides:



Advertisements
Similar presentations
Principles of I/O Hardware I/O Devices Block devices, Character devices, Others Speed Device Controllers Separation of electronic from mechanical components.
Advertisements

CT213 – Computing system Organization
Device Drivers. Linux Device Drivers Linux supports three types of hardware device: character, block and network –character devices: R/W without buffering.
CSI 400/500 Operating Systems Spring 2009 Lecture #14 – Device Management and Drivers Monday, March 23 rd, 2009.
Week 12 Real time kernel Ref: Extracts from:
Booting the Linux Kernel Dr. Michael L. Collard 1.
QNX® real-time operating system
16 UNIX and Linux. Fig. 16.1: The shell and the kernel.
04/14/2008CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
Generic Transport Service Primitives Listen –notify Transport layer a call is expected Connect –establish Transport layer connection Send (or Write) Receive.
MIGSOCK Migratable TCP Socket in Linux Demonstration of Functionality Karthik Rajan Bryan Kuntz.
I/O Devices and Drivers
1 Generic Transport Service Primitives Listen –notify Transport layer a call is expected Connect –establish Transport layer connection Send (or Write)
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
04/16/2010CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying an earlier edition.
I/O Systems CS 3100 I/O Hardware1. I/O Hardware Incredible variety of I/O devices Common concepts ◦Port ◦Bus (daisy chain or shared direct access) ◦Controller.
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
Figure 1.1 Interaction between applications and the operating system.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
1 I/O Management in Representative Operating Systems.
External Devices I/O Modules Programmed I/O Interrupt Driven I/O Direct Memory Access I/O Channels and Processors.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
The Programming Interface. Main Points Creating and managing processes – fork, exec, wait Performing I/O – open, read, write, close Communicating between.
Device Management. Serial Port Serial Device Serial Device Memory CPU Printer Terminal Modem Mouse etc.
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
1 I/O and Filesystems. 2 How to provide interfaces Rough reading guide (no exam guarantee): Tanenbaum Ch. 5.1 – 5.5 & Silberschatz Ch. 13 & ,
Operating System It is the interface between user (application programs) and hardware. It is a program that controls the execution of application programs.
Cpr E 308 Input/Output Recall: OS must abstract out all the details of specific I/O devices Today –Block and Character Devices –Hardware Issues – Programmed.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-1: I/O Management Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.
COMP 3438 – Part I - Lecture 4 Introduction to Device Drivers Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
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.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS6: Device Management 6.1. Principles of I/O.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
A Comparative Study of the Linux and Windows Device Driver Architectures with a focus on IEEE1394 (high speed serial bus) drivers Melekam Tsegaye
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
What Every Developer Should Know about the Kernel Dr. Michael L. Collard 1.
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 13: I/O Systems I/O Hardware Application I/O Interface.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Operating Systems, Spring 2003 Local File Systems in UNIX Ittai Abraham Zinovi Rabinovich (recitation)
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 13: I/O Systems Overview I/O Hardware Application.
Device Driver Concepts Digital UNIX Internals II Device Driver Concepts Chapter 13.
What is an Operating System? Various systems and their pros and cons –E.g. multi-tasking vs. Batch OS definitions –Resource allocator –Control program.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 2.
OS Labs 2/25/08 Frans Kaashoek MIT
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
1 Lecture 19: Unix signals and Terminal management n what is a signal n signal handling u kernel u user n signal generation n signal example usage n terminal.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 5.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
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.
Linux Details: Device Drivers
Input/Output.
Unix Process Management
Introduction to Operating System
CSCI 315 Operating Systems Design
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S
CPSC 457 Operating Systems
I/O Systems I/O Hardware Application I/O Interface
Mid Term review CSC345.
Linux Details: Device Drivers
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Process Description and Control in Unix
Process Description and Control in Unix
LINUX System : Lecture 6 Bong-Soo Sohn
Presentation transcript:

Linux API Dr. Michael L. Collard 1

Linux Systems Programming Linux API – set of calls that applications, directly or indirectly, use to interact with the Linux kernel File, directory, and filesystem access Communication Concurrency Control

Device Interface files, terminals, disks, tapes, audio, network, peripheral devices device driver – Kernel module, typically LKM (Loadable Kernel Module) devices represented as special files

Device Types Regular file Block device (block special file) – similar to a disk, transfers information in blocks Character device (character special file) – terminal-like with a stream of bytes in order Network device – no device node, use name with socket to ioctl File-system device – Rarely directly access, through ioctl

Uniform Device Access File descriptor 0 – STDIN_FILENO, 1 – STDOUT_FILENO, 2 – STDERR_FILENO open close read write ioctl

Process Creation init – special process, parent of all processes fork exec family: execle wait

Interrupts & Signals Interrupt generated by hardware, typically by external device drivers, and typically asynchronous Signal How software is notified of an asynchronous event Signal Handler – How a process catches and handles a generated signal

Terminal Control Special Devices have special capabilities termios.h tcgetattr tcsetattr