230 likes | 414 Views
Memory Management I. Written Assignment 2 due Systems Assignment 1 returned Systems Assignment 2 due next time. Memory Management I. Memory Management I. III. Memory Management II. manage the scarce resource of memory. Memory Management I. all previous MMS required.
E N D
Memory Management I Written Assignment 2 due Systems Assignment 1 returned Systems Assignment 2 due next time
Memory Management I III. Memory Management II • manage the scarce resource of memory
Memory Management I all previous MMS required • - entire program in RAM • - program in contiguous RAM • - entire program to remain in RAM
Memory Management I A. Paged memory allocation scheme • concept which is part of all current MMS
Memory Management I A. Paged memory allocation scheme • removes the requirement that entire program must be in contiguous RAM
Memory Management I A. Paged memory allocation scheme • 1. Programs (jobs) are divided into equal-size pages
Memory Management I OS Program Disc storage RAM memory
Memory Management I 2. Tradeoffs • a. adv - doesn’t require contiguous RAMefficient memory usage
Memory Management I 2. Tradeoffs • b. dis - additional OS work = system overhead
Memory Management I 2. Tradeoffs • OS needs a PMTfig 3.1
Memory Management I 3. OS implementation a. Job Table b. Page Map Table c. Memory Map Table d. address resolution
Memory Management I B. Demand Paging MMS • first virtual memory MMS
Memory Management I B. Demand Paging MMS • 1. only those “necessary” pages are loaded for execution
Memory Management I B. Demand Paging MMS • viable scheme due to “locality of reference”
Memory Management I 2. Tradeoffs • a. adv - virtual memory
Memory Management I 2. Tradeoffs • b. dis - additional OS work = system overhead • ex: thrashing
Memory Management I 3. OS implementation a. expanded PMT
Systems Assignment 1 “Bare Bones Code” Set fso = CreateObject("Scripting.FileSystemObject") Set drv = fso.GetDrive(“C:”) Wscript.Echo “Total Size = “ & drv.TotalSize & vbCrLf & “Free Space = “ & drv.FreeSpace “Professional Programming Practice”
Systems 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))
Systems 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"