SlideShare a Scribd company logo
2
Most read
3
Most read
5
Most read
I/O
Beuth Hochschule

Summer Term 2014

!
Pictures (C) W. Stallings, if not stated otherwise

!
Additional source:

Daniel P. Bovet & Marco Cesati. Understanding the Linux Kernel. 3rd Edition. O‘Reilly

!
!
!
Operating Systems I PT/FF 14
Input / Output Devices
• Hardware devices engaged in I/O can be categorized into:

• Responsible for interaction with the user

• Printers, terminals, video display, keyboard, mouse

• Provisioning of system-local hardware functionality

• Disk drives, USB keys, sensors, controllers

• Provisioning of communication support

• Modems, WLAN stick, network card

• Devices differ according to multiple factors

• Data transfer rates, complexity of control, data encoding, error conditions, ...

• I/O devices either operate as block device (fixed-size data blocks) or 

character / stream device (stream of bytes)
2
Operating Systems I PT/FF 14
I/O Functionality
• I/O functionality in an operating system can take place as:

• Programmed I/O with polling

• Process issues I/O command indirectly through the operating system

• Busy waits for completion

• Interrupt-driven I/O

• Process issues I/O command indirectly through the operating system

• Operating system blocks the process until an interrupt signals I/O completion

• With non-blocking I/O, the process continues to work instead of being blocked

• In both cases, the processor must fetch I/O read results from the device

• Alternative: Direct Memory Access (DMA)
3
Operating Systems I PT/FF 14
I/O Hardware - Single Bus
4
(C) Russinovich et al.
Operating Systems I PT/FF 14
I/O Hardware - Multiple Busses
5
(C) Russinovich et al.
Operating Systems I PT/FF 14
Direct Memory Access (DMA)
• Special hardware unit realizes the
data transfer between device and
main memory
6
Operating Systems I PT/FF 14
Device Drivers
• Lowest level of software to interact with I/O hardware

• Contains all device-dependent code for one type of hardware unit

• Direct communication with the device hardware

• Writes control registers, accesses hardware-mapped memory regions

• Starting and completion of I/O operations

• Loaded drivers become part of the running operating system image

• User mode applications deal with logical I/O

• Processes are enabled to access data records in files

• Driver may block after issuing a request, un-blocked by device interrupt
7
Operating Systems I PT/FF 14
Flow of a Blocking I/O Request
1. Thread issues blocking read() system call

2. Kernel checks parameters, may already return buffered data and finish

3. Thread is suspended if physical I/O required, added to wait queue for device

4. I/O request is scheduled

5. Device driver allocates kernel buffer and sends command to the hardware controller

6. Device controller operates the hardware to perform data transfer

7. Driver may poll for status and data, or set up DMA that will generate interrupt

8. Interrupt occurs, handler implementation from the driver stores the data 

9. Kernel transfers data to user space and makes thread ready again

10. Thread resumes execution at completion of read() call
8
Operating Systems I PT/FF 14
Design Objectives
• Design objectives for the I/O mechanism in
operating systems

• Generality
• Handle all devices in a uniform manner, 

both for kernel and user mode

• Hierarchical approach for device
management to reflect bus topology

• Efficiency

• I/O operations nearly always are the main
bottleneck in application performance

• Most I/O devices are extremely slow
compared with main memory and processor

• Operating system must take care of disk I/O
coordination and performance
9
Operating Systems I PT/FF 14
Layers of the I/O System
• Device-independent software layer
combines common management tasks

• Uniform interfacing for device
interaction (e.g. read / write / create)

• Device naming

• Device protection

• Buffering

• Storage allocation on block devices

• Allocation and releasing

• Error reporting
10
User process
Device-independent
software layer
Device driver layer
Interrupt handlers
Hardware
Operating Systems I PT/FF 14
Buffering
• Typical optimization is buffering of I/O requests
• Perform input transfers in advance of requests being made

• Perform output transfers delayed, after the request is made
11
Operating Systems I PT/FF 14
Buffering
• No buffer - Operating system directly accesses the device

• Single buffer - Operating system assigns buffer in main memory for I/O request

• For block-oriented devices, read-ahead may manage to prepare blocks in
memory that are fetched later by the process

