CS 3530 Assignment 7

Kennesaw State University   


Department of Computer Science
Operating Systems CS3530/01
Assignment # 7 / Virtual Memory Managment




Dalibor Labudovic



07/24/12013









Initial Problem Statement:
Study of static page replacement in Virtual Memory Management.


Observation of general behavior of a system with page replacement. Computation of some
 relevant performance metrics. 

The simulation models for this assignment are implemented in the C++ programs:
"fifopgrep.cpp", "lrupgrep.cpp", and "optpgrep.cpp".
These models apply the FIFO, LRU, and Optimal techniques.

Copy the source files from the system directory on CS3 (follow instructions on the Web), then compile, and link.
Run the programs.

Write a report describing the characteristics of the page replacement techniques modeled.
Run the simulation models.
Change the average and standard deviation for the normal distribution, and compare results.
 * What changes in the results do you notice? 
 * What other performance measures can this model compute?

Use the usual guidelines for structuring the report. Include at the end of the report your answers to the following questions.
* What aspect of an operating system is the model representing?
* What performance measures does the model compute?
* What is noticeable in the dynamic behavior shown in the model?


Table of results:
FIFOPGREP.CPP
FIFO - Total page faults: 211
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.703333
Increased mean_pg 30
FIFO - Total page faults: 187
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.623333



LRUPGREP.CPP

LRU - Total page faults: 197
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.656667

Decrased mean_gp to 10

LRU - Total page faults: 124
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.413333


OPTPGREP.CPP
Optimal - Total page faults: 121
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.403333
Increased mean_pg to 40
Optimal - Total page faults: 116
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.386667


Comments and Conclusion:
In conclusion, the experience with these three models, I have learned more about the page references and the inner workings of physical and virtual memory management. The purpose of virtual memory was unclear to me until this assignment. Now I understand that virtual memory is partition of the disk to compensate for overflow from the physical memory. The virtual memory management part of the OS uses different techniques to utilize more of physical memory and predict what page reference are to be used in the future in order to keep page references in the physical memory. Based on human logic, future predictions are not optimized and therefore page faults will occur until a better algorithm are invented.

Questions and Answers:
Change the average and standard deviation for the normal distribution, and compare results.
 * What changes in the results do you notice?
The first simulation FIFO, I had increased the parameter mean_pg from 20 to 30 and as a result the  page fault has fallen by 24. The second simulation LRU, I decreased the parameter mean_pg from 20 to 10 and as a result the page fault has fallen by 74. The last simulation OPT, I increased the parameter mean_pg from 20 to 40 and as a result the apge fault has fallen by 5.

 * What other performance measures can this model compute?
This model can compute the speed of the physical memory indirectly, this is done with minimizing page faults. If the page faults are low, the outcome is a faster memory response. Another measurement is the proportion of page faults to pg reference and the lower proportion the better performance results.



Use the usual guidelines for structuring the report. Include at the end of the report your answers to the following questions.
* What aspect of an operating system is the model representing?
This model represents the memory management and virtual memory part of the operating system.

* What performance measures does the model compute?
This model compute measures throughput performance of the physical and virtual memory.

* What is noticeable in the dynamic behavior shown in the model?
The noticeable dynamic behavior of the model is the mean_pg parameter affected each simulation differently. FIFO simulation sees lower page faults with an dramatic increase that parameter . LRU simulation is very different, page faults are lower when the mean_pg parameter is decreased. Once I deceased it by 10, the page faults results were by far the most dramatic. Lastly, OPT simulation model showed the least progress, less page faults, with the most adjustment to the mean-pg parameter value.


Script:
Script started on Wed 24 Jul 2013 09:47:21 AM EDT
dlabudov@cs3 dlabudov]$ ./psim3c fifopgrep.cpp
-------------------------------------------------------------------------------
------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
a.out created.
                 
[dlabudov@cs3 dlabudov]$ ./a.out
Psim3 project: FIFO Page Replacement Algorithm
Simulation date: Wed Jul 24 09:47:48 2013




FIFO - Total page faults: 211
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.703333

--------------------------------------------------
 End of simulation FIFO Page Replacement Algorithm Wed Jul 24 09:47:48 2013


[dlabudov@cs3 dlabudov]$ ./a.out | tee fifopgrep.txt
Psim3 project: FIFO Page Replacement Algorithm
Simulation date: Wed Jul 24 09:48:03 2013




FIFO - Total page faults: 211
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.703333

--------------------------------------------------
 End of simulation FIFO Page Replacement Algorithm Wed Jul 24 09:48:03 2013


[dlabudov@cs3 dlabudov]$ ./a.out | tee fifopgrep.txt####################[K######psim3c fifopgrep.cpp#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K####l.cpp####r.cpp####u.cpp####p.cpp####g.cpp####r.cpp####e.cpp####p.cpp####
#[H#[J#[H#[J-------------------------------------------------------------------------------
------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
a.out created.
                 
[dlabudov@cs3 dlabudov]$ ./psim3c lrupgrep.cpp###################a.out | tee fifopgrep.txt#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K####l.txt####r.txt####u.txt####p.txt####g.txt####r.txt####e.txt####p.txt####
Psim3 project: LRU Page Replacement Algorithm
Simulation date: Wed Jul 24 09:48:40 2013




LRU - Total page faults: 197
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.656667

--------------------------------------------------
 End of simulation LRU Page Replacement Algorithm Wed Jul 24 09:48:40 2013


[dlabudov@cs3 dlabudov]$ ./a.out | tee lrupgrep.txt########################psim3c lrupgrep.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K####o.cpp####p.cpp####t.cpp####p.cpp####g.cpp####r.cpp####e.cpp####p.cpp####
#[H#[J#[H#[J-------------------------------------------------------------------------------
------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
a.out created.
                 
[dlabudov@cs3 dlabudov]$ ./psim3c optpgrep.cpp###################a.out | tee lrupgrep.txt#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K####o.txt####p.txt####t.txt####p.txt####g.txt####r.txt####e.txt####p.txt####
Psim3 project: Optimal Page Replacement Algorithm
Simulation date: Wed Jul 24 09:49:04 2013




Optimal - Total page faults: 121
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.403333

--------------------------------------------------
 End of simulation Optimal Page Replacement Algorithm Wed Jul 24 09:49:04 2013


[dlabudov@cs3 dlabudov]$ exit
exit

Script done on Wed 24 Jul 2013 09:49:08 AM EDT

Popular posts from this blog

CS3401 Practice Quiz 2 Part 2

CS3401 Practice Quiz 2 Part 1