Skip to content

Commit

Permalink
Add sections to README.md and algorithm-specific markdown files
Browse files Browse the repository at this point in the history
* **README.md**
  - Add sections: "What is this project all about?", "How is this project made?", "What makes this project the best?", "How is it better?", "What new technology has been used?", "How to run this project?", and "Contribution guidelines".

* **Bankers Algorithm/bankersAlgo.md**
  - Add sections: "How to run this project?" and "Contribution guidelines".

* **FCFS/process_scheduling.md**
  - Add sections: "How to run this project?" and "Contribution guidelines".

* **Inter process Communication – Semaphore/Producer-Consumer Problem/producer_consumer.md**
  - Add sections: "How to run this project?" and "Contribution guidelines".

* **Inter process Communication – Semaphore/Semaphore/semaphore.md**
  - Add sections: "How to run this project?" and "Contribution guidelines".

* **priority_scheduler/priority_scheduler.md**
  - Add sections: "How to run this project?" and "Contribution guidelines".

* **Resource Allocation Graph/rag.md**
  - Add sections: "How to run this project?" and "Contribution guidelines".

* **round_robin_scheduler/round_robin_scheduler.md**
  - Add sections: "How to run this project?" and "Contribution guidelines".

* **Shortest Job First/sjf.md**
  - Add sections: "How to run this project?" and "Contribution guidelines".
  • Loading branch information
Pulkit1822 committed Nov 10, 2024
1 parent cb52c63 commit 4b74b91
Show file tree
Hide file tree
Showing 9 changed files with 141 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Bankers Algorithm/bankersAlgo.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,17 @@ ___
- If the system is in a safe state, print the safe sequence of processes.
- If the system is not in a safe state, print that the system is not safe.
___

## How to run this project?
To run the Banker's Algorithm project, follow these steps:
1. Clone the repository to your local machine using `git clone https://github.com/Pulkit1822/CSE3003-Operating-System.git`.
2. Navigate to the `Bankers Algorithm` directory.
3. Compile the code using a C++ compiler. For example, you can use `g++ bankersAlgo.cpp -o bankersAlgo`.
4. Run the compiled program using `./bankersAlgo`.
5. Follow the on-screen instructions to input the number of processes, number of resources, allocation matrix, max matrix, and available resources.

## Contribution guidelines
Contributions to this project are welcome. If you would like to contribute:
1. Fork the repository and create your branch from `main`.
2. Ensure any new code is well-documented and follows the established coding style.
3. Create a pull request with a clear description of your changes and their rationale.
14 changes: 14 additions & 0 deletions FCFS/process_scheduling.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,17 @@ ___
- Average Waiting Time: the average waiting time for all processes
- Average Turnaround Time: the average turnaround time for all processes
___

## How to run this project?
To run the FCFS scheduling algorithm project, follow these steps:
1. Clone the repository to your local machine using `git clone https://github.com/Pulkit1822/CSE3003-Operating-System.git`.
2. Navigate to the `FCFS` directory.
3. Compile the code using a C++ compiler. For example, you can use `g++ process_scheduling.cpp -o process_scheduling`.
4. Run the compiled program using `./process_scheduling`.
5. Follow the on-screen instructions to input the number of processes and their burst times.

## Contribution guidelines
Contributions to this project are welcome. If you would like to contribute:
1. Fork the repository and create your branch from `main`.
2. Ensure any new code is well-documented and follows the established coding style.
3. Create a pull request with a clear description of your changes and their rationale.
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,17 @@ ___
- The producer process prints the items it produces.
- The consumer process prints the items it consumes.
___

## How to run this project?
To run the producer-consumer problem project, follow these steps:
1. Clone the repository to your local machine using `git clone https://github.com/Pulkit1822/CSE3003-Operating-System.git`.
2. Navigate to the `Inter process Communication – Semaphore/Producer-Consumer Problem` directory.
3. Compile the code using a C++ compiler. For example, you can use `g++ producer_consumer.cpp -o producer_consumer`.
4. Run the compiled program using `./producer_consumer`.
5. Follow the on-screen instructions to observe the producer and consumer processes in action.

