Block devices and Linux Linux has a generic block device layer with which all filesystems will interact. SCSI is no different in this regard – it registers.

Slides:



Advertisements
Similar presentations
I/O Systems & Mass-Storage Systems
Advertisements

Homework Reading Machine Projects Labs
Chapter 12: File System Implementation
Principles of I/O Hardware I/O Devices Block devices, Character devices, Others Speed Device Controllers Separation of electronic from mechanical components.
I/O and Networking Fred Kuhns
SCSI Mid-layer Eric Youngdale 2nd Annual Linux Storage Management Workshop October 2000.
Allocation Methods - Contiguous
Operating Systems Input/Output Devices (Ch , 12.7; , 13.7)
Modifying the SCSI / Fibre Channel Block Size Presented by Keith Bonneau, John Chrzanowski and Craig O’Brien Advised by Robert Kinicki and Mark Claypool.
Embedded Real-time Systems The Linux kernel. The Operating System Kernel Resident in memory, privileged mode System calls offer general purpose services.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Memory Management Five Requirements for Memory Management to satisfy: –Relocation Users generally don’t know where they will be placed in main memory May.
1 Input/Output Chapter 3 TOPICS Principles of I/O hardware Principles of I/O software I/O software layers Disks Clocks Reference: Operating Systems Design.
1 I/O Management in Representative Operating Systems.
Operating System Organization
Operating Systems Input/Output Devices (Ch 5: )
I/O Systems CSCI 444/544 Operating Systems Fall 2008.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Disk and I/O Management
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
TM Freescale, the Freescale logo, AltiVec, C-5, CodeTest, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of.
I/O Systems ◦ Operating Systems ◦ CS550. Note:  Based on Operating Systems Concepts by Silberschatz, Galvin, and Gagne  Strongly recommended to read.
CHAPTER 13: I/O SYSTEMS Overview Overview I/O Hardware I/O Hardware I/O API I/O API I/O Subsystem I/O Subsystem Transforming I/O Requests to Hardware Operations.
Lecture 12 Page 1 CS 111 Online Linux Device Driver Abstractions An example of how an OS handles device drivers Basically inherited from earlier Unix systems.
CS 6560 Operating System Design Lecture 13 Finish File Systems Block I/O Layer.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13+14: I/O Systems and Mass- Storage Structure I/O Hardware Application I/O.
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.
1 Module 12: I/O Systems n I/O hardware n Application I/O Interface n Kernel I/O Subsystem n Transforming I/O Requests to Hardware Operations n Performance.
Ken Merry Spectra Logic Corporation
A Comparative Study of the Linux and Windows Device Driver Architectures with a focus on IEEE1394 (high speed serial bus) drivers Melekam Tsegaye
Device Drivers CPU I/O Interface Device Driver DEVICECONTROL OPERATIONSDATA TRANSFER OPERATIONS Disk Seek to Sector, Track, Cyl. Seek Home Position.
A Cyclic-Executive-Based QoS Guarantee over USB Chih-Yuan Huang,Li-Pin Chang, and Tei-Wei Kuo Department of Computer Science and Information Engineering.
Bluetooth on CE. Mid - Presentation Roman Zoltsman & Oren Haggai Group /2001 Instructor: Nir Borenshtein HSDSL Lab. Technion.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
The Process Manager in the ATLAS DAQ System G. Avolio, M. Dobson, G. Lehmann Miotto, M. Wiesmann (CERN)
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
B LOCK L AYER S UBSYSTEM Linux Kernel Programming CIS 4930/COP 5641.
Processes and Virtual Memory
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
1 Linux Security Module: General Security Support for the Linux Kernel Presented by Chao-Sheng Lin 2005/11/1.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 13: I/O Systems Overview I/O Hardware Application.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 2.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
FILE SYSTEM IMPLEMENTATION 1. 2 File-System Structure File structure Logical storage unit Collection of related information File system resides on secondary.
1 The File System. 2 Linux File System Linux supports 15 file systems –ext, ext2, xia, minix, umsdos, msdos, vfat, proc, smb, ncp, iso9660, sysv, hpfs,
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 5.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Tgt: Framework Target Drivers FUJITA Tomonori NTT Cyber Solutions Laboratories Mike Christie Red Hat, Inc Ottawa Linux.
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 12: File System Implementation
Direct Attached Storage and Introduction to SCSI
Operating Systems (CS 340 D)
Chapter 12: Mass-Storage Structure
Operating System I/O System Monday, August 11, 2008.
Mass-Storage Structure
The PCI bus (Peripheral Component Interconnect ) is the most commonly used peripheral bus on desktops and bigger computers. higher-level bus architectures.
KERNEL ARCHITECTURE.
Main Memory Management
Introduction to the Kernel and Device Drivers
I/O Systems Chapter 15 11/7/2018 Crowley OS Chap. 15.
Introduction to Linux Device Drivers
CPSC 457 Operating Systems
Chapter 2: The Linux System Part 2
Operating System Concepts
Chapter 8: Memory management
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Chapter 2: The Linux System Part 5
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

