You are on page 1of 3

SESSION (2022-24)

Submitted By

Arzanish khan S2022387011

Supervised By

AMARAH ABDUALLAH

SCHOOL OF COMMERCE AND ACCOUNTANCY


UNIVERSITY OF MANAGEMENT & TECHNOLOGY, LAHORE

Q.What is the difference between interrupt and polling? Which


one is better and give examples of different operating systems
using these techniques. Justify your answer with some authentic
reference papers by citations?

Interrupts and polling are two different approaches to handling events


in computer systems, especially in the context of input/output (I/O)
operations. Let's explore the differences between them and discuss
their advantages and disadvantages.
1. Interrupts:
 In the interrupt-driven approach, the processor is
interrupted when an external device requires attention.
This interruption suspends the current task, and the
processor transfers control to an interrupt service routine
(ISR) to handle the event.
 Interrupts are more event-driven and efficient, as the
processor can continue its work while waiting for external
events to occur.
2. Polling:
 Polling involves the processor actively checking the status
of a device at regular intervals. It repeatedly checks
whether the device is ready or has new data, and if so, it
performs the necessary actions.
 Polling is a more continuous and active approach
compared to interrupts. It can be simpler to implement in
some cases but may be less efficient as it ties up the CPU
in constant checks.
Which one is better?
The choice between interrupts and polling depends on the specific
requirements of the system. Generally, interrupts are more efficient
and responsive for handling sporadic events, while polling might be
simpler in scenarios where events occur frequently and regularly.
Examples of Operating Systems:
 Interrupts:

 for devices such as keyboards, mice, and network


interfaces. For example, Linux and Windows both heavily
rely on interrupt-driven I/O mechanisms.
 Polling:
 Polling is often used in embedded systems and real-time
applications where the system has strict timing
requirements. An example could be a simple
microcontroller-based system that polls sensors at regular
intervals.
References: Unfortunately, as of my last training cut-off in January
2022, I don't have direct access to databases or the internet to provide
specific references or citations. However, you can find information on
interrupts and polling in operating system textbooks and research
papers. Here are some classic references:
1. Operating System Concepts by Abraham Silberschatz, Peter
B. Galvin, and Greg Gagne: This widely-used textbook covers
the fundamental concepts of operating systems and includes
information on interrupts and polling.
2. Modern Operating Systems by Andrew S. Tanenbaum:
Another well-known textbook in the field of operating systems,
Tanenbaum's book provides insights into different I/O handling
mechanisms.
3. Research papers on specific operating systems: For more in-
depth analysis and specific examples, you might want to explore
research papers on operating systems, particularly those related
to I/O handling. Platforms like IEEE Xplore and ACM Digital
Library are good places to search for such papers.
When researching, ensure that you refer to the most recent and
relevant sources to get the latest insights into operating system design
and implementation.

You might also like