Skip to main content
4 of 5
edited title
Michael Mrozek
  • 95.7k
  • 40
  • 245
  • 236

What is the relationship between system calls, message passing, and interrupts?

I am reading the Wikipedia article for process management. My focus is on Linux. I cannot figure out the relation and differences between system call, message passing and interrupt, in their concepts and purposes. Are they all for processes to make requests to kernel for resources and services?

Some quotes from the article and some other:

1. > There are two possible ways for an OS to regain control of the > processor during a program’s execution in order for the OS to perform > de-allocation or allocation: > > 1. The process issues a system call (sometimes called a software > interrupt); for example, an I/O request occurs requesting to access a > file on hard disk. > 2. A hardware interrupt occurs; for example, a key was pressed on > the keyboard, or a timer runs out (used in pre-emptive multitasking).

2. > There are two techniques by which a program executing in user mode can > request the kernel's services: > > * System call > * Message passing

3. > an interrupt is an asynchronous signal indicating the need for > attention or a synchronous event in software indicating the need for a > change in execution. > > A hardware interrupt causes the processor to save its state of > execution and begin execution of an interrupt handler. Software > interrupts are usually implemented as instructions in the instruction > set, which cause a context switch to an interrupt handler similar to a > hardware interrupt.

Tim
  • 106.8k
  • 234
  • 650
  • 1.1k