180 likes | 366 Views
T111. Memory Addressing. What is Memory? (in computing terms). What does it look like? What is it used for? Why do you need it? Can a computer run without RAM?. Types of Memory. Flash memory. RAM. Optical memory. Computer Registers. Hard disk drive. CPU Cache Memory. Tape drive.
E N D
T111 Memory Addressing
What is Memory? (in computing terms) • What does it look like? • What is it used for? • Why do you need it? • Can a computer run without RAM?
Types of Memory Flash memory RAM Optical memory Computer Registers Hard disk drive CPU Cache Memory Tape drive
Computer Registers very fast, very expensive, small capacity Executable memory. Requires constant power hence short term. CPU Cache Memory very fast, expensive, small capacity RAM fast, affordable, medium capacity Flash memory slower, cheaper, medium capacity Hard disk drive slow, very cheap, very large capacity Non-Executable memory. No power required for retention hence long term. Optical memory very slow, cheap, medium capacity Tape drive very slow, affordable, very large capacity Types of Memory
Address bus CPU RAM Data bus The Address Bus • CPU • Address Bus • Data Bus • Read operation: • The CPU puts the address of the byte on the address bus, and the RAM puts the byte of data on the data bus for the CPU to read • Write operation: • The CPU puts the address of the byte on the address bus and the data to be written on the data bus. The data is stored in the RAM
Address Bus Size 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 1 1 0 0 0 • The early 8086 processors had a physical address bus that was 20 bits wide. • The physical address bus is the actual address bus that goes between the CPU and RAM. 0x5C6B8(Byte 378,552) 8086 CPU
8086 Processor • What is the maximum amount of RAM that a 8086 processor can address? • With 20 bits there are 220 possible addresses each of which addresses one byte so the maximum amount of RAM is 220 or 1,048,576 bytes (1MB) • DOS could only directly address 1MB of RAM • Exercise 2
Memory Addressing • Requirements for memory addressing: • Physical RAM • CPU internal address bus • CPU external address bus • OS restrictions
Internal vs External • The physical address bus is the actual address bus that goes between the CPU and RAM • Internally the CPU may have a larger (or smaller) address bus- eg the Athlon 64 has an internal bus that is 64 bits wide but externally it is only 40 bits wide.
1GB 1GB 1GB 1GB 00000000 a minimum of 3GB of addresses are available to the system RAM Other devices 512MB of Video RAM ffffffff Address Allocation Scenario 1 • XP (32 bit) • 4GB RAM • 512MB Video card Usable Memory = 3.25GB
Address Allocation Scenario 2 • Vista (64 bit) • 6GB RAM • 1GB Video card Usable Memory = ? Scenario 3 • Vista Starter • 1GB RAM • 256MB Video card Usable Memory = ? • Exercise 3
Memory Addressing • Each byte of RAM has it’s own address
Memory Addressing • Example: PC 32 Bit OS 32 Bit CPU 2GB RAM 00000000 DIMM 0(1GB) 40000000 4C000000 DIMM 1(1GB) 80000000
Review • Address bus determines the amount of memory that can be addressed • CPU and OS can be factors • Other devices such as video cards can reduce the memory that can be used in 32bit Operating Systems • Addresses in Hex
In the lab… • Linux commands • Linux directory structure