Download as pdf or txt
Download as pdf or txt
You are on page 1of 61

1

CHAPTER 4
System Resources

m.r.m.rosman | Faculty of Information Management


rahimimr@uitm.edu.my | rahimi.rosman@yahoo.com
WHAT IS SYSTEM RESOURCES

RESOURCES
DEFINITION
Tool of communication between hardware and
software.

ROLES
• The combination of software program, the BIOS, and device
drivers are important components to make sure computer
run smoothly.
• Thus, the various “players” work together: the BIOS Start-up
program checks the hardware to make sure it is ready to be
used: the user provides specific instructions to the software
on what to do or the software interacts directly with the
CPU which controls the various underlying mechanisms that
make computer work as intended.
• Software has resources to control hardware, and hardware
has resources to alert software that it needs attention.
3
WHAT IS SYSTEM RESOURCES?

#1
A seat holds one person at a time; an address in memory
holds a single byte

#2
A seat can be empty; an address also can be empty

#3
A seat has a unique identifier; so does a memory address.

#4
Therefore to access data or instruction in memory; a
computer will refer to the addresses that contain bytes of
data
So, do you know 4
System resource is a tool
used by either hardware
the four categories
or software to of a system
communicate with each resources?
other
5
Memory Input/Output
addresses addresses

Interrupt
Direct Memory Request
Access (DMA) Number (IRQ)
Channel
4.1 Memory Address
MEMORY ADDRESS

MEMORY
DEFINITION
Numbers are assigned to physical memory located
either in RAM or ROM chips.

ROLES
• Software can then access this memory by using these
addresses.
• This numbers are assigned during the boot process.
• BIOS or real-mode device drivers may only work if given a
specific group of addresses (usually in the upper memory
range between 640K and 1024K).
• Shadowing ROM (aka shadow RAM) is a process whereby
ROM programming code copied into RAM to speed up
system operation, because of faster access speed of RAM
MEMORY ADDRESS
4.2 I/O Address
INPUT/OUTPUT ADDRESS

I/O
DEFINITION
Number assigned to hardware devices that software
used to get devices attention and to interact with them

ROLES
• Each device “Listens” for these numbers and responds to the
ones assigned to it.
• I/O address lines on a bus work much like the old telephone
party line; all devices “hear” the addresses, but only one
responds
4.3 DMA Channel
DMA CHANNEL

DMA
DEFINITION
A number designating a channel where by the device
can pass data to memory without involving the CPU

ROLES
• Short for direct memory access.
• DMA channel as a shortcut for data moving to/from the
device and memory.
• Computers that have DMA channels can transfer data to and
from devices much more quickly than computers without a
DMA channel can.
• Some expansion boards, such as CD-ROM cards, are capable
of accessing the computer's DMA channel.
• When you install the board, you must specify which DMA
channel is to be used, which sometimes involves setting a
jumper or DIP switch.
4.4 IRQ
INTERUPT REQUEST NUMBER

IRQ
DEFINITION
A line of a system-board bus that is a hardware device
can use to signal the CPU that the device needs
attention

ROLES
• . Some line have a higher priority for attention them others.
• A single number identifies each IRQ line.
• When eight more IRQs were added to the system boards,
IRQ2 was used to receive all interrupt from these eight.
• IRQ9 was wired to the pin on the ISA bus previously assigned
to IRQ2.
• It can be said that IRQ8-15 “cascade” to IRQ2.
INTERUPT PRIORITY

IRQ
DEFINITION
The PC processes device interrupts according to their
priority level. This is a function of which interrupt line
they use to enter the interrupt controller.

ROLES
• For this reason, the priority levels are directly tied to the interrupt
number:
• On an old PC/XT, the priority of the interrupts is 0, 1, 2, 3, 4, 5, 6, 7
while on a modern machine, it's slightly more complicated.
• Recall that the second set of eight interrupts is piped through the
IRQ2 channel on the first interrupt controller. This means that the
first controller views any of these interrupts as being at the priority
level of its "IRQ2".
• The result of this is that the priorities become 0, 1, (8, 9, 10, 11, 12,
13, 14, 15), 3, 4, 5, 6, 7. IRQs 8 to 15 take the place of IRQ2. In any
event, the priority level of the IRQs doesn't make much of a
difference in the performance of the machine, so it isn't something
you're going to want to worry about too much.
4.5 BOOT Process
C’mon Michael,
tell me about the
boot process.

Errr.. Boot
what?
The Boot, or Start-up, Process

Software interacts directly with the


Start-up process CPU, which controls the various

Bootable
underlying mechanisms that make the
computer work as intended.

During boot process, Startup BIOS


