Title: Memory Management I
1Memory Management I
Written Assignment 2 due Systems Assignment 1
returned Systems Assignment 2 due next time
2Memory Management I
3Memory Management I
III. Memory Management II
- manage the scarce resource of memory
4Memory Management I
all previous MMS required
- - entire program in RAM
- - program in contiguous RAM
- - entire program to remain in RAM
5Memory Management I
A. Paged memory allocation scheme
- concept which is part of all current MMS
6Memory Management I
A. Paged memory allocation scheme
- removes the requirement that entire program must
be in contiguous RAM
7Memory Management I
A. Paged memory allocation scheme
- 1. Programs (jobs) are divided into equal-size
pages
8Memory Management I
OS
Program
Disc storage
RAM memory
9Memory Management I
2. Tradeoffs
- a. adv - doesnt require contiguous
RAMefficient memory usage
10Memory Management I
2. Tradeoffs
- b. dis - additional OS work system overhead
11Memory Management I
2. Tradeoffs
12Memory Management I
3. OS implementation
- a. Job Table
- b. Page Map Table
- c. Memory Map Table
- d. address resolution
13another classic company
14Memory Management I
B. Demand Paging MMS
15Memory Management I
B. Demand Paging MMS
- 1. only those necessary pages are loaded for
execution
16Memory Management I
B. Demand Paging MMS
- viable scheme due to locality of reference
17Memory Management I
2. Tradeoffs
18Memory Management I
2. Tradeoffs
- b. dis - additional OS work system overhead
- ex thrashing
19Memory Management I
3. OS implementation
20Systems Assignment 1
Bare Bones Code Set fso CreateObject("Scripti
ng.FileSystemObject") Set drv
fso.GetDrive(C) Wscript.Echo Total Size
drv.TotalSize vbCrLf Free Space
drv.FreeSpace
Professional Programming Practice
21Systems Assignment 1
' Gary Locklair ' CSC350 - Systems Assignment
1 ' Windows Scripting Host ' VBscript ' ' Script
will determine and display Total Size and Free
Space ' available on drive C ' ' explicitly
declare varibles with Dim ' Dim fso, drv, msg,
drvPath ' ' hardcode drive path ' drvPath
"C\" ' ' fso will be the object instance of the
FileSystemObject class ' Scripting is the "type
library" CreateObject is a method ' Set fso
CreateObject("Scripting.FileSystemObject") ' '
note the use of object.method syntax ' Set drv
fso.GetDrive(fso.GetDriveName(drvPath))
22Systems Assignment 1
' ' build up msg string for output ' msg
"Drive " UCase(drvPath) " - " msg msg
drv.VolumeName " " ' ' Note formatting not
necessary for this assignment ' msg msg
"Total Space " FormatNumber(drv.TotalSize /
1024, 0) msg msg " KB" " " msg msg
"Free Space " FormatNumber(drv.FreeSpace /
1024, 0) msg msg " KB" " " ' ' Note
output will appear in two separate, successive
windows ' Wscript.echo msg Wscript.echo "End of
Output"
23Zeb goes ice fishing