{"id":24676480,"url":"https://github.com/bgreni/virtual-disk-system","last_synced_at":"2025-08-15T14:14:58.106Z","repository":{"id":158243453,"uuid":"223662781","full_name":"bgreni/Virtual-disk-system","owner":"bgreni","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-06T20:35:59.000Z","size":159,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T17:16:39.420Z","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/bgreni.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":"2019-11-23T22:42:35.000Z","updated_at":"2022-03-16T04:32:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c9f38a3-1cbc-4146-8963-320f4108f901","html_url":"https://github.com/bgreni/Virtual-disk-system","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bgreni/Virtual-disk-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgreni%2FVirtual-disk-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgreni%2FVirtual-disk-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgreni%2FVirtual-disk-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgreni%2FVirtual-disk-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bgreni","download_url":"https://codeload.github.com/bgreni/Virtual-disk-system/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgreni%2FVirtual-disk-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270579791,"owners_count":24610078,"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-08-15T02:00:12.559Z","response_time":110,"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":"2025-01-26T12:15:17.150Z","updated_at":"2025-08-15T14:14:58.098Z","avatar_url":"https://github.com/bgreni.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Design\n\n## Class structure\n\nI decided to go with an OO style as I think it leads to cleaner and more traceable code. It likely resulted in me having to write quite a bit more code that was needed, but when it came time to debugging I was certainely happy with my choice\n\nAdmittedly, in the frenzy of trying to get everything done, some parts of my code did not turn out as clean as I would like, and in many cases I had to resort to some very expensive quick fixes to certain problems. The best example being my implementation of the free block list. I decided to use a bitset instead of a char array for my bit vector, and realized the 7th bit in my bitset actually represented the first bit in the list due to how the bytes are read from the file. To fix this I just wrote a function to flip every \"byte\" of the list so I could index it naturally. However, I later realized doing so would corrupt the super block on the disk when I wrote back to it, so I had to undo, and redo the changes to the list everytime I write back to the disk, which is terribly inefficient.\n\nUnfortunately performance/resource management were not very high on my list for this project, as my main concerns were readability and correctness.\n\n## System Calls\n\nI don't believe I directly used any system calls, as I heavily used the c++ standard library as they are more convient to use.\n\n# Testing\n\nTo test my program I used the given test cases, as well as some of my own, mostly to try and diagnose bugs that I was having. Comparing the expected and actually outputs to see if they matched up. I had wanted to write a script to compared the state of the disk with the expected state but I ran out of time. I also write a small suite of \"unit test\" type functions just to check simple cases to check if I ever horrifically broke something.\n\n\n# Sources\nThis stackoverflow thread taught me how to sort a vector of objects using a custom comparison object.\n\nhttps://stackoverflow.com/questions/1380463/sorting-a-vector-of-custom-object\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgreni%2Fvirtual-disk-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgreni%2Fvirtual-disk-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgreni%2Fvirtual-disk-system/lists"}