BIOS Start-up Program checks hardware to make sure tests essential hardware components
it is ready to be used. User provides specific (power-on self test [POST]).
instructions to software on what to do.
Then, setup information is used to configure
both hardware and software. Hardware
components are assigned system resources
they will later use for communication.
Then, OS is loaded, configured, and executed.
Hardware devices are matched up with BIOS and
device drivers that control them. Furthermore, some
applications software may be loaded and executed
during the boot process.
Types of Rebooting
Your great subtitle in this line

Hard Boot Errors


A hard reboot (also known as a cold reboot, cold In Windows, when an error occurs
boot or cold start) is when power to a computer is in the boot process, a Blue Screen
turned off of Death or a Black Screen of Death
Soft Automatically may occur.
On Unix and Unix-like operating
Soft Boot systems, such as Linux and Mac OS
X, a fatal error in the boot process
A soft reboot (also known as a warm reboot) is
may cause a kernel panic.
restarting a computer under software control,
without removing power or (directly) triggering a
reset line

Random Boot
Random reboot is a non-technical term referring
to an unintended (and often undesired) reboot
for which the cause is not immediately evident
to the user

Reboot Automatically Hard Random Errors


Systems may reboot automatically at a
scheduled time, after a power failure, or
kernel panic
A hard reboot (also known as a cold reboot, cold boot or
cold start) is when power to a computer is turned off

This starts the computer without first performing any


shut-down procedure

It may be caused by power failure, be done by accident,


or be done deliberately as a last resort to forcibly
retrieve the system from instances of a system freeze,
critical error or virus-inflicted DoS attack. It can also be
used by intruders to access cryptographic keys from
RAM, in which case it is called a cold boot attack
A soft reboot (also known as a warm reboot) is
restarting a computer under software control, without
removing power or (directly) triggering a reset line

It usually, though not always, refers to an orderly


shutdown and restarting of the machine

The Control-Alt-Delete key combination on the original


PC from Sphere 1 was designed to allow a soft reboot
reducing wear on the hardware. This kind of reboot
will not usually reset the hard disks, so that they have
time to update their write cache to permanent storage
Random reboot is a non-technical term referring to an
unintended (and often undesired) reboot for which the cause is
not immediately evident to the user

Such reboots may occur due to a multitude of software and


hardware problems, such as triple faults.

As Windows XP/Vista has an option to skip its Blue Screen of


Death (BSOD) (Blue Screens of Death in Windows XP/Vista offer
no option of pressing any key and seeing if the computer
continues functioning) and immediately restarts the computer
in the event of a fatal error, users can be mistaken in thinking a
Windows XP/Vista computer suffers from random rebooting.
Systems may reboot automatically at a
scheduled time, after a power failure, or
kernel panic

A kernel panic is an action taken by an


operating system upon detecting an
internal fatal error from which it cannot
safely recover

The method by which this is done varies


depending whether the reboot can be
handled in software, or must be handled
at the firmware or hardware level.
In Windows, when an error occurs in the boot
process, a Blue Screen of Death or a Black Screen of
Death may occur. On Unix and Unix-like operating
systems, such as Linux and Mac OS X, a fatal error
in the boot process may cause a kernel panic.
4.6 Steps in
BOOT Process
BOOT Process
4 steps involved in the boot process:

STEP - 1 STEP - 2 STEP - 3 STEP - 4

POST ROM BIOS OS USER


Power On Self Test (POST) The ROM BIOS startup The OS configures the system The user executes
program searches for and and completes it own loading applications software
loads an OS
Step1: POST

#2
It Begins by reading
configuration
#4
information stored in
POST protects the
DIP switches, jumpers,
bootstrapped code
and the CMOS chip
from being
and comparing that
interrupted by faulty
information to the
hardware
hardware present

#1 #3
The ROM BIOS The routines are part
startup program of a device's pre-boot
surveys hardware sequence. Once POST
resources and needs, completes
and assigns system successfully,
resources to meet bootstrapping code is
those needs. invoked.
POST
The principal duties of the main BIOS during POST are as follows

#1 #2 #3

Verify the integrity of Find, size, and verify Discover, initialize,


the BIOS code itself system main memory and catalog all system
buses and devices

#4 #5 #5

Pass control to other Provide a user Identify, organize, and


specialized BIOSes (if interface for system's select which devices
and when required) configuration are available for
booting
Step 2: The ROM BIOS startup program searches for and loads an OS

#2
Configuration
information on the
#4
CMOS chip tells
A hard drive might contain more than one logical drive;
startup BIOS where to
the partition table at the beginning of the drive
look for the OS.
contains information about the location of each logical
drive, indicates which drive is the boot drive, and holds
the master boot record that begins the boot process
for the operating system

#1 #3
Most often the OS is BIOS turns to that
loaded from logical device, reads the
drive C on the hard beginning files of the
drive. OS, copies them into
memory, then turns
control over to the OS
Step 3: The OS configures the system and completes it own loading

#2
The OS loads software
to control the mouse, a
CDROM, a scanner,
and other peripheral
devices (generally have
device drivers)

