INTERRUPTINTERRUPTINTERRUPTINTERRUPT.pptx

balochmoavia62 12 views 12 slides May 08, 2025
Slide 1
Slide 1 of 12
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12

About This Presentation

comuter intrrupt


Slide Content

Interrupt Software Interrupt Group_6 4/29/2025 BSCS-4 TH -EVENING 1

What is Interrupt ? An Interrupt is a signal that stops the normal work of the computer to handle an important task. Example: Playing a game and getting a phone call — game stops, call is attended. 4/29/2025 BSCS-4 TH -EVENING 2

Types Of Interrupt Software Interrput Hardware Interrupt Maskable Interrupt Non- Maskable Interrupt 4/29/2025 BSCS-4 TH -EVENING 3

Diagram of Interrupt 4/29/2025 BSCS-4 TH -EVENING 4

Hardware Interrupt Hardware interrupts are generated by hardware devices when something unusual happens; this could be a keypress or a mouse move or any other action. 4/29/2025 BSCS-4 TH -EVENING 5

Software Interrupt A Software Interrupt is generated by a program to request a special service from the operating system. Software interrupts are often used for: System calls Handling exceptions Communicating with the operating system 4/29/2025 BSCS-4 TH -EVENING 6

Real-Life Example We are writing a document and press "Save" The program sends a software interrupt to the OS to save your file on the hard disk. BSCS-4 TH -EVENING 7 4/29/2025

Why 256 Interrupts? Triggers software interrupt . Example using x86 Assembly Language: In x86-based computer the interrupt number is stored as an 8-bit value An 8-bit number can represent values from 0 to 255 (in hexadecimal: 00h to FFh ) This gives a total of 256 possible interrupts . Each interrupt number points to an Interrupt Service Routine (ISR) through the Interrupt Vector Table (IVT) 4/29/2025 BSCS-4 TH -EVENING 8

What is the Interrupt Vector Table (IVT)? 4/29/2025 BSCS-4 TH -EVENING 9 IVT is a special area of memory located at the start of system memory( usually at address 0000:0000) It contains 256 entries . Each entry is 4 bytes : 2 bytes for Offset (address within a segment) 2 bytes for Segment (base address) Total size of IVT = 256 × 4 bytes = 1024 bytes (1 KB) .

N*4=offset address N*4+2= segment address BSCS-4 TH -EVENING 10 4/29/2025

Features of Software Interrupt Generated by software (programs). Requests services like saving a file, printing, memory access. Planned and controlled — written in the program code. Helps in communication between software and OS (Operating System). BSCS-4 TH -EVENING 11 4/29/2025

Advantages of Software Interrupts Advantage Benefit Priority Handling Urgent tasks processed immediately Flexibility Custom tasks can be added easily Uniform Interface Simplifies working across different hardware Stability Protects system from crashes Efficiency Reduces code, saves time and resources Security Prevents unauthorized access BSCS-4 TH -EVENING 12 4/29/2025
Tags