Topic 3 - Memory Models
Topic 3 - Memory Models
Topic # 03
Fall 2019
Internal Registers
Protected Mode
[4]
CS-235 Computer organization & assembly language, Fall(2019)
IA-32 Modes of Operations
Real Address Mode
• Can access only 1MB Memory (beyond 80236)
• For MS-DOS
• One task at a time (Single-Tasking)
• Programs can access Shared Memory Locations
Protected Mode
• Can access only 4GB RAM
• For Windows, Linux
• Allows multi-tasking
• Memory Reservation for each Program [5]
CS-235 Computer organization & assembly language, Fall(2019)
IA-32 Modes of Operations
System Management Mode
• Implementing Functions : Power Management &
System Security
• Usually implemented by Computer Manufacturers
• Real Mode
• Segmented Memory
• Protected Mode
[7]
CS-235 Computer organization & assembly language, Fall(2019)
Segmented Memory Model
• Intel 8088/8086 is a so-called 16-bit
Machine
…
1FFFFh
1-
segment
(64KB)
10000h
00000h
1MB memory
[10]
CS-235 Computer organization & assembly language, Fall(2019)
Segmented Memory Model
• For Code Segment: CS:IP or CS:EIP
• For Stack Segment: SS:SP or SS: ESP
[13]
CS-235 Computer organization & assembly language, Fall(2019)
Linear Address Calculation
• Activity
CS: 1200h IP: F000h
[15]
CS-235 Computer organization & assembly language, Fall(2019)
Segment & Offset Combination
[16]
CS-235 Computer organization & assembly language, Fall(2019)
Protected Mode Memory Model
In place of the segment address, the segment register
contains a selector that selects a descriptor from a
descriptor table.
[19]
CS-235 Computer organization & assembly language, Fall(2019)
Descriptor Table
• Each descriptor table contains 8192 Descriptors
[20]
CS-235 Computer organization & assembly language, Fall(2019)
Descriptor Table: 80286
Available Bit:
• If AV=1, mean memory segment available.
Logical addresses
Local Descriptor Table DRAM
SS ESP
0018 0000003A
DS offset (index)
0010 000001B6 18 001A0000
10 0002A000
08 0001A000
IP 00003000
00
0008 00002CD3
Chunk of Program:
Page
Chunk of Memory:
Frame
[28]
CS-235 Computer organization & assembly language, Fall(2019)
Page Translation
A linear address is divided into a page directory field, page
table field, and page frame offset. The CPU uses all three to
calculate the physical address.
Linear Address
10 10 12
Directory Table Offset
Page Frame
Physical Address
Page-Table Entry
Directory Entry
CR3
32
[29]
CS-235 Computer organization & assembly language, Fall(2019)
Page Translation
[30]
CS-235 Computer organization & assembly language, Fall(2019)
CISC vs RISC
• CISC – Complex Instruction Set
large instruction set
high-level operations
requires microcode interpreter
examples: Intel 80x86 family
• Mult 2,3
[31]
CS-235 Computer organization & assembly language, Fall(2019)
CISC vs RISC
• RISC – Reduced Instruction Set
• Simple instruction formats
• Small instruction set
• Directly executed by hardware
Examples:
ARM (Advanced RISC Machines)
[32]
CS-235 Computer organization & assembly language, Fall(2019)
Questions?
[33]
CS-235 Computer organization & assembly language, Fall(2019)
THANK YOU!
[34]
CS-235 Computer organization & assembly language, Fall(2019)