#1
The OS checks some
of the same things
that startup BIOS
checked (e.g.,
available memory and
whether memory is
reliable).
Step 4: The user executes applications software

#2 #4
User commands the
applications software, In Windows 3.x, it is
which makes requests common to include in
to the OS, which uses AUTOEXEC.BAT the
the system resources, following command to
system BIOS, and execute Windows each
device drivers to time the computer is
interface with and booted:
control the hardware C:\WINDOWS\WIN

#1 #3
The OS finds the Boot process is
applications software completed after
(on a secondary AUTOEXEC.BAT has
storage device) copies finished executing
software into
memory, and turns
control over to it.
4.7 Interrupt
4.8 System Configuration
SYSTEM CONFIGURATION

CONFIGURE
DEFINITION
Process of setting up hardware devices and assigning
resources to them so that they work together without
problems.

ROLES
• A properly-configured system will allow you to avoid nasty
resource conflict problems, and make it easier for you to
upgrade your system with new equipment in the future.
• An improperly-configured system will lead to strange errors
and problems, and make upgrading a nightmare.
• Knowing Your System’s. Configuration is the key to a well-
tuned, trouble-free system.
• In order to accomplish this you must start by understanding
its configuration.
• User can use diagnostic utilities to assist them diagnosing
the potential problem.
ASSIGNING RESOURCES TO DEVICES

RESOURCE
DEFINITION
Many devices have fixed resource assignments that
cannot be changed. Most system devices are like this. In
addition, it is generally best not to change (or try to
change) the resource settings for standard devices like
IDE hard disk controllers unless you both really know
what you are doing and there is a compelling reason to
change them.

ROLES

• The following devices usually have hard-coded resource


settings that cannot be changed:
• System devices,
• Keyboard,
• PS/2 mouse,
• Floppy disk controller,
• Primary IDE controller,
• Video card.
One of the main reasons is that
software sometimes makes
Problems with Changing Default Resource
assumptions that it really
shouldn't. Sometimes, one of Assignments
these assumptions is that a
device will use the resource
settings it defaults to. If you
change the settings, the software • Another problem with
will not function correctly changing default resource
settings has to do with
software testing.
• Software should be tested
with a variety of different
hardware using a variety of
different settings.
• Programmers often are

#1 #2 #3
incomplete in their testing
work.
• If the testing is not thorough,
the unusual resource
settings--the things they
"never thought anyone
would try"--are where the
strange bugs occur

Sometimes these programs


cut corners by only
supporting devices in their
default location
Resource conflict symptoms

When more than one device System hangs or lockups, particularly while using a peripheral device.
attempts to use the same
resource, the result is a
resource conflict. (Memory) parity errors on parity-enabled systems.

Resource conflicts can


manifest themselves in Noise or other problems from sound cards.
several different ways.

Some conflicts can be very Junk being printed on your printer


easy to recognize; others can
be extremely difficult to find
and correct, because they The mouse pointer hanging and refusing to move, or moving in a stuttering
fashion.
manifest themselves
indirectly, or through
Error messages from Windows 95, messages about the PC not operating at
symptoms that may not seem maximum performance, or the system dropping to "Safe Mode" or "MS-DOS
to have anything to do with Compatibility Mode".

the device causing the


problem. Errors and crashes of applications for no apparent reason.
Resource conflict Resolution

Determine what all the devices


in the system are using for
resources

Identify the conflicting devices.

Change the resource settings on


one or more of the devices so
they are no longer conflicting.
4.9 Plug’ N Play
Plug and Play

PNP
DEFINITION
The Plug and Play (also called PnP) specification was
developed by Microsoft with cooperation from Intel and
many other hardware manufacturers.

ROLES
• The goal of Plug and Play is to create a computer whose
hardware and software work together to automatically
configure devices and assign resources, to allow for
hardware changes and additions without the need for large-
scale resource assignment tweaking.
• A form of Plug and Play was first made available on the EISA
and MCA buses many years ago.
• Devices that do not support the PnP standard can be used in
a PnP system, but they present special problems.
• These are called legacy devices, which is geek speak for "old
hardware we have to keep using even though it doesn't have
the capabilities we wish it.
Plug and Play

PNP
DEFINITION
The Plug and Play (also called PnP) specification was
developed by Microsoft with cooperation from Intel and
many other hardware manufacturers.

ROLES
• They make resource assignment much more difficult
because they cannot be automatically configured by the
BIOS.
• Generally, the BIOS deal with non-PnP devices by ignoring
them.
• It simply considers them as "part of the scenery" and avoids
any resources they are using.
• There is usually no problem using these devices with PnP,
but using too many non-PnP devices can make it more
difficult for PnP to work, due to the large number of
resources that it is not allowed to touch.
REQUIREMENTS FOR PLUG AND PLAY

