Operating System and Computer Architecture (CT049-3-1-OS)
Operating System and Computer Architecture (CT049-3-1-OS)
CT049-3-1
Prepared by: Abubakar S. Santruraki First Prepared on: 10-4-13 Last Modified on: 10-4-13
Quality checked by: Team
Copyright 2013 Asia Pacific University of Information Technology
CU (control unit)
Performs fetch/execute cycle
Accesses program instructions and issues commands to the ALU
Moves data to and from CPU registers and other hardware
components
Subcomponents:
Memory management unit: supervises fetching instructions and
data from memory
I/O Interface: sometimes combined with memory management
unit as Bus Interface Unit
09:19:25 AM
09:19:25 AM
09:19:25 AM
Concept of Registers
Small, permanent storage locations within the CPU
used for a particular purpose
Manipulated directly by the Control Unit
Wired for specific function
Size in bits or bytes (not in MB like memory)
Can hold data, an address or an instruction
09:19:25 AM
Registers
Use of Registers
Scratchpad for currently executing program
Holds data needed quickly or frequently
User-visible registers
Hold intermediate results or data values, e.g., loop counters
Equivalent to LMCs calculator
Typically several dozen in current CPUs
09:19:25 AM
Special-Purpose Registers
Program Count Register (PC)
Also called instruction pointer
09:19:25 AM
Register Operations
Stores values from other locations (registers
and memory)
Addition and subtraction
Shift or rotate data
Test contents for conditions such as zero or
positive
09:19:25 AM
Operation of Memory
Each memory location has a unique address
Address from an instruction is copied to the MAR
which finds the location in memory
CPU determines if it is a store or retrieval
Transfer takes place between the MDR and
memory
MDR is a two way register
09:19:25 AM
Addres
s
09:19:25 AM
MAR-MDR Example
09:19:25 AM
09:19:25 AM
09:19:25 AM
Memory Capacity
Determined by two factors
1. Number of bits in the MAR
LMC = 100 (00 to 99)
2K where K = width of the register in bits
09:19:25 AM
09:19:25 AM
Nonvolatile Memory
ROM
Read-only Memory
Holds software that is not expected to change over the life
of the system
EEPROM
Electrically Erasable Programmable ROM
Flash Memory
09:19:25 AM
Fetch-Execute Cycle
Two-cycle process because both instructions
and data are in memory
Fetch
Decode or find instruction, load from memory into
register and signal ALU
Execute
Performs operation that instruction requires
Move/transform data
09:19:25 AM
09:19:25 AM
2. MDR IR
3. IR[address] MAR
4. MDR A
5. PC + 1 PC
09:19:27 AM
2. MDR IR
3. IR[address] MAR
4. A MDR*
5. PC + 1 PC
09:19:27 AM
2. MDR IR
3. IR[address] MAR
4. A + MDR A
5. PC + 1 PC
09:19:27 AM
LMC Fetch/Execute
SUBTRACT
IN
OUT
HALT
PC MAR
PC MAR
PC MAR
PC MAR
MDR IR
MDR IR
MDR IR
MDR IR
IR[addr] MAR
IOR A
A IOR
A MDR A
PC + 1 PC
PC + 1 PC
PC + 1 PC
BRANCH
BRANCH on Condition
PC MAR
PC MAR
MDR IR
MDR IR
IR[addr] PC
If condition false: PC + 1 PC
If condition true: IR[addr] PC
09:19:25 AM
Bus
The physical connection that makes it possible
to transfer data from one location in the
computer system to another
Group of electrical or optical conductors for
carrying signals from one location to another
Wires or conductors printed on a circuit board
Line: each conductor in the bus
4 kinds of signals
1. Data
2. Addressing
3. Control signals
4. Power (sometimes)
CT049-3-1 Operating System and Computer Architecture
09:19:25 AM
Bus Characteristics
09:19:25 AM
Bus Categorizations
Parallel vs. serial buses
Direction of transmission
Simplex unidirectional
Half duplex bidirectional, one direction at a time
Full duplex bidirectional simultaneously
Method of interconnection
Point-to-point single source to single destination
Cables point-to-point buses that connect to an external device
09:19:25 AM
Serial
1 bit transmitted at a timed
Single data line pair and a few control lines
For many applications, throughput is higher than for parallel
because of the lack of electrical interference
CT049-3-1 Operating System and Computer Architecture
09:19:25 AM
Broadcas
t bus
Example:
Ethernet
Shared among
multiple devices
CT049-3-1 Operating System and Computer Architecture
09:19:25 AM
Classification of Instructions
Data Movement (load, store)
Most common, greatest flexibility
Involve memory and registers
Whats this size of a word ? 16? 32? 64 bits?
Arithmetic
Operators + - / * ^
Integers and floating point
Boolean Logic
Often includes at least AND, XOR, and NOT
09:19:25 AM
09:19:25 AM
09:19:25 AM
09:19:28 AM
Stack Instructions
Stack instructions
LIFO method for organizing information
Items removed in the reverse order from that in which they
are added
Push
CT049-3-1 Operating System and Computer Architecture
Pop
CPU and Memory
09:19:28 AM
09:19:25 AM
09:19:25 AM
Addresses
Source
Result
OPERAND
OPERAND
09:19:25 AM
Instruction Format
Machine-specific template that specifies
Length of the op code
Number of operands
Length of operands
Simple
32-bit
Instruction
Format
09:19:28 AM
Instructions
Instruction
Direction given to a computer
Causes electrical or optical signals to be sent through specific circuits
for processing
Instruction set
Design defines functions performed by the processor
Differentiates computer architecture by the
Number of instructions
Complexity of operations performed by individual instructions
Data types supported
Format (layout, fixed vs. variable length)
Use of registers
Addressing (size, modes)
09:19:25 AM
Register Deferred
Also immediate, indirect, indexed
09:19:25 AM
09:19:25 AM
END
Q&A
CT049-3-1 Operating System and Computer Architecture
09:19:25 AM