{"id":30779511,"url":"https://github.com/tanzeelafatima492/page-replacement-algorithms","last_synced_at":"2025-09-05T06:37:25.778Z","repository":{"id":268824890,"uuid":"905569301","full_name":"TanzeelaFatima492/PAGE-REPLACEMENT-ALGORITHMS","owner":"TanzeelaFatima492","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-19T05:21:58.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T13:12:12.814Z","etag":null,"topics":["alogrithm","cplus","cpp","cxx","fifo","lru"],"latest_commit_sha":null,"homepage":"","language":"C++","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/TanzeelaFatima492.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,"zenodo":null}},"created_at":"2024-12-19T05:11:39.000Z","updated_at":"2025-03-09T08:41:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"0e6e0be1-5ed1-464b-8fa9-252c67e12e6a","html_url":"https://github.com/TanzeelaFatima492/PAGE-REPLACEMENT-ALGORITHMS","commit_stats":null,"previous_names":["fatima-progmmer/page-replacement-algorithms","tanzeelafatima492/page-replacement-algorithms"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TanzeelaFatima492/PAGE-REPLACEMENT-ALGORITHMS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TanzeelaFatima492%2FPAGE-REPLACEMENT-ALGORITHMS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TanzeelaFatima492%2FPAGE-REPLACEMENT-ALGORITHMS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TanzeelaFatima492%2FPAGE-REPLACEMENT-ALGORITHMS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TanzeelaFatima492%2FPAGE-REPLACEMENT-ALGORITHMS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TanzeelaFatima492","download_url":"https://codeload.github.com/TanzeelaFatima492/PAGE-REPLACEMENT-ALGORITHMS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TanzeelaFatima492%2FPAGE-REPLACEMENT-ALGORITHMS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273723201,"owners_count":25156302,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"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":["alogrithm","cplus","cpp","cxx","fifo","lru"],"created_at":"2025-09-05T06:37:24.453Z","updated_at":"2025-09-05T06:37:25.749Z","avatar_url":"https://github.com/TanzeelaFatima492.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PAGE-REPLACEMENT-ALGORITHMS\n\n### AIM: To implement FIFO page replacement technique.\n   a) FIFO b) LRU c) OPTIMAL\n### DESCRIPTION:\nPage replacement algorithms are an important part of virtual memory management and it helps the \nOS to decide which memory page can be moved out making space for the currently needed page. \nHowever, the ultimate objective of all page replacement algorithms is to reduce the number of \npage faults.\n\n## FIFO\n\nThis is the simplest page replacement algorithm. In this algorithm, the operating system \nkeeps track of all pages in the memory in a queue, the oldest page is in the front of the queue. \nWhen a page needs to be replaced page in the front of the queue is selected for removal.\nLRU-In this algorithm page will be replaced which is least recently used\nOPTIMAL- In this algorithm, pages are replaced which would not be used for the longest duration \nof time in the future. This algorithm will give us less page fault when compared to other page \nreplacement algorithms.\n\n### ALGORITHM:\n1. Start the process\n2. Read number of pages n\n3. Read number of pages no\n4. Read page numbers into an array a[i]\n5. Initialize avail[i]=0 .to check page hit\n6. Replace the page with circular queue, while re-placing check page \navailability in the frame Place avail[i]=1 if page is placed in theframe Count page\nfaults\n7. Print the results.\n8. Stop the process.\n    A) FIRST IN FIRST OUT\n\n## LEAST RECENTLY USED\n\n ### AIM:\n To implement LRU page replacement technique.\n\n### ALGORITHM:\n1. Start the process\n2. Declare the size\n3. Get the number of pages to be inserted\n4. Get the value\n5. Declare counter and stack\n6. Select the least recently used page by counter value\n7. Stack them according the selection.\n8. Display the values\n9. Stop the process\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanzeelafatima492%2Fpage-replacement-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanzeelafatima492%2Fpage-replacement-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanzeelafatima492%2Fpage-replacement-algorithms/lists"}