System Peripheral System Operating


Hardware Hardware BIOS System
REQUIREMENTS FOR PLUG AND PLAY

OPERATING SYSTEM SYSTEM HARDWARE


• The operating system must be designed to work • For system hardware, the hardware on
with the BIOS (and thus indirectly, with the your system, through the system
hardware as well). chipset and system bus controllers,
• The operating system sets up any low-level must be capable of handling PnP
software (such as device drivers) that are devices.
necessary for the device to be used by • For modern PCI-based systems this is
applications. built in, as PCI was designed with PnP
• It also communicates with the user, notifying him in mind.
or her of changes to the configuration, and allows • Most PCI-based systems also support
changes to be made to resource settings if PnP on their ISA bus, with special
necessary. circuitry to link the two together and
share resource information.
SYSTEM BIOS • Older PCs with ISA only or VL-bus
• Routines built into the BIOS perform the actual system buses generally do not support
work of collecting information about the Plug and Play
different devices and determining what should
use which resources.
• The BIOS also communicates this information to
the operating system, which uses it to configure
its drivers and other software to make the
devices work correctly. • The devices that you are adding into the system must themselves be PnP
• In many cases older PCs that have outdated BIOS compatible.
but otherwise have support for PnP in hardware
(PCI-based Pentiums produced between 1993 Regular ROM • PnP is now supported for a wide variety of devices, from modems and network
cards inside the box to printers and even monitors outside it.
and 1995 are the prime candidates) can be made • These devices must be PnP-aware so that they are capable of identifying
PnP-compliant through a BIOS upgrade themselves when requested, and able to accept resource assignments from the
system when they are made
PLUG AND PLAY OPERATION
• Create a resource table of the available IRQs, DMA channels and I/O addresses, excluding any that are reserved for
1 system devices.

• Search for and identify PnP and non-PnP devices on the PCI and ISA buses.
2

• Load the last known system configuration from the ESCD area stored in nonvolatile memory.
3

• Compare the current configuration to the last known configuration. If they are unchanged, continue with the boot;
4 this part of the boot process ends and the rest of the bootup continue from here

• If the configuration is new, begin system reconfiguration. Start with the resource table by eliminating any resources
5 being used by non-PnP devices

• Check the BIOS settings to see if any additional system resources have been reserved for use by non-PnP devices
6 and eliminate any of these from the resource table.

• Assign resources to PnP cards from the resources remaining in the resource table, and inform the devices of their
7 new assignments

• Update the ESCD area by saving to it the new system configuration. Most BIOSes will print a message when this
8 happens like "Updating ESCD ...Successful".

• Continue with the boot.


9
4.10 ESCD
EXTENDED SYSTEM CONFIGURATION DATA

ESCD
DEFINITION
The ESCD area is a special part of your BIOS's CMOS
memory, where BIOS settings are held. This area of
memory is used to hold configuration information for
the hardware in your system.

ROLES
• If the BIOS were to assign resources to each PnP device on
every boot, two problems would result.
• First, it would take time to do something that it has
already done before, each boot, for no purpose. After
all, most people change their system hardware
relatively infrequently.
• Second more importantly, it is possible that the BIOS
might not always make the same decision when
deciding how to allocate resources, and you might find
them changing even when the hardware remains
unchanged.
EXTENDED SYSTEM CONFIGURATION DATA

ESCD
DEFINITION
The ESCD area is a special part of your BIOS's CMOS
memory, where BIOS settings are held. This area of
memory is used to hold configuration information for
the hardware in your system.

ROLES
• ESCD is also used as a communications link between the BIOS and the
operating system.
• Both use the ESCD area to read the current status of the hardware and to
record changes.
• Windows 95 reads the ESCD to see if hardware has been changed and react
accordingly.
• Windows 95 also allows users to override Plug and Play resource
assignments by manually changing resources in the Device Manager
• This information is recorded in the ESCD area so the BIOS know about the
change at the next boot and doesn't try to change the assignment back
again.
• The ESCD information is stored in a non-volatile CMOS memory area, the
same way that standard BIOS settings are stored
60

That’s all
for today. C
U ALL in
next class!!
61

1. Explain briefly the four (4) methods to protect data, software and hardware.
2. During start-up, hardware devices will be assigned to a series of important
resources. Describes all of them in short essay.
3. Computer system depends on the configuration and setup information to perform
booting and loading of windows and other devices. How can this information be
retrieved?
4. Briefly descript four (4) nature of resource conflict
5. Briefly descript the Plug and Play (PnP) Operation with the help of a diagram
6. Explain three (3) different ways to that generally used to set or change resource
settings for devices.
7. Explain briefly the term legacy devices with example
8. List down two (2) method to reset power-on password
9. Explain briefly three (3) step to resolve resource conflict
10. Explain the boot process in details.

You might also like