Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

17 Commits

Repository files navigation

Implementing Theory

This exercise explores key concepts in Operating Systems, with a particular focus on how a program’s structure influences the performance (of demand paging).

You should:

  • Carefully review the theoretical material.
  • Apply the appropriate modifications to the provided source code (C++ file: code/main.cpp) for better system performance. Assume that memory page length of the Operating System is 3 units.
  • Include comments in your code that clearly mention the principle applied in each change.

Optionally:

  • Fork this repository.
  • Rename source code file.
  • Create a pull request once you’ve finished implementing your changes in the repository (=adding your file to the parent repository).

The source code:

Open in GitHub Codespaces

#include<iostream>usingnamespacestd;intmain() {
// Predefined student details
string name = "Dio";
string surname = "Alex";
string student_id = "123456";
// 3x3 C-style array of marksint marks[3][3] = {
{86, 90, 78},
{88, 76, 92},
{81, 89, 84}
};
int number_of_rows = 3;
int number_of_columns = 3;
// Print student details
cout << "Name: " << name << endl;
cout << "Surname: " << surname << endl;
cout << "Student ID: " << student_id << endl;
cout << "\nMarks:" << endl;
// Print array contentsfor (int col = 0; col < number_of_columns; col++) {
for (int row = 0; row < number_of_rows; row++) {
cout << marks[row][col] << "";
}
cout << endl;
}
return0;
}

About

Theory implementation into coding for reducing page faults

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages