An open API service indexing awesome lists of open source software.

https://github.com/zwldarren/prmanager


https://github.com/zwldarren/prmanager

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# P1: Process and Resource Management

This project develops a simple process and resource manager.

## Getting Started

### Usage

To run the project:
```bash
./PRManager --input --output
```

### Building from Source

If you prefer to build from source, follow these steps:

```bash
cmake . -B build
cmake --build build
```

## Command Reference

The following commands are used for input:

| Command | Description |
| ------------- | ------------- |
|in \ \ \ \ \ |Restore the system to its initial state, with n priority levels and resources 0-3 having \, \, \, \ units respectively|
|id |Equivalent to "in 3 1 1 2 3"|
|cr \

| Create a new process at priority level \

. \

can be 1 or 2.|
| de \ | Destroy the process identified by the PCB index \, and all of its descendants |
| rq \ \ | Request \ units of resource \|
| rl \ \ | Release \ units of resource \. \ can be 0, 1, 2, or 3 |
| to | Invoke the timeout function |

For each input command, output the index of the process running next, as a single integer separated by a space.
If an error occurs, output -1.
A new line starts for each in or id command.