Upload
naveed
View
220
Download
0
Embed Size (px)
Citation preview
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
1/18
COA by Athar Mohsin
Introduction
Lecture 03
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
2/18
COA by Athar Mohsin
Last week Overview
Computer organization Encompasses all physical aspects of computer systems.
E.g., circuit design, control signals, memory types.
How does a computer work?
Computer architecture
Logical aspects of system implementation as seen by theprogrammer.
E.g., instruction sets, instruction formats, data types, addressingmodes.
How do I design a computer?
At the most basic level, a computer is a device consisting of threepieces:
A processor to interpret and execute programs
A memory to store both data and programs
A mechanism for transferring data to and from the outside world.
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
3/18
COA by Athar Mohsin
Hertz = clock cycles per second (frequency)
1MHz = 1,000,000Hz Processor speeds are measured in MHz or GHz.
cycle time is the reciprocal of clock frequency.
A bus operating at 133MHz has a cycle time of 7.52 nanoseconds:
Byte = a unit of storage 1KB = 210 = 1024 Bytes 1MB = 220 = 1,048,576 Bytes Main memory (RAM) is measured in MB Disk storage is measured in GB for small systems, TB for large systems.
Millisecond = 1 thousandth of a second
Hard disk drive access times are often 10 to 20 milliseconds. Nanosecond = 1 billionth of a second
Main memory access times are often 50 to 70 nanoseconds.
Micron (micrometer) = 1 millionth of a meter Circuits on computer chips are measured in microns.
Measuring units
133,000,000 cycles/second = 7.52ns/cycle
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
4/18
COA by Athar Mohsin
An Example System
Computers with large main memory capacity can run larger
programs with greater speed than computers having smallmemories.
RAM is an acronym forrandom access memory. Random access
means that memory contents can be accessed directly if you know its
location.
Cache is a type of temporary memory that can be accessed faster than
RAM.
I/O Ports
Serial ports send data as a series of pulses along one or two data
lines.
Parallel ports send data as a single pulse along at least eight data
lines.
USB, Universal Serial Bus, is an intelligent serial interface that is self-
configuring. (It supports plug and play.)
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
5/18
COA by Athar Mohsin
Structure & Function
A computer is a complex system contains millions of
electronic components Best is to recognize the hierarchical nature of complex system
A hierarchical system is a set of interrelated subsystem
A hierarchical nature of complex system is essential to design anddescription
Designer will deal to a particular level of the system at any one time At each level the designer is concerned with the STRUCTURE and
FUNCTION
The designer need to deal with a particular level of thesystem at any one time, and concerned with structure and
function at each level Structure is the way in which components relate to each other
Function is the operation of individual components as part of the structure
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
6/18
COA by Athar Mohsin
Function
The basic functions of allcomputer are:
Data processing
Processor
registers Data storage
Primary and secondary
memories
Data movement Buses I/O
Control
Signalling
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
7/18COA by Athar Mohsin
Function
A computer can perform generally four functions Data processing
Few types of data processing
Data storage
Temporary Permanents
On the route to and fro processor
Data movement
Within or to and fro outside
Control
Control of data processing, data storage and data movement
functions
Control manages the computer resources
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
8/18COA by Athar Mohsin
Function
The computer must be able to process data, that may be in
any forms and range
The computer must also store data
Data storage may be short term or for a longer period
Computer must be able to move data between in and
outside the computer
When data are received from or delivered to a device that is directly
connected to the computer, the process is known as input output
(I/O)
When data is moved over longer distances to or from a remotedevice, the process is known as data communication
There must be control of data processing, data movement
and data storage functions that is done through instructions
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
9/18COA by Athar Mohsin
Operations
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
10/18COA by Athar Mohsin
Structure
The computer interacts with its external environment
All the linkages to external environment are classified as peripheral
devices or communication lines
The internal structure of the computer is based on four
structural components:
Central Processing Unit (CPU): controls the operation of the computer and performs the date processing
functions
Main Memory:
Store data
I/O:
Moves data between the computer and its external environment
System Interconnection:
some mechanism that provides for communication among CPU, main
memory and I/O
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
11/18COA by Athar Mohsin
Structure
The computer interact with its external environment All linkages to the external environment can be classified
as peripheral devices or communication lines
Four main structural components are central processing unit- CPU refers as processor
Controls the operation of the computer and
Performs its data processing functions
Main memory Data storage
I/O: Moves data between the computer and its external environment
System interconnection Provides means of communication
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
12/18COA by Athar Mohsin
Computers consist of many things besides chips.
Before a computer can do anything worthwhile, it must also use
software.
Divide and conquer- a programming technique
Writing complex programs requires a divide and conquer approach,
where each program module solves a smaller problem.
Complex computer systems employ a similar technique through a
series of virtual machine layers
Imagine the machine is to be built from a hierarchy of levels
Each level has a specific function
Each level executes its own particular set of instruction
The Computer Level Hierarchy
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
13/18COA by Athar Mohsin
Each virtual machine layer
is an abstraction of the
level below it.
The machines at each level
execute their own particular
instructions, calling uponmachines at lower levels to
perform tasks as required.
Computer circuits
ultimately carry out thework.
The Computer Level Hierarchy
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
14/18COA by Athar Mohsin
Level 6: The User Level or upper level
Program execution and user interface level
E.g., Running word processing
The level with which we are most familiar.
Level 5: High-Level Language Level
The level with which we interact when we write programs in
languages such as C, Pascal, Lisp, and Java
These languages must be translated to machine understandable
language Compilers, interpreters
Compiled languages are translated into assembly language and
then to machine language
The Computer Level Hierarchy
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
15/18COA by Athar Mohsin
Level 4: Assembly Language Level
Acts upon assembly language produced from Level 5, as well
as instructions programmed directly at this level
One to one relation- each assembly language instruction is
translated to exactly one machine language instruction
Level 3: System Software Level, deals with operating system
instructions responsible for
Controls executing processes on the system.
Protects system resources.
Instructions translated through Assembly language to machinelanguage instructions often pass through Level 3 without
modification.
The Computer Level Hierarchy
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
16/18
COA by Athar Mohsin
Level 2: Machine Level or ISA level
Also known as the Instruction Set Architecture (ISA) Level.
Consists of instructions that are particular to the architecture of
the machine.
Programs written in machine language need no compilers,interpreters, or assemblers
Programs written in machine language can be executed directly
by the electronic circuits without any interpreter, complier or
translator
The Computer Level Hierarchy
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
17/18
COA by Athar Mohsin
Level 1: Control Level
Control unit make sure that instructions are decoded andexecutes properly
A control unitdecodes and executes instructions and moves datathrough the system
Control unit interprets the machine instructions one at a time
Control units can be microprogrammedorhardwired. A microprogram is a program written in a low-level language that
is implemented by the hardware.
Hardwired control units consist of hardware that directly executesmachine instructions
Through control signals that direct data and instruction traffic toappropriate parts of the system
Hardwired control units are very fast being actual physical parts
Once implemented difficult to modified
The Computer Level Hierarchy
8/14/2019 Computer Organization & Articture No. 3 from APCOMS
18/18
COA by Athar Mohsin
Level 0: Digital Logic Level
This level is where we find digital circuits (the chips).
Digital circuits consist of gates and wires.
These components implement the mathematical logic
of all other levels.
The Computer Level Hierarchy