• For stream-oriented devices, read-ahead is based on the notion of text lines
(terminals) or bytes (terminals, video stream)

• Swapping logic of the operating system is affected

• Double buffer / buffer swapping - Process can transfer data from / to one buffer
while the operating system empties or fills the other buffer

• Circular buffer - Two or more buffers are used in a circular fashion

• Buffering smoothes out peaks in I/O demand, less advantage under heavy load
12
Operating Systems I PT/FF 14
Windows
• I/O system design goals

• Fast I/O processing on single / multiprocessor systems

• Protection for shareable resources using Windows security mechanisms

• Meet requirements dictated by different subsystems

• Provide common services for device drivers

• Ease device driver development, support for high-level languages

• Dynamic addition/removal of device drivers

• Support multiple file systems (FAT, CDFS, UDF, NTFS)

• Provide mapped file I/O capabilities

• Instrumentation support and diagnosability
13
Operating Systems I PT/FF 14
Windows
14
(C) Russinovich et al.
Operating Systems I PT/FF 14
Windows - I/O Architecture
• I/O Manager 

• Connects applications and components to virtual, logical, and physical devices

• Windows APIs: ReadFile, WriteFile, CreateFile, CloseFile, DeviceIoControl

• Defines the infrastructure that supports device drivers

• Manages buffers for I/O requests

• Provides time-out support for drivers

• Knows which installable file systems are loaded

• Provides flexible I/O services for environment subsystems

• Framework for delivery of I/O request packets (IRPs)
15
Operating Systems I PT/FF 14
Windows - I/O Architecture
• The hardware abstraction layer (HAL) insulates drivers from the specifics of
processor and interrupt controller

• Bus driver for all the devices on the computer's motherboard that aren't controlled
by other drivers

• By programming against the HAL, drivers are source-level compatible across
different CPU and mainboard architectures 

• PnP manager handles driver loading and starting 

• Performs resource arbitration

• Relies on the I/O Manager to manage drivers and send PnP-related commands

• Power manager controls the power states

• Relies on the I/O Manager to ask drivers if they can change power state
16
Operating Systems I PT/FF 14
Driver Layering
• Windows drivers can be stacked
to add functionality

• Only the lowest layer talks to the
hardware

• Filter drivers attach their devices
to other devices

• See‘s all requests first an can
manipulate them

• Examples: File replication, file
encryption, shadow copies,
licensing, virus scanner
17
Operating Systems I PT/FF 14
Windows - IRPs
• I/O manager creates an IRP for each I/O operation and passes it to correct drivers

• Deletes IRP when I/O operation is complete

• Device drivers

• Receive IRP routed to them by the I/O manager and performs the operation

• Inform the I/O manager when those commands complete by passing back the IRP

• Often use the I/O manager to forward IRPs to other device drivers

• Fast I/O
• Bypass generation of IRPs, go directly to file system driver or cache manager

• Scatter/Gather I/O
• Read/write multiple buffers with a single system call
18
Operating Systems I PT/FF 14
Windows - Interrupt Dispatching
19
(C) Russinovich et al.
Operating Systems I PT/FF 14
Windows - Interrupt Dispatching
• IRQL is the state of a processor in the system

• Servicing an interrupt raises the processor IRQL to that interrupt‘s IRQL

• This masks subsequent interrupts with an equal or lower IRQL

• User mode 

applications are 

limited to IRQL 0

• No wait operations 

or page faults for 

IRQL >= 2

• After ISR execution,

IRQL is lowered to

initial level
20
Passive/Low
APC
Dispatch/DPC
Device 1
.
.
.
Profile & Synch (Srv 2003)
Clock
Interprocessor Interrupt
Power fail
High
Normal thread execution
Hardware interrupts
Deferrable software interrupts
0
1
2
30
29
28
31
Operating Systems I PT/FF 14
Windows - IRQLs
• High - Used when halting the system (via KeBugCheck())

• Power fail - Originated in the NT design document, but has never been used

• Inter-processor interrupt - used to request action from other processor
(dispatching a thread, updating a processors TLB, system shutdown, system crash)
• Clock - Used to update system‘s clock, allocation of CPU time to threads

