Skip to content

softwareDesign24/structurePerformance

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>

using namespace std;


int main() {
    // Predefined student details
    string name = "Dio";
    string surname = "Alex";
    string student_id = "123456";

    // 3x3 C-style array of marks
    int 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 contents
    for (int col = 0; col < number_of_columns; col++) {
        for (int row = 0; row < number_of_rows; row++) {
            cout << marks[row][col] << " ";
        }
        cout << endl;
    }


    return 0;
}

About

Theory implementation into coding for reducing page faults

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages