3. System Mechanisms ■ Trap Dispatching - Trap : A Processor`s mechanism for capturing an executing thread an exception or an interrupt occurs and transferring.

Slides:



Advertisements
Similar presentations
计算机系 信息处理实验室 Lecture 3 System Mechanisms (1)
Advertisements

Tutorial 3 - Linux Interrupt Handling -
李盈賢.  Start a process with a specific priority class  Methods: 1)Cmd: start /’priority’ ‘filename’ 2)Create a shortcut.
Lecture Objectives: 1)Explain the limitations of flash memory. 2)Define wear leveling. 3)Define the term IO Transaction 4)Define the terms synchronous.
Chapter 5 Processes and Threads Copyright © 2008.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
OS Spring’03 Introduction Operating Systems Spring 2003.
1 When to Switch Processes 3 triggers –System call, Interrupt and Trap System call –when a user program invokes a system call. e.g., a system call that.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
CSE 451: Operating Systems Winter 2010 Module 15 I/O Mark Zbikowski Gary Kimura.
What are Exception and Interrupts? MIPS terminology Exception: any unexpected change in the internal control flow – Invoking an operating system service.
Traps and Faults. Review: Mode and Space data user mode kernel mode A B C “kernel space”
Windows Kernel Internals Traps, Interrupts, Exceptions
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS3: Concurrency 3.5. Lab Slides & Lab Manual.
Windows NT and Real-Time? Reading: “Inside Microsoft Windows 2000”, (Solomon, Russinovich, Microsoft Programming Series) “Real-Time Systems and Microsoft.
Tami Meredith, Ph.D. CSCI  Devices need CPU access  E.g., NIC has a full buffer it needs to empty  These device needs are often asynchronous.
Windows 2000 System Mechanisms Computing Department, Lancaster University, UK.
Advanced Design and System Patterns The Microkernel Pattern.
NT Kernel CS Spring Overview Interrupts and Exceptions: Trap Handler Interrupt Request Levels and IRT DPC’s, and APC’s System Service Dispatching.
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.
Exceptional Control Flow Topics Exceptions except1.ppt CS 105 “Tour of the Black Holes of Computing”
System Mechanisms Instructor: 許富皓 Speaker: 彭文秈 呂坤錡 謝英成 12/16/
Processes & Threads Introduction to Operating Systems: Module 5.
1/9/ :46 1 Priority Model Real-time class Idle Above Normal Normal Below Normal Lowest Highest 31 Time-critical Dynamic classes.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS3: Concurrency 3.3. Advanced Windows Synchronization.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
OSes: 2. Structs 1 Operating Systems v Objective –to give a (selective) overview of computer system architectures Certificate Program in Software Development.
Managing Processors Jeff Chase Duke University. The story so far: protected CPU mode user mode kernel mode kernel “top half” kernel “bottom half” (interrupt.
3.2. Windows Trap Dispatching, Interrupts, Synchronization
9/20/6Lecture 3 - Instruction Set - Al1 Exception Handling.
ISLab Flash Team Ch 3. Kernel-Mode I/O Processing.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Interrupts and Interrupt Handling David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
Introduction to Operating Systems
Interrupts and exceptions
Exceptional Control Flow
Interfacing with Hardware
Microprocessor Systems Design I
System Mechanisms Santosh Kumar Singh.
Exceptional Control Flow
Crash Dump Analysis - Santosh Kumar Singh.
Anton Burtsev February, 2017
Exceptional Control Flow
Day 08 Processes.
Day 09 Processes.
Chapter 4: Multithreaded Programming
Exceptional Control Flow
Threads CSSE 332 Operating Systems Rose-Hulman Institute of Technology
Interrupts and Interrupt Handling
CSE 120 Principles of Operating
Chapter 3: Windows7 Part 2.
The Execution Of Sleep()
2P13 Week 2.
Chapter 3: Windows7 Part 2.
3.3. Advanced Windows Synchronization
CSE 451: Operating Systems Spring 2008 Module 15 I/O
CSE 451: Operating Systems Spring 2007 Module 15 I/O
Interrupts and Exception Handling
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
Interrupts and Interrupt Handling
Interrupts and System Calls
Interrupts and Exception Handling
Lecture 10 review Booting sequence in Brief
Presentation transcript:

3. System Mechanisms ■ Trap Dispatching - Trap : A Processor`s mechanism for capturing an executing thread an exception or an interrupt occurs and transferring control to a fixed location in the OS. - Trap handler : A function specific to a particular interrupt or exception. - Interrupt : An asynchronous event (Not effect that processor us executing) - Exception : A synchronous Condition Processor : 현재 상태를 기록했다가 인터럽트 처리 후 재실행

● H/W Interrupt Processing - external I/O interrupts → interrupt controller → Interrupt # transfer to IRQ → IDT → transfers control to interrupt dispatch routine. 1. x86 Interrupt Controllers - PIC (Programmable Interrupt Controller – i8259A), APIC (Advanced PIC – i82489) ● S/W Interrupt Request Levels (IRQLs) - APC (Asynchronous Procedure Call) - DPC (Deferred Procedure Call) - High Level : System Crash - Power Fail - Inter-processor Interrupt : 다른 프로세서가 특정 Thread 를 실행하도록 Dispatching, Shutdown, Crash - Clock : Kernel 의 날짜 유지, Thread 에 대한 CPU 시간 측정 / 할당 - Dispatch : S/W 조절할 수 있는 가장 상위값 - APC : 드라이버 사용 X, - Passive : User 모드에서 실행되는 모든 Thread H/W S/W ● IRQL 설정 함수 - KeRaiseIrql() : 현재 값보다 상향으로 조절, 단순히 값만 - KeLowerIrql() : 현재 값보다 낮은쪽으로

● DPC Interrupt (Dispatch or Deferred Procedure Call) - Multiprocessor 상에서 동기화 : 병렬적인 Processor 의 interrupt Routine ● APC Interrupt (Asynchronous Procedure Call) - execute in the context of a particular thread and run at an IRQL less than DPC/dispatch level - DPC 대기열과는 달리 APC 대기열에 스레드에 한정