How interrupt is handled by OS and what are the services for user and system?


An interrupt is generally called as a signal, which is informing a program that a particular event has occurred. It causes a receiving program to stop and create a program to serve the interrupt.

Example − When some process is running into the operating system and when you type a keystroke on the keyboard, then this keystroke will become an interrupt for the running process.

Interrupts are mostly caused by devices attached to the computer. An interrupt is handled by one of the important routines of the operating system i.e. Interrupt Service Routine.

Whenever any interrupt occurs then the processor will execute the interrupt service routine. CPU periodically checks for interrupts after each instruction. The interrupt controller passes the interrupt number to the CPU when the interrupt occurs. It uses this number to search an interrupt vector table to find the appropriate interrupt service routine to execute.

Interrupts are also assigned priorities to handle the case of simultaneous requests from interrupts. Whenever an interrupt occurs CPU saves the current state of the program and it jumps to the interrupt handler code. When an interrupt is done, the program state is reloaded and the program resumes.

Services for User and System

Now let us see the services provided by OS which are helpful to user as well as to the system.

Following are the services provided by the general-purpose operating systems −

  • User program execution

  • I/O operation

  • File system manipulation

  • Error detection

  • Memory management or resource allocation

  • Synchronization

  • Process management

The services that are helpful to the users are as follows −

  • User program execution

  • I/O operation

  • Error detection

  • Process management

The services that are helpful to the system are as follows −

  • File system manipulation

  • Memory management or resource allocation

  • Synchronization

  • Process management

Updated on: 01-Dec-2021

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements