Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Project 6 - CS4760
## by Tony Urschler
## December 6, 2021
## VERSION CONTROL: https://comp.umsl.edu/gitlab/teudmk/urschler.6
## You should have permission to view my entire repository on GitLab
## Contents of the Project Folder
- oss: this is the main executable for the simulator to showcase memory allocation
- oss.c: .c file for the executable
- oss.h: .h file for oss
- user: this is the executable that the child processes (which oss forks) will run
- user.c: .c file for the executable
- config.h: contains various configurables for the project like maximum processes and time
- Makefile: used to clean and compile the code
- lib_queue.a: static library that implements a queue to store waiting procs
- lib_queue.c: .c file for static library
- lib_queue.h: .h fild for static library
## How to compile and run the code
- Run the command `make clean`
- Run the command `make`
- Run the executable `oss`
- `./oss [-h] [-p n] [-v]`
- `-h` displays the usage statement
- `-p n` allows the user to choose how many processes will run
- `-v` enables verbose
## Logging
If verbose is not set, oss will log when a swap has taken place, when a child is created,
when a child terminates, and the memory map every logical second. If the verbose option
is chosen, then oss will log every memory request. This is chosen by using the `-v` option.
## Performance of Algorithm
The additional-reference-bits page replacement algorithm appears to be doing a fairly
good job at keeping the amount of page faults low. After running the program 10 times, I
found there was on average .183 page faults per memory request. Meaning that only about
18% of all memory requests result in a page fault. This is quite a low rate, which is why
the average memory access speed is quite good with an average of 2.5ms per memory access.
** No known errors