O'rnatilgan Operatsion Tizimlardagi Uzilishlar

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 8

O'rnatilgan operatsion tizimlardagi

uzilishlar
Interruptions are a fundamental part of modern operating systems, allowing
devices and software tUzilishlar zamonaviy operatsion tizimlarning asosiy
qismi bo'lib, qurilmalar va dasturiy ta'minot bilan samarali muloqot qilish va
hodisalarga javob berish imkonini beradi. Ular periferik qurilmalar uchun
protsessorni o'zgarishlar yoki so'rovlar to'g'risida xabardor qilish usulini
taqdim etadi, bu esa tizimga ularni tezda hal qilish imkonini beradi.o efficiently
communicate and respond to events. They provide a way for peripheral
devices to notify the CPU of changes or requests, enabling the system to
handle them promptly.
Uzilishlar turlari
Uskuna uzilishlari Software Interrupts Timed Interrupts

Bular protsessorga bo’ladigan These are generated by These are generated by a


biror hodisa yoki so’rov software, such as system calls system timer to provide a
haqida haqida xabar berish or exceptions, to request regular clock signal for
uchun klaviatura, sichqoncha services from the operating scheduling and time-keeping
yoki tarmoq kartalari kabi system or handle errors. tasks.
qurilmalar tomonidan ishlab
chiqarilgan signallardir.
Interrupt Handling Mechanism
Interrupt Request 1
Qurilma protsessorga event
kerakligini bildiruvchi uzilish
bildiroshnomasinii yaratadi. 2 Interrupt Acknowledgment
The CPU pauses the current task,
saves its state, and acknowledges the
Interrupt Service Routine 3 interrupt request.
The CPU executes the appropriate
Interrupt Service Routine (ISR) to
handle the interrupt and address the
device's needs.
Interrupt Prioritization
1 Priority Levels 2 Preemption 3 Interrupt Masking
Interrupts are assigned A higher-priority The system can
different priority levels, interrupt can preempt selectively enable or
with higher-priority the current task, forcing disable interrupts to
interrupts taking the CPU to temporarily manage their priorities
precedence over lower- suspend its execution to and prevent race
priority ones. service the more urgent conditions.
interrupt.
Interrupt Service Routines (ISRs)
Efficiency Shared Resources
ISRs must be designed to be as efficient as ISRs must carefully manage shared resources,
possible, minimizing the time spent in the such as data structures, to prevent race
interrupt handler to avoid delaying other conditions and ensure data integrity.
tasks.

Reentrant Code Atomicity


ISRs should be reentrant, allowing them to be Critical sections within ISRs should be made
interrupted and resumed without corrupting atomic to ensure that they are executed as a
their state. single, uninterruptible operation.
Interrupt Latency and Response Time

Interrupt Latency
The time between the occurrence of an interrupt and the start of its servicing by the
CPU.

Interrupt Response Time


The time between the occurrence of an interrupt and the completion of its servicing
by the CPU.

Determinism
Real-time systems require deterministic interrupt latency and response time to
ensure predictable performance.
Interrupt-driven vs. Polled I/O
Interrupt-driven I/O Polled I/O Trade-offs

Devices generate interrupts to The CPU regularly checks the Interrupt-driven I/O offers
notify the CPU of events, status of devices, polling better responsiveness, but
allowing the system to them for changes, which can can introduce complexity and
respond quickly and be less efficient but simpler potential issues, while polled
efficiently. to implement. I/O is simpler but less
efficient.
Challenges and Considerations

Priority Interrupt Latency Race Conditions Performance


Management Impact
Carefully managing
Ensuring that high- Minimizing the time shared resources to Ensuring that the
priority interrupts are between the prevent race overhead of interrupt
serviced in a timely occurrence of an conditions and handling does not
manner while interrupt and the start ensure data integrity degrade overall
avoiding starvation of of its servicing to during interrupt system performance.
lower-priority tasks. meet real-time handling.
requirements.

You might also like