chpt4 understanding and managing memory
TRANSCRIPT
-
8/9/2019 Chpt4 Understanding and Managing Memory
1/17
Chapter 4Chapter 4Understanding and Managing Memory
-
8/9/2019 Chpt4 Understanding and Managing Memory
2/17
Physical MemoryPhysical Memory
What are the 2 main CategoriesMemory used in the PC?
ROM, RAM
What is ROM (read-only memory)?
Data are pre-recorded in them and
cannot be removed and can only be read.Mainly used to store contains programs(firmware) to handle the devices. Thecontents are not lost even when thecomputer is turned off (nonvolatile).
What is RAM (Random AccessMemory)?
Type of computer memory that can beaccessed randomly. They are volatile,meaning that they lose their contentswhen the power is turned off. RAM isnormally refer to as the main memory,
the memory available to programs.
-
8/9/2019 Chpt4 Understanding and Managing Memory
3/17
Static and Dynamic RAMStatic and Dynamic RAM
What are the type of RAM available?DRAM (Dynamic RAM)
Static RAM (SRAM)
What is Dynamic RAM?
Commonly used as memory for
computers. It inexpensive and slow. Itneeds to be refreshed every fewmilliseconds to maintain its data. Theyare volatile, meaning that they losetheir contents when the power isturned off.
What isS
tatic RAM?It can hold data longer that DynamicRAM when the computer loss its power.
Does not need to be refreshed, whichmakes it faster; but it is also moreexpensive than dynamic RAM. Mainlyused as Cache memory.
-
8/9/2019 Chpt4 Understanding and Managing Memory
4/17
Role of System Memory in the PCRole of System Memory in the PC
How does it affectsPerformance?Insufficient memory can cause a
processor to work at 50% or even morebelow its performance potential.
How does it provide Software Support?
Newer programs require more memorythan old ones. More memory will giveyou access to programs that you cannotuse with a lesser amount.
How it contribute toPC Reliability andStability?
Bad memory is a major cause ofmysterious system problems. Usinghigh-quality memory will result in a PCthat runs smoothly and exhibits fewerproblems. Also, even high-quality
memory will not work well if you use thewrong kind.
How it affect future RAM Upgrade?There are many different types ofmemory available, and some are moreuniversal than others. Making a wisechoice can allow you to migrate yourmemory to a future system or continueto use it after you upgrade yourmotherboard.
-
8/9/2019 Chpt4 Understanding and Managing Memory
5/17
Common Main Memory Module
What are the common RAM modules?SIMM, DIMM, RIMM
What is SIMM?SIMM (single inline memory module).Implemented in: FPM (fast pagememory), EDO (extended data out)
memory. Speed is around 50ns, 60ns,70ns.
What DIMM?DIMM (dual inline memory module).Impemented in SDRAM (synchronousDRAM) and SDRAM II (DDR SDRAM).
SDRAM runs at 66Mhz, 100Mhz,133Mhz, which the Bus speed. SDRAMII run twice the Bus speed internally, ieif bus speed is 133Mhz then theinternal speed is 266Mhz.
What is RIMM?Rambus Inline Memory Module. Has thecapability to transfer up to 1.6 billionbytes per second. Runs at 400Mhz to800Mhz. Has 184pins.
72-pins SIMM
168-pins SDRAM
RDRAM
-
8/9/2019 Chpt4 Understanding and Managing Memory
6/17
ECC RAM, Parity and NonECC RAM, Parity and Non--parityparity
What is ECC (Error Checking andCorrection) RAM?
A type of memory that includes specialcircuitry for testing the accuracy ofdata as it passes in and out of memory.
What is required to Support ECC RAM?
To use ECC RAM, the Mainboard mustsupports ECC (check CMOS)
What isP
arity Check?A simple implementation of errorchecking.
How it Works?Parity check is either odd or even. Aparity bit (1 or 0)is added to every data
unit that are transmitted. The paritybit for each unit is set so that all byteshave either an odd number or an evennumber of set bits.If Even parity is used, then the paritybit for the binary number 10110101 willbe 1, the data sent will be 101101011.
Can Parity correct Error?No. It detect error only.
Can it detects Dual bits error?No. It cannot detect dual bits error.
-
8/9/2019 Chpt4 Understanding and Managing Memory
7/17
Logical Memory StructureLogical Memory Structure
How is the System Memory beenOrganized Logically?Conventional Memory, Upper MemoryBlock, High Memory Area, Extendedmemory
What is Conventional Memory or Base
Memory?The first 640 KB of system memory.Use by standard DOS programs,drivers, memory-resident programs, andanything that runs under standard DOS.
What is Upper Memory?
The 384 KB immediately aboveconventional memory. It is reserved foruse by system devices and for specialuses such as ROM shadowing anddrivers.
What is High Memory Area?This is the first 64 KB of extendedmemory. It is the only area in theExtended memory accessible by realmode program.
What is Extended Memory?
All the memory above the high memoryarea until the end of system memory.Used for programs and data when usingan operating system running inprotected mode, eg any version ofWindows. (Technically, the high memory
area is part of extended memory).
-
8/9/2019 Chpt4 Understanding and Managing Memory
8/17
Memory MapMemory Map
16-bits Programs
(DOS and Windows)
Device drivers and TSRs
(Terminate & Stay Resident)
DOS
640KB
1024KB
1088KB
0KB
Base or
Conventional
Memory (640KB)
Upper Memory
(384KB)
High memory area
(the first 64K of
Extended memory)
Extended Memory
(includes HMA)
-
8/9/2019 Chpt4 Understanding and Managing Memory
9/17
ExerciseExercise Check PC Memory MapCheck PC Memory Map
1. Get to the Command Prompta) Type the command:
mem /c/pb) Check the amount of Convention,
Upper Memory and Extendedmemory available
c) Find out which drivers are loaded in
Conventional and Upper Memory
2. Reboot the PC with StartUp Diska) Type the command:
mem /c/pb) Check the amount of Convention,
Upper Memory and Extended
memory availablec) Find out which drivers are loaded in
Conventional and Upper Memoryd) Compare with the Results in (1)
-
8/9/2019 Chpt4 Understanding and Managing Memory
10/17
Managing Memory in DOSManaging Memory in DOS
Why does Memory need to be managedin DOS?
DOS programs work only in theConventional memory of 640K. Withdrivers, OS files, etc, loaded, programmay not have enough memory left torun. There is a need to maximum
available conventional memory.
How can it be done?
Loading drivers, OS files out ofConventional memory to the UpperMemory and High Memory Area.
What need to be done?Configure the Config.sys:
1. Activate the Extended Memory
Driver used is HIMEM.SYS
2. Activate the Upper Memory
Driver used is EMM386.EXE
3. Move device drivers and TSR to theUpper Memory or HMA
Using devicehigh
-
8/9/2019 Chpt4 Understanding and Managing Memory
11/17
Using Config.sys to Activate Memory Drivers
What is Config.sys used for?Use to activate device drivers
Which environment uses Config.sys?
For DOS environment only. Windows donot need the Config.sys
When does Config.sys activated?Every time the PC is activated
device = c:\dos\himem.sys
device = c:\dos\emm386.exe noems
DOS=high,umb
devicehigh = c:\mouse
no ems do not
create expandedmemory
High - Load DOS in High Memory Area
UMB - accessible to Upper MemoryLoading device high - Load
mouse driverto HighMemory Area
Contents ofCONFIG.SYS
-
8/9/2019 Chpt4 Understanding and Managing Memory
12/17
Expanded MemoryExpanded Memory
What is Expanded Memory (EMS
)?A technique to use more than 1MB(megabyte) of main memory in DOS -based computers.
Is it still use in PC?
No. Windows 3.0 and all later versionsof Windows use Extended MemoryManager. Programs can use extendedmemory without interfering with oneanother.
Can Expanded memory be simulate withWindows?
Yes, Windows can simulate expandedmemory by using the EMM368.EXEdriver. The driver must be loaded inConfig.sys.
-
8/9/2019 Chpt4 Understanding and Managing Memory
13/17
Windows Virtual Memory
What is Virtual Memory?An imaginary memory area supported bysome operating systems. Windows 9ximplemented VM by using the Hard Diskspace to act as Memory
What is the purpose?Allows for the larger applications andmultitasking features of Windowsrequiring more RAM than physically.
How is VM being used?
For example, virtual memory mightcontain twice as many addresses as mainmemory. A program using all of virtualmemory, therefore, would not be ableto fit in main memory all at once.Nevertheless, the computer couldexecute such a program by copying into
main memory those portions of theprogram needed at any given pointduring execution.
-
8/9/2019 Chpt4 Understanding and Managing Memory
14/17
Managing Virtual Memory in WindowsManaging Virtual Memory in Windows
Can the Virtual Memory be Disable?No Recommended. Without VirtualMemory, PC performance drops.
Where is the Physical Virtual Memorylocated?
VM is also known as Swap File. It islocated in Located inC:\Windows\win386.swp
Where can you Manage Virtual Memory?
1. Control Panel
2. System applet
3. Performance tab
4. Virtual Memory
How can the VM be optimized?
By setting both the Maximum andMinimum to the same value. Therecommended value is about 2 times thephysical system memory.
-
8/9/2019 Chpt4 Understanding and Managing Memory
15/17
Memory BankMemory Bank
What is Memory Bank?A memory bank is the smallest amountof memory your system's processor canhandle at one time.
What is it role?
It determine if you require upgrades inpairs or not.
How it works?
Each bank contains a number of slots.Memory must be installed in "banks" inorder to be recognized by the system.
You must fill an entire memory bankeach time you install new memory, and amemory bank may consist of one, two orfour memory sockets.
Rough Guideline?16-bit system (286 or 386/SX)
2-30-pin SIMM sockets equalone bank
32-bit system (later 386 or 486)
4-30-pin SIMM sockets equalone bank; 1-72-pin SIMM socketequals one bank
64-bit system (Pentium, PentiumMMX, Pentium Pro or Pentium II)
two 72-pin SIMM sockets equalone bank, and one 168-pin DIMMsocket equals one bank.
-
8/9/2019 Chpt4 Understanding and Managing Memory
16/17
Memory Per BankMemory Per Bank
32-bit
Memory
Bus
8-bitSIMM
8-bitSIMM
8-bitSIMM
8-bitSIMM
Requires 4 x SIMM in 1 bank
(4 x 8 bits = 32 bits)
486 PCs Pentium PCs
32-bits
SIMM 1
32-bits
SIMM 2
Bank 0
32-bits
SIMM 3
32-bits
SIMM 4
Bank 1
Requires 2 x 32-bits SIMM per bank
(2 x 32 bits = 64 bits)
-
8/9/2019 Chpt4 Understanding and Managing Memory
17/17
Memory Per BankMemory Per Bank
Pentium PCs
64-bits
DIMM 1
64-bits
DIMM 3
64-bits
DIMM 2
Requires 1 x 64-bits DIMM per bank
(1 x 64 bits = 64 bits)
Bank 0 Bank 1 Bank 2