Chapter 2 Basic Elements of an Operating System (Updated)
Chapter 2 Basic Elements of an Operating System (Updated)
► if K= 4 then 16 locations
Figure 1
0 X
• READ : Value
1
Address
2 At the beginning : CELL = garbage
3 Memory Sizes : CELL X CELL SIZE
ADDRESS
4
( 1 byte , 2 byte , 4 byte …….)
8 bits 1 Bytes 1024 Bytes
10
1024 (2 ) bytes Kilobytes (2 10)
30
mbytes gigabytes (2 ) bytes
40
gbytes terabytes (2 ) bytes
CELL
SIZES n-1
The Operation of Memory
►The MAR (Memory Address Register) and
MDR(Memory Data Register) act as an
interface between the CPU and Memory.
• MAR is connected to the address bus. Its
main function is to contain the RAM address for
the instruction the CPU needs next to read/write
(fetched/stored).
• MDR is connected to the data bus. The MDR
holds the data is needed to be written to the
RAM, or has been read from the RAM.
•Address Decoder is decoding the address in MAR.
Translation lookaside buffer (TLB) is a memory cache
“Decode the address in MAR” mean that memory
unit must translate the N-bit address stored in the
MAR into the set of signals needed to access that one
a byte
specific memory cell.
Individual
memory
cells
a bit
Address line
Test Yourself
1. Assuming that the MAR is “110110”. Decode the address
in MAR
Data Transfers:
Need Instructions:
• FETCH – instr to read content of a memory location
(fetch some data from memory)
• STORE – instr to write a value to a memory location
(store some data into memory)
Need Special Registers:
• MAR – for the address of the memory location;
• MDR – for data to be written to / read from memory
implemented via digital circuitry
• Using decoders to select individual cells
• Fetch / Store decoder
Fetch(10110) read data from the data bus into the
MDR
Step1
Step 3Step2 .. Decode
. Copy Load thethe
address
the contents of theinto
address inMAR
memory location into the MDR
the MAR
MAR 110001
MDR 10101101
Store(10110,11111111)
1.3.Value
4.
2. Address
Load fromisMDR
value
address decoded
into and
isMAR
MDR
into put intocell
theisselected
selected
cell(memory location)
Address Cell Content
10100 00100110
10101 10100110
10110 00111110
11111111
10111 10101010
MAR 10110
MDR 11111111
Cache Memory
• Quickly accessible memory that’s stores copy of
frequently used data in an easily accessible memory area
instead of main memory.
2. 2.The Processor
The processor manipulates data stored in memory
under the control of a program stored in memory.
2. 2.The Processor
• A program is a series of instructions.
• Each instruction has an operation code and one
or more operands
2. 2.The Processor
The processor contains four key components.
2.3. Input and Output
The input/output control system (IOCS)
communicates directly with the computer’s
peripheral devices.