## Contribution guidelines
Contributions to this project are welcome. If you would like to contribute:
1. Fork the repository and create your branch from `main`.
2. Ensure any new code is well-documented and follows the established coding style.
3. Create a pull request with a clear description of your changes and their rationale.
14 changes: 14 additions & 0 deletions Inter process Communication – Semaphore/Semaphore/semaphore.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,17 @@ ___
- The producer process prints the items it produces.
- The consumer process prints the items it consumes.
___

## How to run this project?
To run the semaphore example project, follow these steps:
1. Clone the repository to your local machine using `git clone https://github.com/Pulkit1822/CSE3003-Operating-System.git`.
2. Navigate to the `Inter process Communication – Semaphore/Semaphore` directory.
3. Compile the code using a C++ compiler. For example, you can use `g++ semaphore.cpp -o semaphore`.
4. Run the compiled program using `./semaphore`.
5. Follow the on-screen instructions to observe the producer and consumer processes in action.

## Contribution guidelines
Contributions to this project are welcome. If you would like to contribute:
1. Fork the repository and create your branch from `main`.
2. Ensure any new code is well-documented and follows the established coding style.
3. Create a pull request with a clear description of your changes and their rationale.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,34 @@

Welcome to the CSE3003 - Operating System Repository! This repository contains implementations of various OS algorithms in C++. Whether you're a student studying OS or a developer looking to understand these algorithms better, this repository aims to provide clear and concise implementations along with explanations to aid your learning.

## What is this project all about?
This project is a comprehensive collection of various Operating System (OS) algorithms implemented in C++. It aims to provide a clear understanding of these algorithms through well-documented code and explanations. The repository is designed to be a valuable resource for students, developers, and anyone interested in learning about OS algorithms.

## How is this project made?
This project is made using C++ programming language. Each algorithm is implemented in its own directory with a corresponding README file that explains the algorithm's logic and how to use the implementation. The project uses standard C++ libraries and follows best practices for coding and documentation.

## What makes this project the best?
This project stands out due to its comprehensive coverage of various OS algorithms, clear and concise code implementations, and detailed explanations. Each algorithm is implemented in a way that is easy to understand and follow, making it an excellent learning resource. The project also includes example usage and code analysis sections for each algorithm, providing a deeper understanding of how the algorithms work.

## How is it better?
Compared to similar projects, this repository offers a more detailed and structured approach to learning OS algorithms. The code is well-documented, and each algorithm is accompanied by a README file that explains the logic and usage. This makes it easier for users to understand and experiment with the algorithms. Additionally, the project covers a wide range of OS algorithms, providing a comprehensive learning resource.

## What new technology has been used?
This project leverages the C++ programming language and standard libraries to implement the OS algorithms. It also uses modern C++ features and best practices to ensure the code is efficient, readable, and maintainable. The project is designed to be easily extensible, allowing users to add new algorithms or modify existing ones.

## How to run this project?
To run this project, follow these steps:
1. Clone the repository to your local machine using `git clone https://github.com/Pulkit1822/CSE3003-Operating-System.git`.
2. Navigate to the directory of the algorithm you want to run.
3. Follow the instructions provided in the README file of the respective algorithm to compile and run the code.
4. Experiment with different inputs and configurations to observe the behavior of the algorithm.

## Contribution guidelines
Contributions to this repository are welcome and encouraged. If you would like to contribute:
1. Fork the repository and create your branch from `main`.
2. Ensure any new code is well-documented and follows the established coding style.
3. Create a pull request with a clear description of your changes and their rationale.

## Algorithms Implemented

