|
|
|
|
||||
| Client server model | contact page |
To effectively manage many processes the core of operating system makes use of what is known as interrupts.
This is a signal to a processor indicating that an asynchronous event has occurred. Here the current sequence of instructions is temporarily suspended, and a sequence appropriate to the interruption is started in its place. Its purpose is to alert the operating system when any special event occurs so that it can suspend its current activity and deal appropriately with the new situation
Usually an interrupt gives a signal from a device attached to a computer or from a program within the computer that causes the main program that operates the computer (the operating system) to stop and figure out what to do next. Almost all personal (or larger) computers today are interrupt-driven - that is, they start down the list of computer instructions in one program (perhaps an application such as a word processor) and keep running the instructions until either (A) they can't go any further or (B) an interrupt signal is sensed. After the interrupt signal is sensed, the computer either resumes running the program it was running or begins running another program.
Basically, a single computer can perform only one computer instruction at a time. But, because it can be interrupted, it can take turns in which programs or sets of instructions that it performs. This is known as multitasking. It allows the user to do a number of different things at the same time. The computer simply takes turns managing the programs that the user effectively starts. Of course, the computer operates at speeds that make it seem as though all of the user's tasks are being performed at the same time. (The computer's operating system is good at using little pauses in operations and users think time to work on other programs.)
An operating system usually has some code that is called an interrupt handler. The interrupt handler prioritises the interrupts and saves them in a queue if more than one is waiting to be handled. The operating system has another little program, sometimes called a scheduler, which figures out which program to give control to next.
In general, there are hardware interrupts and software interrupts. A hardware interrupt occurs, for example, when an I/O operation is completed such as reading some data into the computer from a tape drive. A software interrupt occurs when an application program terminates or requests certain services from the operating system. In a personal computer, a hardware interrupt request (IRQ) has a value associated with it that associates it with a particular device. Interrupts can be broadly divided into the following.
Events occurring on peripherals devices:
A processor having initiated a control on a peripheral device on behalf of one process may start some other process. When the transfer terminates, the peripheral device will cause an interrupt.
Voluntary events within processes:
A process wishing to use the services of operating system may use a specific type of interrupt, a supervisor call (SVC) as a means of notifying the supervisor.
Involuntary events within the processes:
A process that attempts an undefined or prohibited action will cause an interrupts that will notify the supervisor.
Action by operators:
An operation wishing to communicate with the supervisor may cause an interrupt.
Timer interrupts:
many systems incorporate a timer that causes a fixed interval of time as a means of guaranteeing that the supervisor will be entered periodically.
SOFTWARE INTERRUPTS:
The basic input/output system (BIOS) communicates directly with the hardware of the computer. It consists of set of programs, which interface with device such as keyboards, display, printer, serial port, Without BIOS the computer system will simply of bundle of wires and electronic device. There are two parts of BIOS the first part is permanently stored in non volatile memory called read only memory.(ROM)This parts starts the computer bootstrap. The second is loaded when the operating system is started.
An operating system allows the user to access the hardware in an easy to use manner. It accepts command from the keyboard and displays them to the monitor. The Disk operating system gained its name by from its original purpose of providing a controller for the computer to access its disk drive. The language of DOS consists of a set of command, which are entered directly by user and interpreted to perform file management task.
HARDWARE INTERRUPTS:
Computer systems either use poling or interrupt driven software to service external equipment. With poling the system continually monitors a status line and wait for it to become archive. An interrupt driven device sends an interrupt request to the computer, which is then serviced by Internet service routine
(ISR)
HARDWARE SUPPORT:
A process runs until it invokes an operating system service or until it is interrupted. Here our attempt is to explain how to disabling interrupts. While one process is busy updating shared memory in its critical region, no other process will enter it critical region and cause trouble.
The simplest solution is to have each process disable all interrupts just after entering its critical region and re-enable them just before leaving it. With interrupts disenable, no clock interrupt can occur. The central processing unit is only switched from process to process as a result of clock or other interrupt. After all and with interrupt turned off, the CPU will not be switched to another process. Thus one process has disabled interrupts, it can then examine and update the shared memory before without fear that any other process will intervene. This approach is generally unattractive because it is unwise to give user processes the power to turn off interrupts. Also, if the computer has two or more CPUs disabling interrupts affect only the CPU that executed the disable instruction. The other ones will continue running and will continue running and access the shared memory.
On the other, it is frequently convenient for the kernel itself to disable interrupts for a few instructions while it is updating variable. If an interrupt occur while the list of ready processes is in an inconsistent state, race condition could occur. Thus disabling interrupt is sometimes a useful technique within the kernel.

source: http://courses.ece.uiuc.edu/ece291/lecture/lockwood/l11.htm

source: http://www.arasan.com/interrupt.htm
.
For further studies go to:
ANDREW S TANENBAUM MODERN OPERATING PRENTICE HALL INTERNATIONAL EDITIONS (1992)
WILLIAM BUCHANAN DISTRIBUTED SYSTEMS AND NETWORKS
McGraw-HILL PUBLISHING COMPANY (2000)
IAN HSLOP, CHRIS IMAFIDON, ALOYSIUS EDOH
MBIS109, SYSTEM INTEGRATION HANDBOOK UNIVERSITY OF EAST LONDON (2002)