Upload
jean-turner
View
223
Download
0
Embed Size (px)
Citation preview
CSCD102
INTRODUCTION TO COMPUTER SCIENCE II
3. COMPUTER HARDWARE
• 3.1 Objectives• 3.2 Definitions• 3.3 Computer Architecture– Layer Concept– Modular Concept3.3.1 Simplest (2 layer)3.3.2 Multi-layer
3.1 Objectives
• The student must know the basic terms in computer hardware
• Understand the systemic way of problem solution• That the computer is a system• Understand the working of the computer in
terms of the hardware architecture using the layer concept and the modular concept
• The advantages the two concepts offer in the study of computer systems
3.2 Definitions
• Systema collection of coordinated components that work together to achieve a well defined goal.
3.2 Definitions
• Computer System – -A device that works under the control of stored programs, automatically accepting, storing and processing data to produce information that is the result of that processing.-A device that accepts data in one form and processes it to produce data in another form.
3.2 Definitions
• Basic Components / Elements of Computer Systems– input– process– output– store
3.2 Definitions
• Basic Functions that Computer Systems perform -Input :- it accepts data from outside for processing within.-Processing:- the computer performs operations on the data it holds within.-Output:- the computer produces data from within for external use-Storage:- the computer holds data internally before, during and after processing.
3.2 Definitions
• Computer Architecture : The style of construction and organization of the many parts of a computer system.
3.2 Definitions
• Hardware : The general term used to describe all the tangible components ( electronics and mechanical) of the computer system.
Examples:- Input devices :- keyboard, mouse, joy stick etc.-Output devices:- printer, visual display unit, plotter etc.-Processor :- Intel Processor, Motorola Processor etc-Storage :- Main Memories/Primary Storage , Mass Storage/ Secondary Storage
3.2 Definitions
• SoftwareThe general term used to describe all the various programs – intangible - that may be used on a computer system together with their associated documentation.
Examples-WINDOWS Operating System-Microsoft WORD-Internet Explorer
3.2 Definitions
• ProgramIs a set of logical instructions that is written in the language of the computer to make the computer perform a specific task.
3.2 Definitions
• Stored Program-The computer is only able to obey a program’s instruction if the program has first been stored within the computer. -This implies that the computer must be able to input and store programs in addition to data. -The computer therefore works under the control of stored programs.
3.2 Definitions
• DataThe raw or basic facts pertaining to an entity or object of interest .
Entity or Object of interest = CARFacts
Colour, Registration Number, Chassis Number, Date Manufactured, Number of Passengers, Type etc.
3.2 Definitions
• Information Data that has been processed or converted into a more useful or meaningful or intelligible form.
Data and information
WHAT WILL REPLACE THE ?1 AND ?2
?1 ?2PROCESS
3.2 COMPUTER ARCHITECTURE: CONCEPT OF LAYER
To study and understand Computer Systems, there are a number of levels to be considered:
- Simplest ( 2 layer ) concept
- Multi-layer concept
Simplest ( 2 layer)
The simplest distinction between levels is that between Hardware and Software.
• The Hardware is viewed as the lowest and most basic level of the computer onto which a “layer” of Software is added.
• The software sits above the hardware, using it and controlling it.• The hardware supports the software by providing the operations the
software requires.
HARDWARE
SOFTWARE
Multi-Layered Machine
7.
6.
5.SOFTWARE
Application Layer
High Order Software
Operating System Layer
4.
3.
2.
1.
HARDWARE
Machine Layer
Microprogrammed Layer
Digital Logic Layer
Physical Device Layer
HARDWARE SUBLAYERS
• Physical Device LayerElectrical and electronic component layer. The various hardware devices are at this level and are built from simple (discrete) electronic components such as transistors, capacitors and resistors. These components rely on suitable electrical power supplies and operating environments.
• (Area of Computer Engineering/Technology )
HARDWARE SUBLAYERS
• Digital Logic LayerThe basic elements at this level can store, manipulate and transmit data in the form of simple
binary representations.
Gates :- the digital logic elements.
A gate is normally constructed from a small number of transistors and other electronic components.
AND gate, OR gate, NAND gate, NOR gate, XOR gate etc.
Many gates may be combined using (SSI, MSI, LSI, VLSI) onto a single chip to form standard digital logic elements such as :- Adders(full or half), decoders, multiplexers, flip-flops, latches, comparators etc.
Standard digital logic elements are combined together to form computer processors, computer memories, and major components of units used for input and output.
HARDWARE SUBLAYERS
• 3. Microprogrammed layer and 4. Machine layerThe microprogrammed layer interprets the machine language
instructions from the machine layer and directly causes the digital logic elements to perform the required operations.
The microprogrammed layer is a very basic inner processor and is driven by its own primitive control program instructions held in its own private inner ROM. These program instructions are called microcode and the control program is called a microprogram.
The machine layer is the lowest level at which a program can be written and it is only machine language instructions which can be directly interpreted by the hardware.
Eg Computer Machines
• RISC ( Reduced Instruction Set Computers)• CISC (Complex Instruction Set Computers
SOFTWARE SUBLAYERS
• 5. Operating System (OS) layerThis layer controls the way in which all software uses the underlying hardware.
It hides the complexities of the hardware from the other software by providing its own facilities which enable software to use the hardware more simply.
It prevents other software from bypassing these facilities so that the hardware can only be assessed directly by the operating system.
It provides an orderly environment in which machine language instructions can be executed safely and effectively.
SOFTWARE SUBLAYERS
• 6. Higher Order Software layerHandles all programs in languages other than
machine language which require translation into machine code before they can be executed.
Such programs, when translated, rely upon the underlying OS facilities as well as their own machine instructions.
SOFTWARE SUBLAYERS
• 7. Applications layer
This is the computer interface as seen by the end-user. The language of the computer as seen by the end-user.
SOFTWARE SUBLAYERS
• Virtual Machine (VM)Given the layer arrangement of the computer
architecture, the underlying computer as viewed from each layer is sometimes referred to as VM.
The OS is a VM to the Higher order software layer.
The Higher Order software layer is VM to the Application layer.
PHYSICAL ORGANIZATION OF THE COMPUTER SYSTEM
• How the complete microelectronic components are deployed.
Design and Build Approach: The Principle of Modular Construction
Most computer manufacturers construct their computers from varied combinations of standard components.
For example, many different microcomputers contain the same microprocessors.
PHYSICAL ORGANIZATION OF THE COMPUTER SYSTEM
• Standard components are much easier to interconnect if the means of interconnection is also standardized. One important method for doing this is using “buses”.
PHYSICAL ORGANIZATION OF THE COMPUTER SYSTEM
• BUSA Bus is a collection of parallel electrical conductors called “lines” onto which a number of components may be connected.Connections are made at points along the length of the bus by means of connectors with multiple electrical contacts.
PHYSICAL ORGANIZATION OF THE COMPUTER SYSTEM (MODULAR)
GENERAL PURPOSE BUS
PROCESSOROUTPUT
UNITSMAIN
MEMORY INPUTUNITS
BUS
• Two Basic Types of Bus• Internal Buses
Are used within the processor and are integral parts of its construction.
• External BusesAre used to connect separate hardware elements together, e.g. connecting the processor to main memory.
BUS
• Use of BusBuses may be used to convey:– Data signals ( data bus / lines)– Data address signals ( address bus / lines)– Control signals ( control bus / lines )– power
BUS
• Form-Factor/ Size of the ComputerThree different forms of construction– Single-chip computers– Single-board computers– Multiple-board, bus-based computers
BUS
• Single-chip computers – those found in such devices as – Cameras– Watches– Intelligent micro-machines
• The processors are specialized, they are programmed to do specific task , they are not immediately recognizable.
BUS
• Single-board computers – are – usually much bigger than single-chip computers – still relatively small– they are constructed on printed circuit boards
(PCB)
BUS
• Single-board computers – are
Two broad categories of Single-board• Small general-purpose microcomputers: for
example Personal Computers and its family.• Small special-purpose computers : often used
for applications involving the control of physical processes.
BUS
• Single-board computers – are
Two broad categories of Single-board• Small general-purpose microcomputers: for
example Personal Computers and its family.• Small special-purpose computers : often used
for applications involving the control of physical processes.
BUS
• Multiple-board, bus-based computers-are usually– General-purpose computers– Normally too large to fit onto a single board
Function oriented boards are connected by plugging them into individual slots on one or more general-purpose buses.
One board may contain the processor, another board may contain the main memory and so on
Example include the main frames and the minicomputers
Motherboard – the primary board for the processor and other main components are slotted into it
recall
• Main components of Digital Logic Layer ( DLL )
recall
• Mention examples of standard digital logic devices.
recall
• Adders• Decoders• Multiplexers• …….These are the standard digital logic devices.They are combined together to form computer
modulesBuses provide the interconnections.
recall
• Mention the discrete components of logic devices
recall
• The logic gates : AND, OR ………………………• Draw the Logic gates AND , OR
PHYSICAL ORGANIZATION OF THE COMPUTER SYSTEM (MODULAR)
• I / O BUS
MEMORY BUS
PROCESSOR
OUTPUT UNITS
MAIN MEMORY
INPUTUNITS
TWO BUSES
• I / O BUS
MEMORY BUS
MAIN MEMORY
OUTPUT UNITS
PROCESSOR
INPUTUNITS
Two Bus arrangement
• MOST architectures are based upon TWO BUSES and follow one of the two basic architectures shown above.
Two Bus arrangement
• In both cases
the bus used for data transfers between memory and the processor is separate from
the bus used by input and output units.
Two Bus arrangement
• The data transfers between
memory and the processor use a faster bus than that of the slower devices used for input and output.
Two Bus arrangement used in larger Microcomputers and many Minicomputers
• The processor has direct connections to both buses.
• Data only passes between memory and the I/O units via the processor.
Two Bus arrangement used in larger Microcomputers and many Minicomputers
• I / O BUS
MEMORY BUS
PROCESSOR
OUTPUT UNITS
MAIN MEMORY
INPUTUNITS
Two Bus arrangement used in larger Minicomputers and Mainframes
• The processor only accesses data via the memory bus.
• The processor delegates some of its detailed I/O controlling powers to subsidiary peripheral processors ( I/O channels )
TWO BUSES
• I / O BUS
MEMORY BUS
MAIN MEMORY
OUTPUT UNITS
PROCESSOR
INPUTUNITS
Speed Issues
• The bus arrangement and bus width affects the speed of the system and the aim is to
• Maximize the use of the processor by freeing it of the burden of controlling low level I/O operations.
• To maximize the speed and efficiency of I/O data transfers to and from memory.
• Use wider bus width to transfer data. This may vary from 8-bits, 16-bits, to 32-bits , 64-bits.
• Generally the mainframes have lager bus widths than the minicomputers and more so than the microcomputers.
THE PROCESSOR
• The processor consists of
– The Control Unit (CU)– The Arithmetic and Logic Unit ( ALU)
ALL components of the processor are wholly electronic
THE PROCESSOR
• Functions of the Processor – To control the use of main storage to store data
and instructions– To control the sequence of operations– To give commands to all parts of the computer
system– To carry out processing
THE PROCESSOR
• The Processor controls the input of data and its transfer into main storage, processes data, and then sends the result to output units.
At all stages data transmission is electronic
BUS (multiple) CONNECTIONS
• POWER
MAIN MEMORY
PROCESSORMDR MAR
MBR
DATA BUS
ADD
RESS BUS
CON
TROL BU
S
THE PROCESSOR
• Registersare special-purpose temporary-storage locations within the processor or other devices
they are separate from the locations in main memory, though similar in structure
THE PROCESSOR
• Relation between Buses and RegistersMDR = Memory Data RegisterMBR = Memory Buffer RegisterMAR = Memory Address Register
THE PROCESSOR
• Relation between Buses and Registers
– All data and instructions pass in and out of the PROCESSOR through MDR
– All data and instructions pass in and out of the MAIN MEMORY through MBR
THE PROCESSOR
• Location address (MAR)Prior to each transfer between the processor’s
MDR and main memory’s MBR, the exact source or destination of the data in main memory must be specified. This is done by loading the appropriate location address into the MAR.
THE PROCESSOR
• Location addressMain memory receives this address information via the address bus. It also receives control signals from the processor via the control bus which it is able to decode into commands for it to save or retrieve data.
DETAILS OF A PROCESSOR
MARAROAR1AR2AR3AR4AR5AR6AR7
MDR
DRODR1DR2DR3DR4DR5DR6DR7
INTERN
AL BUS
A L
UCO
NTR
OL
UN
ITIR
PC
CONTROL DATA
STATUS
RESULT
OPERANDADD
RESS
BU
SDA
TA B
US
POWER LINES
CLOCK
EXTERNAL CONTROL
EXTERNAL STATUS
THE PROCESSOR
• Control UnitFunction it co-ordinates and controls all hardware operations
peripheral unitsmain memorythe processor
THE PROCESSOR
• Control UnitHow it OperatesThe two stage operation
Fetch-Execute Cycle
Assume that after the ROM instructions have been executed the MAR has been loaded with the address of the next instruction to be performed
THE PROCESSOR
• Control UnitThe CU causes the requisite instruction to be fetched from MM via the MDR and placed in the IR (Current Instruction Register)
When MM receives an appropriate signal from the CU, it transfers the instruction, whose address is specified in the MAR, into the processor’s MDR via the Data Bus
THE PROCESSOR
• Control UnitThe CU causes the requisite instruction to be fetched from MM via the MDR and placed in the IR (Current Instruction Register)
When MM receives an appropriate signal from the CU, it transfers the instruction, whose address is specified in the MAR, into the processor’s MDR via the Data Bus
HARDWARE AND SOFTWARE INTEGRATION
• FIRMWARE this is program encoded in a ‘hardware’ formusually in Read Only Memory (ROM)
used to provide very basic services at a functional level just above the hardware
HARDWARE AND SOFTWARE INTEGRATION
• ROM CHIPSis a hardware pieceit is referred to as Read Only Memory because it is either impossible or difficult to write to
sometimes referred to as Non-Volatile ROM (NVROM) because any data stored in ROM remains there even if the power is turned off
HARDWARE AND SOFTWARE INTEGRATION
• STARTUP INSTRUCTION A personal computer’s start-up instruction (the software that boots the system) is put in ROM
HARDWARE AND SOFTWARE INTEGRATION
• STARTUP INSTRUCTION A personal computer’s start-up instruction (the software that boots the system) is put in ROM
the MOTHERBOARD ROM
HARDWARE AND SOFTWARE INTEGRATION
• MOTHERBOARD ROM NORMALLY contains four main Programsin General-purpose computer systems:-– CMOS– BIOS– POST– BOOTSTRAP LOADER
HARDWARE AND SOFTWARE INTEGRATION
• CMOS Complementary Metal-Oxide Semiconductorset upthis is a menu driven application that allows
the user to set System Configuration parameters
optionssecurity settings andpreferences
HARDWARE AND SOFTWARE INTEGRATION
• CMOS it is a special kind of small-scale memory embedded in a chip soldered to the motherboard and powered by a battery
HARDWARE AND SOFTWARE INTEGRATION
• CMOS function it maintains a record of– date and time– how much memory your PC has– which hardware devices are attached
HARDWARE AND SOFTWARE INTEGRATION
• CMOS importanceit is only by the reference to CMOSduring the power-up procedure that the computer knows it is a computer at all
without CMOS the computer would have to laboriously re-identify itself every time
HARDWARE AND SOFTWARE INTEGRATION
• CMOS require some configuration at the outsetthis is done through the BIOSyou can configure
Password = whether required after POSTDrive Order = the order that POST checks
drives for the OSMemory = how much RAM is installed on
system
HARDWARE AND SOFTWARE INTEGRATION
• CMOS Drive Type = the type of hard drive attachedDisplay = specify the monitor type
HARDWARE AND SOFTWARE INTEGRATION
• BIOS Basic Input/Output Systema series of device driver programs designed to present standard interface to the basic system hardwareimportantlyhardware that must be active during the boot process
HARDWARE AND SOFTWARE INTEGRATION
• BIOS ROM This is a separate chip on the motherboard that containsa set of instructions and drivers intended to get the computer hardware (Layer 1) up and running before the OS (Layer 2) kicks in
HARDWARE AND SOFTWARE INTEGRATION
• BIOS ROM functionmost important function is to
boot up the system
when you first turn on the system, its main system memory is empty, and it needs to find instructions to tell it what to do
HARDWARE AND SOFTWARE INTEGRATION
• BIOS ROM functionthese instructions are found within the
BIOS program
– SETUP Program– POST Program
HARDWARE AND SOFTWARE INTEGRATION
• BIOS ROM SETUP Programlets you manually configure the information held in CMOSto access its Setup program you must press a specific key or key combinations as the computer is powering up
HARDWARE AND SOFTWARE INTEGRATION
• BIOS ROM POST Programa series of (Power-On Self Test) - test routinesthat ensure the system components are operating properly
HARDWARE AND SOFTWARE INTEGRATION
• BIOS ROM POST Program functionthe very first thing a computer does when it is powered on is
BIOS is loaded into memory
HARDWARE AND SOFTWARE INTEGRATION
• BIOS ROM POST Program functionBIOS
then performs a routine known as
POST check again that it still has processor, memory,
motherboard, etc.
HARDWARE AND SOFTWARE INTEGRATION
• POST fatal errors if POST finds a serious problem or fatal error
it throws beep and halt the computer in its tracks
this can help to identify the specific Layer 1 component causing the problem
HARDWARE AND SOFTWARE INTEGRATION
• Check orderthe layer 1 components are checked in the order in the table
HARDWARE AND SOFTWARE INTEGRATION
• Check orderComponent Description of TestProcessor Halt without displaying any message
ROM BIOS A series of checksums are computed and if they do not match , system halts
DMA controller System halts
Interrupt Controller System gives a long beep followed by a short beep, system halts
Timing Chip System halts
BASIC ROM If the system has built in BASIC compiler
Video Card System gives a long beep followed by two short beepsIf test succeeds ROM BIOS gets copied into RAM memory
Expansion Boards Boards are initialized, ROM copied to RAM
RAM memory Counts and test RAM by writing a bit to each memory bit
Keyboard Presence of keyboard any stuck keys
Floppy Drive Signal is sent to adapter to activate floppy drive motor
Other Resources Parallel and serial ports are queried, system looks for OS to load
HARDWARE AND SOFTWARE INTEGRATION
• Plug and Play if the BIOS supports plug and play standards
it will detect and configure plug and play devices
HARDWARE AND SOFTWARE INTEGRATION
• BOOTSTRAP LOADER the routine that first scan`s the secondary storage
devices looking for an OS to loadoften the floppy disk is scanned first ( or removable drives ) then followed by the hard disk
as determined by the setup
why?
HARDWARE AND SOFTWARE INTEGRATION
• System Software Software oriented to the needs of the hardware and facilitates the development and running of applications
HARDWARE AND SOFTWARE INTEGRATION
• System Software comprises
FirmwareOperating SystemUtilitiesProgramming
Languages( sometimes)
HARDWARE AND SOFTWARE INTEGRATION
• OS Structure
COMMUNICATION MANAGEMENTT
MAIN MEMORY I/O DEVICES SECONDARY
STORAGECOMMUNICATION
DEVICESCPU
FILE MANAGEMENTI/O
MANAGEMENTMEMORY
MANAGEMENTPROCESS
MANAGEMENT
USER INTERFACE
SYSTEM PROGRAMSCompilers, Assemblers, Linkers etc
APPLICATION PROGRAMS
OS
HDW
HARDWARE AND SOFTWARE INTEGRATION
OS LAYERS AND RELATION TO USER, APPLICATIONS , HARDWARE
HDW
COMMAND
KERNEL
SERVICE
USER
APPLICATION PROGRAM
OS
• OSFUNCTIONS INCLUDE:Process ControlFile controlSecondary Storage controlI/O device controlUser control
OS
• OSExamples:WINDOWSUNIXLINUXREDHATUBUNTUDOS
OS
• OSModel:The Command LayerService LayerKernel
OS
• OSThe Command Layeris the user interface to the OS
Functionit provides an interface that allows the user to give commands to operate the computer system
OS
• OSService layeris that part of the OS that provide key functions to the computer systeme.gApplication managementComputer BrowserDomain Name ServersEvent LogTelnetSecurity Accounts Manager
OS
• OSKernel ( Supervisor/ Executive)is that part of the OS that remains in main storage permanently during the running of the computer; it is the controlling part of the OSFunction:- it controls the running of all other programs