1. **[Round Robin Scheduler](https://github.com/Pulkit1822/CSE3003-Operating_System/tree/main/round_robin_scheduler)**: This algorithm is a preemptive scheduler where each process is assigned a fixed time slice or quantum. Once a process consumes its quantum, it's moved to the back of the ready queue to await its turn again. This implementation demonstrates how round-robin scheduling can be achieved efficiently in C++.
Expand Down Expand Up @@ -62,4 +90,4 @@ Happy learning and coding!

If you find this repository useful, don't forget to star it! ⭐️

### Written by [Pulkit](https://github.com/Pulkit1822)
### Written by [Pulkit](https://github.com/Pulkit1822)
14 changes: 14 additions & 0 deletions Resource Allocation Graph/rag.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,17 @@ ___
### Outputs
- `countOfCollisions`: an integer representing the number of collisions between the resource to check and the resources in the matrix.
___
## How to run this project?
To run the resource allocation graph example project, follow these steps:
1. Clone the repository to your local machine using `git clone https://github.com/Pulkit1822/CSE3003-Operating-System.git`.
2. Navigate to the `Resource Allocation Graph` directory.
3. Compile the code using a C++ compiler. For example, you can use `g++ rag.cpp -o rag`.
4. Run the compiled program using `./rag`.
5. Follow the on-screen instructions to input the number of processes, process numbers, resource matrix dimensions, resources, and the resource to check for collisions.
## Contribution guidelines
Contributions to this project are welcome. If you would like to contribute:
1. Fork the repository and create your branch from `main`.
2. Ensure any new code is well-documented and follows the established coding style.
3. Create a pull request with a clear description of your changes and their rationale.
14 changes: 14 additions & 0 deletions Shortest Job First/sjf.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,17 @@ ___
- Process details: process id, burst time, waiting time, and turnaround time for each process.
- Average waiting time and average turnaround time.
___

## How to run this project?
To run the SJF scheduling algorithm project, follow these steps:
1. Clone the repository to your local machine using `git clone https://github.com/Pulkit1822/CSE3003-Operating-System.git`.
2. Navigate to the `Shortest Job First` directory.
3. Compile the code using a C++ compiler. For example, you can use `g++ sjf.cpp -o sjf`.
4. Run the compiled program using `./sjf`.
5. Follow the on-screen instructions to input the number of processes and their burst times.

## Contribution guidelines
Contributions to this project are welcome. If you would like to contribute:
1. Fork the repository and create your branch from `main`.
2. Ensure any new code is well-documented and follows the established coding style.
3. Create a pull request with a clear description of your changes and their rationale.
14 changes: 14 additions & 0 deletions priority_scheduler/priority_scheduler.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,17 @@ ___
- Process ID, burst time, waiting time, and turnaround time for each process.
- Average waiting time and average turnaround time.
___

## How to run this project?
To run the priority scheduler project, follow these steps:
1. Clone the repository to your local machine using `git clone https://github.com/Pulkit1822/CSE3003-Operating-System.git`.
2. Navigate to the `priority_scheduler` directory.
3. Compile the code using a C++ compiler. For example, you can use `g++ priority_scheduler.cpp -o priority_scheduler`.
4. Run the compiled program using `./priority_scheduler`.
5. Follow the on-screen instructions to input the number of processes, burst times, and priorities.

## Contribution guidelines
Contributions to this project are welcome. If you would like to contribute:
1. Fork the repository and create your branch from `main`.
2. Ensure any new code is well-documented and follows the established coding style.
3. Create a pull request with a clear description of your changes and their rationale.
14 changes: 14 additions & 0 deletions round_robin_scheduler/round_robin_scheduler.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,17 @@ ___
- The average waiting time for the set of processes.
- The details of each process, including its burst time, waiting time, and turnaround time.
___

## How to run this project?
To run the round-robin scheduler project, follow these steps:
1. Clone the repository to your local machine using `git clone https://github.com/Pulkit1822/CSE3003-Operating-System.git`.
2. Navigate to the `round_robin_scheduler` directory.
3. Compile the code using a C++ compiler. For example, you can use `g++ round_robin_scheduler.cpp -o round_robin_scheduler`.
4. Run the compiled program using `./round_robin_scheduler`.
5. Follow the on-screen instructions to input the number of processes, burst times, and time slice.

## Contribution guidelines
Contributions to this project are welcome. If you would like to contribute:
1. Fork the repository and create your branch from `main`.
2. Ensure any new code is well-documented and follows the established coding style.
3. Create a pull request with a clear description of your changes and their rationale.

0 comments on commit 4b74b91

Please sign in to comment.