Block devices and Linux Linux has a generic block device layer with which all filesystems will interact. SCSI is no different in this regard – it registers itself with the block device layer so it can receive requests. SCSI also handles character device requests and ioctls that do not originate in the block device layer.

What is the “Mid-Layer”? Linux SCSI support can be viewed as 3 levels. Upper level is device management, such as tape, cdrom, disk, etc. Lower level talks to host adapters. Middle layer is essentially a traffic cop, handing requests from rest of kernel, and dispatching them to the rest of SCSI.

What was wrong in 2.2? The elevator algorithms in 2.2 allowed requests to grow irregardless of the capabilities of the underlying device. All SCSI disks were handled in a single queue. Disk driver had to split requests that had become too large. One set of common logic for verifying requests had not become too large.

What was wrong in 2.2 (cont) Character device requests not in queue. SMP safety was clumsily handled, leading to race conditions and poor performance. Poor scalability. Many drivers continue to use old error handling code.

Changes for Linux-2.4 Block device layer was generalized to support a “ request_queue_t ” abstract datatype that represents a queue. Contains function pointers that drivers can use for managing the size of requests inserted into queues. Requests no longer can grow to be too large to be handled at one time.

Changes for 2.4 (cont) No longer any need for splitting requests. No need for ugly logic to scan a queue for a queueable request. SMP locking in mid-layer cleaned up to provide finer granularity.

Changes for 2.4 (cont) A SCSI queuing library was created – a set of functions for queue management that are tailored to different sets of requirements. SCSI was modified to use a single queue for each physical device. Character device requests and ioctls are inserted into the same queue at the tail, and handled the same as other requests.

Upcoming changes for 2.5 All drivers will be forced to use new error handling code. Disk driver will be updated to handle larger number of disks. SMP locking will be cleaned up some more to improve scalability.

SMP Cleanups (cont). Low-level drivers don’t need to protect queue – they don’t have access to it. Each low-level driver should have a separate lock – ideally one per instance of host, but could be a driver-wide lock initially. This should be up to the low-level driver.

Large numbers of disks Current disk driver allocates 8 majors, allowing for only 128 disks. Plans are in the works to allow disk driver to dynamically allocate major numbers. Would support up to about 4000 disks, when major numbers are exhausted. Possible to go beyond this by using fewer bits for partitions.

Wish list. Implement some SCSI-3 features (larger commands, sense buffers). Improve support for shared busses. Support target-mode. Check module add/remove code for SMP safety, implement locks. Improvements related to high-availability.

Conclusions The major goal of a rewrite of SCSI queuing has been accomplished. A number of architectural problems were resolved at the same time. There are still some interesting tasks still to be addressed for 2.5. See for more info, and for “todo” list.