CS3530 Assigment 8

Kennesaw State University   


Department of Computer Science
Operating Systems CS3530/01
Assignment # 8 / Dynamic Page Replacement




Dalibor Labudovic



07/24/12013









Initial Problem Statement:
Study of Performance with dynamic page replacement in Virtual Memory Management, using the Working Set algorithm.


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

The simulation model for this assignment is implemented in C++ using Psim3 package:
"wspgrep.cpp". This model uses the Working Set technique.

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

Run the program at least three times.
Write a report describing the characteristics of the page replacement technique modeled.

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?


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?



Table of results:
RUN 1
Total number of page faults: 198
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.66

RUN 2
Total number of page faults: 193
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.643333

RUN 3                       
Total number of page faults: 206
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.686667
Modified RUN

Total number of page faults: 190
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.633333


Comments and Conclusion:
In conclusion, I have learned more about the dynamic virtual memory management. I can now understand why almost all OS have adapted this techniques to better utilize the physical memory. Dynamic behavior of the memory makes memory management for better results and an instinctive interconnection between physical memory and virtual memory. Dynamic memory performance adjust based on resource demand and not on a static behavior and this gives dynamic memory a better memory utilization.

Questions and Answers:
 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 virtual memory management aspect of an operating system.
* What performance measures does the model compute?
This model performance measure the page faults in a page references sequence.
* What is noticeable in the dynamic behavior shown in the model?
It is for most part very static but they dynamic behavior doesn’t appear obvious until the parameter change occurs. Even I changed the parameter the simulation is fair consistent. This result indicates the simulation is running under a dynamic principle memory management part of the system will adjust accordingly for optimization.

Change the average and standard deviation for the normal distribution, and compare results.
 * What changes in the results do you notice? 
Under the change the results were minimum but from previous runs compared to the run with changes. The run with modification has displayed the least number of page faults.
 * What other performance measures can this model compute?
I see other performance measurement using this model to compute a more optimized dynamic virtual memory management with proportion page faults to page referenced aspect of the results.


Script:
Script started on Wed 24 Jul 2013 11:51:13 AM EDT
[dlabudov@cs3 dlabudov]$ exit####./a.out | tee optpgrep.txt########################psim3c optpgrep.cpp#[K###################a.out | tee optpgrep.txt########################psim3c optpgrep.cpp#[K###################a.out | tee lrupgrep.txt########################psim3c lrupgrep.cpp#[K###################a.out | tee lrupgrep.txt########################psim3c optpgrep.cpp#[K######[C#.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K####w.cpp####s.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 wspgrep.cpp####################exit#[K####./a.out | tee optpgrep.txt#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K####w.txt####s.txt####p.txt####g.txt####r.txt####e.txt####p.txt####
Psim3 project: Working Set Algorithm
Simulation date: Wed Jul 24 11:51:46 2013


Constructor generator, cvar: 0.55 20 11
Page referenced: 26

Decreasing frame allocation by 1

Total number of page faults: 198
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.66

--------------------------------------------------
 End of simulation Working Set Algorithm Wed Jul 24 11:51:46 2013


[dlabudov@cs3 dlabudov]$ ./a.out | tee wspgrep.txt#######################psim3c wspgrep.cpp#[K
#[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 wspgrep.cpp##################a.out | tee wspgrep.txt####2.txt####
Psim3 project: Working Set Algorithm
Simulation date: Wed Jul 24 11:51:57 2013


Constructor generator, cvar: 0.55 20 11
Page referenced: 28

Frame allocation after ref page 16 is: 13 frames

Total number of page faults: 193
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.643333

--------------------------------------------------
 End of simulation Working Set Algorithm Wed Jul 24 11:51:57 2013


[dlabudov@cs3 dlabudov]$ ./a.out | tee wspgrep2.txt########################psim3c wspgrep.cpp#[K
#[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 wspgrep.cpp##################a.out | tee wspgrep2.txt#####.txt#[K####3.txt####
Psim3 project: Working Set Algorithm
Simulation date: Wed Jul 24 11:52:06 2013


Constructor generator, cvar: 0.55 20 11
Page referenced: 29


Total number of page faults: 206
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.686667

--------------------------------------------------
 End of simulation Working Set Algorithm Wed Jul 24 11:52:06 2013


-------------------------------------------------------------------------------
------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
a.out created.
                 
[dlabudov@cs3 dlabudov]$ ./psim3c wspgrep.cpp####################nano wspgrep.cpp#[K################./a.out | tee wspgrep3.txt######[C#.txt#[K####4.txt####
Psim3 project: Working Set Algorithm
Simulation date: Wed Jul 24 11:53:10 2013


Constructor generator, cvar: 0.55 30 16

Frame allocation after ref page 24 is: 12 frames

Total number of page faults: 190
Total number of page references: 300
Proportion of pg faults to pg refs.: 0.633333

--------------------------------------------------
 End of simulation Working Set Algorithm Wed Jul 24 11:53:10 2013


[dlabudov@cs3 dlabudov]$ exit
exit

Script done on Wed 24 Jul 2013 11:53:15 AM EDT

Popular posts from this blog

CS3401 Practice Quiz 2 Part 2

CS3401 Practice Quiz 2 Part 1