









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










What is an interrupt?
An interrupt is a signal from a device attached to a computer or from
a program within the computer that causes the CPU to stop its
normal program execution and perform service related to the event.
Examples of interrupts :I/O completion, divide-by-0, etc.
Maskable Interrupt : It is a hardware interrupt that may be ignored
by setting a bit in an interrupt mask register's (IMR) bit-mask.
Nonmaskable Interrupt :is a hardware interrupt that does not have
a bit-mask associated with it - meaning that it can never be ignored.
NMIs are often used for timers, especially watchdog timers
-In a similar way, the interrupted process suffers from the interrupt:
-the cache it was using is disturbed, and cache updates are
required
Interrupt nesting:
-An interrupt can happen while executing an ISR. This is
called in terrupt nesting.
Reentrant Code
- A computer program or routine is described as reentrant if
the routine can be re-entered while it is already running (i.e it
can be safely executed concurrently ).
To be reentrant, a computer program or routine:
Must hold no static (or global) non-constant data.
Must not return the address to static (or global) non-
constant data.
Must work only on the data provided to it by the caller.
Must not modify its own code. (unless executing in its
own unique thread storage)
Must not call non-reentrant computer programs or
routines.
Example for reentrant code:
int f(int i)
{ return i + 2; }
int g(int i)
{ return f(i) + 2; }
If the processor and/or operating system allows interrupt
nesting, ISR servicing of one interrupt can itself be pre-empted
by another interrupt. Interrupt nesting increases code complexity,
because ISRs must use re-entrant code only, i.e. any number of
concurrent processes (including itself) can call them at the same
time.
mechanisms for controlling the exchange of signals over the bus.
intrasystem communication.
e.g. 16 bit address bus giving 64k address space
Clock signals
Types of Buses
the typical machine, supporting various devices. They can be
divided into
-External buses
Other types of buses:
I/O Bus
Computer’s chassis
Principle Bus Design Issues
four main factors:
Bus
Controller
BG
BR
Bus Busy
Daisy chain Arbitration
Advantage: simple
A low-priority device may be locked out indefinitely
speed of the bus
B u s
a r b i t e r 1
A c k R e q
B u s
a r b i t e r 4
A c k R e q
B u s
a r b i t e r 3
A c k R e q
B u s
a r b i t e r 2
A c k R e q
4 × 2
P r i o r i t y e n c o d e r
2 × 4
D e c o d e r
B u s b u s y l i n e
Parallel Arbitration
Bus
Controller
BR
Bus Busy
Polling
Poll
count
sequence of numbers on the poll-count lines.
activated.
and U
i
connects to the bus.
units.
Number of units are limited based on the poll-count lines
capability