• Profile - Used for kernel profiling (see Kernel profiler – Kernprof.exe, Res Kit)

• Device - Used to prioritize device interrupts

• DPC/dispatch and APC - Software interrupts 

that kernel and device drivers generate

• Passive - No interrupt level at all, 0

normal thread execution
21
Passive/Low
APC
Dispatch/DPC
Device 1
.
.
.
Profile & Synch (Srv 2003)
Clock
Interprocessor Interrupt
Power fail
High
Normal thread execution
Hardware interrupts
Deferrable software interrupts
0
1
2
30
29
28
31

More Related Content

PDF
Introduction to distributed file systems
PPTX
Lecture 2 process
PPTX
File System in Operating System
PPT
Disk management
PPTX
Structure of operating system
PPTX
Segmentation in Operating Systems.
Introduction to distributed file systems
Lecture 2 process
File System in Operating System
Disk management
Structure of operating system
Segmentation in Operating Systems.

What's hot (20)

PPT
2.communcation in distributed system
PPTX
File system structure
PPTX
Memory management ppt
PPT
Virtual memory
PPTX
Virtual Memory
PDF
Memory management
PPTX
Storage Management
PPTX
Page replacement algorithms
PPTX
I/O Management
PPTX
Inter Process Communication
PPTX
Memory Management in OS
PPTX
Distributed file system
PPTX
Cache Memory
PPT
Distributed System-Multicast & Indirect communication
PPT
resource management
PPT
Memory management
PPTX
Swap space management and protection in os
PPT
PPTX
Computer architecture memory system
2.communcation in distributed system
File system structure
Memory management ppt
Virtual memory
Virtual Memory
Memory management
Storage Management
Page replacement algorithms
I/O Management
Inter Process Communication
Memory Management in OS
Distributed file system
Cache Memory
Distributed System-Multicast & Indirect communication
resource management
Memory management
Swap space management and protection in os
Computer architecture memory system
Ad

Viewers also liked (20)

PPT
Input output systems ppt - cs2411
PPT
Chapter 13 - I/O Systems
PPT
IO Management
PPT
5. spooling and buffering
PPTX
I/O Buffering
PPT
I/O System
PPTX
Input Output Control System
PPTX
Direct Memory Access(DMA)
PPT
Input output organization
PPTX
Functions Of Operating Systems
PPTX
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
PDF
10. resource management
PPTX
Operating system
PPTX
DMA operation
PDF
Input and Output Control
PPTX
PDF
Direct Memory Access
DOCX
Working of input and output devices
PPTX
Disk scheduling
PPTX
Device Management
Input output systems ppt - cs2411
Chapter 13 - I/O Systems
IO Management
5. spooling and buffering
I/O Buffering
I/O System
Input Output Control System
Direct Memory Access(DMA)
Input output organization
Functions Of Operating Systems
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
10. resource management
Operating system
DMA operation
Input and Output Control
Direct Memory Access
Working of input and output devices
Disk scheduling
Device Management
Ad

Similar to Operating Systems 1 (11/12) - Input / Output (20)

PPT
chapter 4 Device Management systemss.ppt
PDF
Operating Systems 1 (2/12) - Hardware Basics
PPT
02-archsupport.ppt Architecture Support for OPS
PDF
Ch12 io systems
PDF
ITFT_Device management in Operating System
PPTX
I/o management and disk scheduling .pptx
PDF
Operating Systems 1 (6/12) - Processes
PPT
5120224.ppt
PPT
Chapter 11 I/o management - William stallings .ppt
PPTX
OPERATING SYSTEMS OVERVIEW111111111.pptx
PPT
Os introduction
PPT
Os introduction
PPT
In out system
PPTX
3 unit-DMA-1fjgigkhlhkbkbkvkvkvkvkvkgkvkvkvv.pptx
PPTX
I/O Organization
PPT
6.1_IO-Principles.ppt
PPTX
OS Introduction
PDF
PPTX
Ch 7 io_management & disk scheduling
PDF
Input output concepts in operating systems
chapter 4 Device Management systemss.ppt
Operating Systems 1 (2/12) - Hardware Basics
02-archsupport.ppt Architecture Support for OPS
Ch12 io systems
ITFT_Device management in Operating System
I/o management and disk scheduling .pptx
Operating Systems 1 (6/12) - Processes
5120224.ppt
Chapter 11 I/o management - William stallings .ppt
OPERATING SYSTEMS OVERVIEW111111111.pptx
Os introduction
Os introduction
In out system
3 unit-DMA-1fjgigkhlhkbkbkvkvkvkvkvkgkvkvkvv.pptx
I/O Organization
6.1_IO-Principles.ppt
OS Introduction
Ch 7 io_management & disk scheduling
Input output concepts in operating systems

