{"id":20354932,"url":"https://github.com/grayhatdevelopers/5-state-process-model-simulator","last_synced_at":"2026-05-11T09:53:33.210Z","repository":{"id":117960424,"uuid":"256742122","full_name":"grayhatdevelopers/5-state-process-model-simulator","owner":"grayhatdevelopers","description":"A basic 5 State Model Simulator for students, built using pipes, threads and shared memory.","archived":false,"fork":false,"pushed_at":"2020-04-18T18:20:50.000Z","size":765,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T17:35:19.142Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/grayhatdevelopers.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-18T11:58:14.000Z","updated_at":"2024-03-19T19:39:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"3a5b00ff-7db7-4647-849d-180effe9650c","html_url":"https://github.com/grayhatdevelopers/5-state-process-model-simulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grayhatdevelopers/5-state-process-model-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grayhatdevelopers%2F5-state-process-model-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grayhatdevelopers%2F5-state-process-model-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grayhatdevelopers%2F5-state-process-model-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grayhatdevelopers%2F5-state-process-model-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grayhatdevelopers","download_url":"https://codeload.github.com/grayhatdevelopers/5-state-process-model-simulator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grayhatdevelopers%2F5-state-process-model-simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32889971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-11-14T23:10:28.771Z","updated_at":"2026-05-11T09:53:33.202Z","avatar_url":"https://github.com/grayhatdevelopers.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n## Welcome to Saad's Five State Process Model simulator!\nIn a multitasking computer system, processes may occupy a variety of states. These distinct states \nmay not be recognized as such by the operating system kernel. However, they are a useful abstraction \nfor the understanding of processes. The 5 state process model is a basic visualization which handles such \nprocesses coming in from the memory, using the following states:\n\n        1-   New: A process has been created but has not yet been admitted to the pool of executable processes.\n        2-   Ready: Processes that are prepared to run if given an opportunity. That is, they are not waiting on anything except the CPU availability.\n        3-   Running: The process that is currently being executed. (Assume single processor for simplicity.)\n        4-   Blocked: A process that cannot execute until a specified event such as an IO completion occurs.\n        5-   Exit: A process that has been released by OS either after normal termination or after abnormal termination (error).\n\n        (source: https://cse.buffalo.edu/~bina/cse421/spring00/lec3/tsld008.htm)\n\nThis program comes with an integrated terminal called \"mard\". Mard is loaded with a default command, kill,\nwhich can be used to terminate programs running haywire (like the States you'll see soon). You can also use \nLinux/UNIX system calls by prefixing \"system\" before them, for example:\n\n\u003e ls -l\n\nwould become\n    \n\u003e system ls -l\n\n\n## HOW TO BUILD:\n_(assuming you've opened a terminal in this folder)_\n-   cd bin\n-   g++ New.cpp -lrt -o New \u0026\u0026 g++ Ready.cpp -pthread -lrt -o Ready \u0026\u0026 g++ Running.cpp -lrt -o Running \u0026\u0026 g++ Blocked.cpp -pthread -lrt -o Blocked \u0026\u0026 g++ Exit.cpp -lrt -o Exit \u0026\u0026 g++ kill.cpp -o kill \u0026\u0026 g++ system.cpp -o system\n-   cd ../\n-   g++ 5_state_model_simulator.cpp -lrt -pthread -o 5_state_model_simulator\n\n## HOW TO RUN:\n-   To set which file to open in New, go to around line 27, where a string \"fileToOpen\" holds the \nname of the file. By default, it opens \"Sample_3_SRTF.txt\". You will also have to go to \"Exit.cpp\", where\na variable \"StopAt\" holds the number of Procedures at which it should stop and print the Report\n-   You can change whether or not it sends the data to a log file or the console itself (you'll have to \ncomment a block of code in \"5_state_model_simulator.cpp\" (lines 227-236)\n-   After building, just enter \"./5_state_model_simulator\" to execute\n-   Since the States go in an infinite loop, you can kill them using \"kill [pidofprocess]\". Multiple pids can\nbe killed with spaces, e.g. \"kill [pid1] [pid2] [pid3]\"\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrayhatdevelopers%2F5-state-process-model-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrayhatdevelopers%2F5-state-process-model-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrayhatdevelopers%2F5-state-process-model-simulator/lists"}