{"id":26451064,"url":"https://github.com/parth1899/operating-system-simulation","last_synced_at":"2025-03-18T16:31:31.824Z","repository":{"id":217896616,"uuid":"745066831","full_name":"parth1899/Operating-System-Simulation","owner":"parth1899","description":"A virtual machine that compiles and executes multi-programming jobs with paging-based memory management, virtual memory allocation, job scheduling, and error handling. Supports machine-level instructions like GD, PD, CR, SR, LR, and BT. ","archived":false,"fork":false,"pushed_at":"2025-02-26T21:51:53.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T22:30:25.648Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parth1899.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-18T15:23:14.000Z","updated_at":"2025-02-26T21:55:03.000Z","dependencies_parsed_at":"2024-01-18T18:46:33.545Z","dependency_job_id":null,"html_url":"https://github.com/parth1899/Operating-System-Simulation","commit_stats":null,"previous_names":["parth1899/operating-system-simulation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parth1899%2FOperating-System-Simulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parth1899%2FOperating-System-Simulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parth1899%2FOperating-System-Simulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parth1899%2FOperating-System-Simulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parth1899","download_url":"https://codeload.github.com/parth1899/Operating-System-Simulation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244259962,"owners_count":20424648,"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":[],"created_at":"2025-03-18T16:31:30.030Z","updated_at":"2025-03-18T16:31:31.818Z","avatar_url":"https://github.com/parth1899.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Operating System Simulation\n\n## Overview\nThis project is a simulation of an operating system that creates a virtual machine capable of compiling and executing various multi-programming jobs. It implements concepts such as:\n- **Paging** for memory management\n- **Virtual Memory** allocation\n- **Error Handling** for various execution scenarios\n\n## Features\n- **Job Scheduling**: Supports multiple jobs and manages execution efficiently.\n- **Memory Management**: Implements paging and virtual memory.\n- **Error Handling**: Detects and reports errors like opcode errors, operand errors, invalid page faults, time limit exceeded, and line limit exceeded.\n- **File Handling**: Reads input jobs from a file (`input.txt`) and writes output to `output.txt`.\n- **Instruction Execution**: Supports a set of machine-level instructions like `GD`, `PD`, `CR`, `SR`, `LR`, and `BT`.\n\n## How It Works\n1. **Job Initialization**:\n   - Reads input jobs from `input.txt`\n   - Allocates memory pages\n   - Sets up job control blocks\n2. **Execution Cycle**:\n   - Fetches and decodes instructions\n   - Executes operations (Read, Write, Load, Store, Compare, Branch, Halt)\n   - Handles page faults dynamically\n3. **Termination \u0026 Logging**:\n   - Detects errors and terminates jobs accordingly\n   - Logs execution details to `output.txt`\n\n### Input File Format (`input.txt`)\nThe input file should contain job instructions following this format:\n```\n$AMJ \u003cJob ID\u003e \u003cTTL\u003e \u003cTLL\u003e\n\u003cJob Instructions\u003e\n$DTA\n\u003cData Section\u003e\n$END\n```\n\n### Output File (`output.txt`)\nAfter execution, results and error logs will be written to `output.txt`.\n\n## Error Codes \u0026 Handling\n| Error Code | Description |\n|------------|-------------|\n| 0 | No Error – Normal termination |\n| 1 | Out of Data Error |\n| 2 | Line Limit Exceeded |\n| 3 | Time Limit Exceeded |\n| 4 | Opcode Error |\n| 5 | Operand Error |\n| 6 | Invalid Page Fault |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparth1899%2Foperating-system-simulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparth1899%2Foperating-system-simulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparth1899%2Foperating-system-simulation/lists"}