39
39
(8) How to use fgets() function: https://stackoverflow.com/a/19609987
40
40
41
41
COMPILE AND PROGRAM EXECUTION COMMANDS:
42
- (1) Compiled using clang compiler: $ clang -o vm_sim vm_sim.c vmtypes.c
42
+ (1) Compiled and tested using clang compiler: $ clang -o vm_sim vm_sim.c vmtypes.c
43
43
(2) Executed program with command: $ ./vm_sim InputFile.txt
44
+ (3) Compiled and tested using gcc: $ gcc -o vm_sim vm_sim.c vmtypes.c
45
+ (4) Created Makefile with gcc as Constant
44
46
45
47
*/
46
48
@@ -164,7 +166,7 @@ int main(int argc, char *argv[])
164
166
translationCount ++ ; // increment the number of translated addresses
165
167
}
166
168
167
- printf ("\n-------------------------------------------------------------------\n" );
169
+ printf ("\n--------------------------------------------------------------------------- \n" );
168
170
// calculate and print out the stats
169
171
printf ("\nNumber of translated addresses = %d\n" , translationCount );
170
172
double pfRate = (double )pageTable -> pageFaultCount / (double )translationCount ;
@@ -174,7 +176,7 @@ int main(int argc, char *argv[])
174
176
printf ("Page Fault Rate = %.3f %%\n" ,pfRate * 100 );
175
177
printf ("TLB Hits = %d\n" , tlbTable -> tlbHitCount );
176
178
printf ("TLB Hit Rate = %.3f %%\n" , TLBRate * 100 );
177
- printf ("\n-------------------------------------------------------------------\n" );
179
+ printf ("\n--------------------------------------------------------------------------- \n" );
178
180
179
181
// close the input file and backing store
180
182
fclose (address_file );
0 commit comments