{"id":24332429,"url":"https://github.com/mtgsoftworks/operating-systems-project","last_synced_at":"2025-06-23T05:35:37.026Z","repository":{"id":232818462,"uuid":"779396372","full_name":"mtgsoftworks/Operating-Systems-Project","owner":"mtgsoftworks","description":"A Java-based simulation of a multi-programming system with a priority-based dispatcher, managing processes and resources efficiently through FCFS, round-robin, and feedback algorithms.","archived":false,"fork":false,"pushed_at":"2024-11-04T21:48:22.000Z","size":285,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T12:36:02.880Z","etag":null,"topics":["fcfs-process-scheduling","feedback-system","java-simulation","multi-threading","operating-system","round-robin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mtgsoftworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-29T18:35:17.000Z","updated_at":"2024-11-04T21:51:43.000Z","dependencies_parsed_at":"2025-03-11T12:41:48.135Z","dependency_job_id":null,"html_url":"https://github.com/mtgsoftworks/Operating-Systems-Project","commit_stats":null,"previous_names":["mtgsoftworks/operating-systems-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mtgsoftworks/Operating-Systems-Project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtgsoftworks%2FOperating-Systems-Project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtgsoftworks%2FOperating-Systems-Project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtgsoftworks%2FOperating-Systems-Project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtgsoftworks%2FOperating-Systems-Project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtgsoftworks","download_url":"https://codeload.github.com/mtgsoftworks/Operating-Systems-Project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtgsoftworks%2FOperating-Systems-Project/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261422628,"owners_count":23156035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fcfs-process-scheduling","feedback-system","java-simulation","multi-threading","operating-system","round-robin"],"created_at":"2025-01-18T02:19:21.017Z","updated_at":"2025-06-23T05:35:31.990Z","avatar_url":"https://github.com/mtgsoftworks.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Multi-Programming System with Priority-Based Dispatcher\n\n### Overview\nThis project simulates a multi-programming system with a four-level priority dispatcher implemented in Java. \nThe dispatcher operates under constraints of limited resources, managing multiple processes and dynamically \nprioritizing them based on a variety of factors. This system leverages several scheduling algorithms, \nresource allocation checks, and timeouts to maintain efficient process management. \nThe required JAR file for the project is located in the `dist` folder.\n\n---\n\n### Key Concepts\n\n- **Dispatcher**: Manages the allocation of CPU time and resources to processes based on priority and availability.\n- **Scheduling Algorithms**:\n  - **FCFS (First-Come-First-Serve)**\n  - **Round Robin with Quantum** (1-second time slice)\n  - **Feedback Mechanism**\n- **Process Attributes**: Each process includes `arrival time`, `priority level`, `processing time`, and other properties. \n  Processes also request specific hardware resources.\n\n---\n\n### Project Details\n\n#### 1. Sorting and Queuing of Incoming Processes\n- **Process Initialization**: Processes are read from an input file and instantiated as objects with assigned attributes.\n- **Queue Assignment**: Incoming processes are placed into four priority queues according to their priority levels.\n- **Sorting**: Processes are sorted based on `ArrivalTime` to avoid repeated searches. The sorting algorithm uses the \n  **Selection Short** method based on `ArrivalTime`.\n\n#### 2. Dispatcher Operation\n- **Zero Priority Handling**: The dispatcher starts with zero-priority processes. If all requested resources are available, \n  the process executes following the **FCFS** algorithm within memory constraints (64 MB for real-time, 960 MB for others).\n- **Resource Management**: Resources are allocated and released via `get_Resource()` and `release_Resource()` functions.\n- **Feedback Mechanism**: Non-zero priority processes execute for one second, then have their priority reduced and are \n  suspended. Suspended processes wait in a separate queue.\n- **Timeout Handling**: `timeOutCheck` removes processes exceeding a 20-second wait, releasing resources and logging \n  a timeout message.\n\n#### 3. Improvements and Considerations\n- **Sorting Efficiency**: The sorting algorithm could be optimized for better performance.\n- **Level Adaptation**: The dispatcher currently supports four levels; higher levels would require additional code.\n- **Resource Management**: Automating the `get_Resource()` and `release_Resource()` functions could simplify resource handling.\n\n#### 4. Process Class\n- **Process Object Creation**: Each process read from the input file is instantiated from a custom Process class.\n- **Execution**: The `execute` function of each process object runs a JAR file via `Runtime.exec()`, displaying process \n  information on the console.\n- **Colored Output**: Using the `ColoredSystemOutPrintLn` class, ANSI escape codes are applied to process messages, \n  displaying them in different colors.\n\n#### 5. Dispatcher Comparison\n- **Dispatcher Role**: Manages CPU usage, places processes, and adjusts user mode as needed.\n- **CPU Access Control**: Processes access the CPU based on priority and available resources.\n- **Priority Handling**: Higher priority processes can suspend lower priority ones. Processes exceeding a 20-second wait are timed out.\n---\n\n### Required JAR File\nThe JAR file for this project can be found in the `dist` directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtgsoftworks%2Foperating-systems-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtgsoftworks%2Foperating-systems-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtgsoftworks%2Foperating-systems-project/lists"}