More from Peter Tröger (20)

PDF
WannaCry - An OS course perspective
PDF
Cloud Standards and Virtualization
PDF
Distributed Resource Management Application API (DRMAA) Version 2
PDF
OpenSubmit - How to grade 1200 code submissions
PDF
Design of Software for Embedded Systems
PDF
Humans should not write XML.
PDF
What activates a bug? A refinement of the Laprie terminology model.
PDF
Dependable Systems - Summary (16/16)
PDF
Dependable Systems - Hardware Dependability with Redundancy (14/16)
PDF
Dependable Systems - System Dependability Evaluation (8/16)
PDF
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
PDF
Dependable Systems -Software Dependability (15/16)
PDF
Dependable Systems -Reliability Prediction (9/16)
PDF
Dependable Systems -Fault Tolerance Patterns (4/16)
PDF
Dependable Systems - Introduction (1/16)
PDF
Dependable Systems -Dependability Means (3/16)
PDF
Dependable Systems - Hardware Dependability with Diagnosis (13/16)
PDF
Dependable Systems -Dependability Attributes (5/16)
PDF
Dependable Systems -Dependability Threats (2/16)
PDF
Verteilte Software-Systeme im Kontext von Industrie 4.0
WannaCry - An OS course perspective
Cloud Standards and Virtualization
Distributed Resource Management Application API (DRMAA) Version 2
OpenSubmit - How to grade 1200 code submissions
Design of Software for Embedded Systems
Humans should not write XML.
What activates a bug? A refinement of the Laprie terminology model.
Dependable Systems - Summary (16/16)
Dependable Systems - Hardware Dependability with Redundancy (14/16)
Dependable Systems - System Dependability Evaluation (8/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems -Software Dependability (15/16)
Dependable Systems -Reliability Prediction (9/16)
Dependable Systems -Fault Tolerance Patterns (4/16)
Dependable Systems - Introduction (1/16)
Dependable Systems -Dependability Means (3/16)
Dependable Systems - Hardware Dependability with Diagnosis (13/16)
Dependable Systems -Dependability Attributes (5/16)
Dependable Systems -Dependability Threats (2/16)
Verteilte Software-Systeme im Kontext von Industrie 4.0

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
RMMM.pdf make it easy to upload and study
PPTX
Lesson notes of climatology university.
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
Complications of Minimal Access Surgery at WLH
102 student loan defaulters named and shamed – Is someone you know on the list?
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
GDM (1) (1).pptx small presentation for students
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Supply Chain Operations Speaking Notes -ICLT Program
Final Presentation General Medicine 03-08-2024.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Microbial disease of the cardiovascular and lymphatic systems
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial diseases, their pathogenesis and prophylaxis
RMMM.pdf make it easy to upload and study
Lesson notes of climatology university.
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
O7-L3 Supply Chain Operations - ICLT Program
Abdominal Access Techniques with Prof. Dr. R K Mishra
O5-L3 Freight Transport Ops (International) V1.pdf
01-Introduction-to-Information-Management.pdf
PPH.pptx obstetrics and gynecology in nursing

Operating Systems 1 (11/12) - Input / Output

  • 1. I/O Beuth Hochschule Summer Term 2014 ! Pictures (C) W. Stallings, if not stated otherwise ! Additional source: Daniel P. Bovet & Marco Cesati. Understanding the Linux Kernel. 3rd Edition. O‘Reilly ! ! !
  • 2. Operating Systems I PT/FF 14 Input / Output Devices • Hardware devices engaged in I/O can be categorized into: • Responsible for interaction with the user • Printers, terminals, video display, keyboard, mouse • Provisioning of system-local hardware functionality • Disk drives, USB keys, sensors, controllers • Provisioning of communication support • Modems, WLAN stick, network card • Devices differ according to multiple factors • Data transfer rates, complexity of control, data encoding, error conditions, ... • I/O devices either operate as block device (fixed-size data blocks) or 
 character / stream device (stream of bytes) 2
  • 3. Operating Systems I PT/FF 14 I/O Functionality • I/O functionality in an operating system can take place as: • Programmed I/O with polling • Process issues I/O command indirectly through the operating system • Busy waits for completion • Interrupt-driven I/O • Process issues I/O command indirectly through the operating system • Operating system blocks the process until an interrupt signals I/O completion • With non-blocking I/O, the process continues to work instead of being blocked • In both cases, the processor must fetch I/O read results from the device • Alternative: Direct Memory Access (DMA) 3
  • 4. Operating Systems I PT/FF 14 I/O Hardware - Single Bus 4 (C) Russinovich et al.
  • 5. Operating Systems I PT/FF 14 I/O Hardware - Multiple Busses 5 (C) Russinovich et al.
  • 6. Operating Systems I PT/FF 14 Direct Memory Access (DMA) • Special hardware unit realizes the data transfer between device and main memory 6
  • 7. Operating Systems I PT/FF 14 Device Drivers • Lowest level of software to interact with I/O hardware • Contains all device-dependent code for one type of hardware unit • Direct communication with the device hardware • Writes control registers, accesses hardware-mapped memory regions • Starting and completion of I/O operations • Loaded drivers become part of the running operating system image • User mode applications deal with logical I/O • Processes are enabled to access data records in files • Driver may block after issuing a request, un-blocked by device interrupt 7
  • 8. Operating Systems I PT/FF 14 Flow of a Blocking I/O Request 1. Thread issues blocking read() system call 2. Kernel checks parameters, may already return buffered data and finish 3. Thread is suspended if physical I/O required, added to wait queue for device 4. I/O request is scheduled 5. Device driver allocates kernel buffer and sends command to the hardware controller 6. Device controller operates the hardware to perform data transfer 7. Driver may poll for status and data, or set up DMA that will generate interrupt 8. Interrupt occurs, handler implementation from the driver stores the data 9. Kernel transfers data to user space and makes thread ready again 10. Thread resumes execution at completion of read() call 8
  • 9. Operating Systems I PT/FF 14 Design Objectives • Design objectives for the I/O mechanism in operating systems • Generality • Handle all devices in a uniform manner, 
 both for kernel and user mode • Hierarchical approach for device management to reflect bus topology • Efficiency • I/O operations nearly always are the main bottleneck in application performance • Most I/O devices are extremely slow compared with main memory and processor • Operating system must take care of disk I/O coordination and performance 9
  • 10. Operating Systems I PT/FF 14 Layers of the I/O System • Device-independent software layer combines common management tasks • Uniform interfacing for device interaction (e.g. read / write / create) • Device naming • Device protection • Buffering • Storage allocation on block devices • Allocation and releasing • Error reporting 10 User process Device-independent software layer Device driver layer Interrupt handlers Hardware
  • 11. Operating Systems I PT/FF 14 Buffering • Typical optimization is buffering of I/O requests • Perform input transfers in advance of requests being made • Perform output transfers delayed, after the request is made 11
  • 12. Operating Systems I PT/FF 14 Buffering • No buffer - Operating system directly accesses the device • Single buffer - Operating system assigns buffer in main memory for I/O request • For block-oriented devices, read-ahead may manage to prepare blocks in memory that are fetched later by the process • For stream-oriented devices, read-ahead is based on the notion of text lines (terminals) or bytes (terminals, video stream) • Swapping logic of the operating system is affected • Double buffer / buffer swapping - Process can transfer data from / to one buffer while the operating system empties or fills the other buffer • Circular buffer - Two or more buffers are used in a circular fashion • Buffering smoothes out peaks in I/O demand, less advantage under heavy load 12
  • 13. Operating Systems I PT/FF 14 Windows • I/O system design goals • Fast I/O processing on single / multiprocessor systems • Protection for shareable resources using Windows security mechanisms • Meet requirements dictated by different subsystems • Provide common services for device drivers • Ease device driver development, support for high-level languages • Dynamic addition/removal of device drivers • Support multiple file systems (FAT, CDFS, UDF, NTFS) • Provide mapped file I/O capabilities • Instrumentation support and diagnosability 13
  • 14. Operating Systems I PT/FF 14 Windows 14 (C) Russinovich et al.
  • 15. Operating Systems I PT/FF 14 Windows - I/O Architecture • I/O Manager • Connects applications and components to virtual, logical, and physical devices • Windows APIs: ReadFile, WriteFile, CreateFile, CloseFile, DeviceIoControl • Defines the infrastructure that supports device drivers • Manages buffers for I/O requests • Provides time-out support for drivers • Knows which installable file systems are loaded • Provides flexible I/O services for environment subsystems • Framework for delivery of I/O request packets (IRPs) 15
  • 16. Operating Systems I PT/FF 14 Windows - I/O Architecture • The hardware abstraction layer (HAL) insulates drivers from the specifics of processor and interrupt controller • Bus driver for all the devices on the computer's motherboard that aren't controlled by other drivers • By programming against the HAL, drivers are source-level compatible across different CPU and mainboard architectures • PnP manager handles driver loading and starting • Performs resource arbitration • Relies on the I/O Manager to manage drivers and send PnP-related commands • Power manager controls the power states • Relies on the I/O Manager to ask drivers if they can change power state 16
  • 17. Operating Systems I PT/FF 14 Driver Layering • Windows drivers can be stacked to add functionality • Only the lowest layer talks to the hardware • Filter drivers attach their devices to other devices • See‘s all requests first an can manipulate them • Examples: File replication, file encryption, shadow copies, licensing, virus scanner 17
  • 18. Operating Systems I PT/FF 14 Windows - IRPs • I/O manager creates an IRP for each I/O operation and passes it to correct drivers • Deletes IRP when I/O operation is complete • Device drivers • Receive IRP routed to them by the I/O manager and performs the operation • Inform the I/O manager when those commands complete by passing back the IRP • Often use the I/O manager to forward IRPs to other device drivers • Fast I/O • Bypass generation of IRPs, go directly to file system driver or cache manager • Scatter/Gather I/O • Read/write multiple buffers with a single system call 18
  • 19. Operating Systems I PT/FF 14 Windows - Interrupt Dispatching 19 (C) Russinovich et al.
  • 20. Operating Systems I PT/FF 14 Windows - Interrupt Dispatching • IRQL is the state of a processor in the system • Servicing an interrupt raises the processor IRQL to that interrupt‘s IRQL • This masks subsequent interrupts with an equal or lower IRQL • User mode 
 applications are 
 limited to IRQL 0 • No wait operations 
 or page faults for 
 IRQL >= 2 • After ISR execution,
 IRQL is lowered to
 initial level 20 Passive/Low APC Dispatch/DPC Device 1 . . . Profile & Synch (Srv 2003) Clock Interprocessor Interrupt Power fail High Normal thread execution Hardware interrupts Deferrable software interrupts 0 1 2 30 29 28 31
  • 21. Operating Systems I PT/FF 14 Windows - IRQLs • High - Used when halting the system (via KeBugCheck()) • Power fail - Originated in the NT design document, but has never been used • Inter-processor interrupt - used to request action from other processor (dispatching a thread, updating a processors TLB, system shutdown, system crash) • Clock - Used to update system‘s clock, allocation of CPU time to threads • Profile - Used for kernel profiling (see Kernel profiler – Kernprof.exe, Res Kit) • Device - Used to prioritize device interrupts • DPC/dispatch and APC - Software interrupts 
 that kernel and device drivers generate • Passive - No interrupt level at all, 0
 normal thread execution 21 Passive/Low APC Dispatch/DPC Device 1 . . . Profile & Synch (Srv 2003) Clock Interprocessor Interrupt Power fail High Normal thread execution Hardware interrupts Deferrable software interrupts 0 1 2 30 29 28 31