Lecture 08 System Resources_rev

Download Report

Transcript Lecture 08 System Resources_rev

Lecture 8
System
Resources
Interrupts Requests (IRQs)
Direct Memory Access (DMA)
Input / Output (I/O) Addresses
Boot Process
1
What are System Resources?


In the context of computer configuration, the words system
resources refers to the mechanisms used to interface,
communicate, and control individual device adapters
(interface cards) and I/O ports (e.g. serial, parallel, mouse
and PS/2 ports).
System resources are shared between the different
hardware components of the computer system that need to
communicate with the CPU.
2
What are System Resources?


The CPU is a complete computation engine that is
fabricated on a single chip. It not only controls the
functions of the computer, but also handles requests
from many input and output devices. Computers appear
to handle multiple requests at the same time. However,
the CPU is only capable of handling one request at a
time. System resources prevent two or more devices
from communicating at the same time.
System resources also enable the CPU to identify the
hardware device that is making a request.
3
Interrupt Requests (IRQs)


Various hardware devices may want to tell the CPU that
there is information available that is ready for transfer. The
devices indicate this by making an interrupt request, or
IRQ.
It is a general rule that IRQs cannot be shared. A device
IRQ will cause the operating system to stop momentarily
as it asks the CPU to service the request. IRQs are critical
to the proper functioning of the system. It is recommended
that default device IRQ assignments be followed.
4
Interrupt Requests (IRQs)
Different Types of
Hardware Device
5
IRQ in PC
16 IRQ for PC
6
Advanced Programmable Interrupt Controller
(APIC)

An Advanced Programmable Interrupt Controller (APIC)



More complex Programmable Interrupt Controller (PIC) containing a
magnitude more outputs, much more complex priority schemas, and
Advanced IRQ management
Intel APIC Architecture is one of the best known APIC architectures that is
now replacing the original 8259A PIC in newer x86 PCs since year 2000. It
is a system of Advanced Programmable Interrupt Controllers (APICs)
designed by Intel for use in Symmetric Multi-Processor (SMP) computer
systems.
APCI can be a cause of system failure, as some versions of some
operating systems do not support it properly (E.g. some Unix operating
system)
7
How to check IRQ allocation in windows


My Computer => (Right Click) Properties => Device Manager
View => Resources By Type => Interrupt request (IRQ)
8
Direct Memory Access (DMA)


Direct Memory Access (DMA) channels allow devices to
bypass the processor and directly access the computer
memory. Therefore, devices with a DMA channel
assignment have faster data transfers.
DMA channels are typically used by high-speed
communication devices to transfer large amounts of data
at high speeds. Examples of such devices include sound
cards, some network cards, some SCSI cards and some
disk drives.
9
How DMA works


A device signals the intention to use the DMA channel.
Then the DMA controller takes control of the data bus and
address bus from the microprocessor or CPU. Data and
address buses are communication lines that bring
information to the computer memory.
The CPU is temporarily disconnected from the buses. It is
put in a floating state. After the transfer is complete, the
DMA controller releases the data bus and address bus back
to the CPU. The CPU can then continue with its normal
functions. There is one drawback of DMA use, especially
with older systems. The CPU may be put on hold while the
DMA device is working, slowing all other functions down
until the DMA transfer is complete.
10

As with IRQs, devices that want to make a DMA
transfer are assigned a priority level. If a device DMA
has a low number, it has higher priority than a device
that has a higher number.
11
Direct Memory Access (DMA)
12
DMA
Channel
Default Device
Other Possible Allocation
0
Dynamics RAM Memory Refresh
1
Sound Card (low DMA Setting)
2
Floppy Disk Controller
3
Available
4
Cascade for DMA 0 -3
5
Sound Card (High DMA Setting)
Network Card, SCSI Adapters
6
Available
Network Card, Sound Card (High
DMA Setting)
7
Available
Network Card, Sound Card (High
DMA Setting)
Network Card, SCSI Adapters, Parallel
Printing Port, and Voice Modem
Network Card, SCSI Adapters, Parallel
Printing Port, Voice Modem, and
Sound Card (low DMA Setting)
13
I/O Address
In addition to an IRQ, computer components also need to
be assigned an I/O port number. An I/O port number is a
memory address where data is temporarily stored as it
moves in and out of the devices. The I/O address is very
similar to a post office box. As mail comes in, it is
stored temporarily in a post office box. No two boxes
can have the same number or the mail can end up in the
wrong box. The same is true for I/O ports. No two devices
can have the same I/O address.
14
I/O Address
15
Common Assignment for I/O Addresses
16
The System Software in ROM (BIOS)




Power On Self Test (P.O.S.T.) Routine
Setup instruction for reading CMOS parameters and copy
system software from BIOS (in motherboard and interface
card) to memory
Bootstrap - find OS in Boot Device
The Boot instruction transfers the control to the operating
system
17
Boot Process
18
Functions of POST

These tests verify that the system (e.g. CPU, video card,
RAM) is operating correctly and will display an error
message and/or output a series of beeps known as beep
codes depending on the BIOS manufacturer.
19
Bootstrap Loader



A tiny program which is used to find the boot sector on a
disk (floppy disk, hard disk or CD-ROM, depends on the
configuration parameter).
If no OS exists, error message “Non-system disk”
will be displayed.
The last step of BIOS is to transfer the control of the
system to the operating system (e.g. DOS, windows,
Linux).
20