{"id":15867023,"url":"https://github.com/HK-Transfield/java-last-level-cache-analyzer","last_synced_at":"2025-08-12T21:33:16.425Z","repository":{"id":152335153,"uuid":"406969245","full_name":"HK-Transfield/Cache-analyzer","owner":"HK-Transfield","description":"A simple piece of software which can infer the size of the Last Level Cache (LLC) of a system via timing memory access. Created as part of a university assignment.","archived":false,"fork":false,"pushed_at":"2021-10-28T06:16:46.000Z","size":495,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-27T06:52:42.219Z","etag":null,"topics":["java","last-level-cache","llc","memory-cache","side-channel-attacks","spectre-vulnerability"],"latest_commit_sha":null,"homepage":"","language":"Java","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/HK-Transfield.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":"2021-09-16T00:56:17.000Z","updated_at":"2021-10-28T06:16:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"25e68b51-459b-4a8e-84ae-16648e3ec53c","html_url":"https://github.com/HK-Transfield/Cache-analyzer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HK-Transfield%2FCache-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HK-Transfield%2FCache-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HK-Transfield%2FCache-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HK-Transfield%2FCache-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HK-Transfield","download_url":"https://codeload.github.com/HK-Transfield/Cache-analyzer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229711050,"owners_count":18112066,"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":["java","last-level-cache","llc","memory-cache","side-channel-attacks","spectre-vulnerability"],"created_at":"2024-10-05T23:40:52.595Z","updated_at":"2025-08-12T21:33:16.101Z","avatar_url":"https://github.com/HK-Transfield.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Side-channel Attacks — Last-Level Cache Analyzer\n\nThe CPU cache can speed up memory references. Spectre attacks expolit the system by mapping the\nvalue of a sensitve piece of information to whether or not a specific cache line exists on the cache.\n\nThe purpose of this script is to infer the size of the Last Level Cache (LLC) of a system via timing\nmemory accesses. Such a side-channel algorithm exploits similar vulnerabilities as those used by Spectre\nand Meltdown.\n\nThe overall idea in designing this script is deciding how much memory can be maximally maintained in the\nsystem by timing memory reads/writes and comparing fast (in the cache) with slow (not in the cache) accesses.\nOnce the size of the LLC is crossed, the system will start evicting existing memory objects from the cache;\nthus, if you try to access them again, that would be a cache-miss: a slow memory access.\n\n---\n\n## Getting the Program to Work\n\nTo clone and compile the program:\n\n```\ngit clone https://github.com/HK-Transfield/Cache-analyzer.git\ncd Cache-analyzer/\njavac CacheAnalyzer.java\n```\n\nTo run the program:\n\n```\njava CacheAnalyzer\n```\n\n---\n\n## Alternative Testing Configurations\n\nInside the program are commented out lines of code used as alternative testing configurations.\nThis includes:\n\n- An array of sizes that increases linearly from 1MB to 20MB, rather than exponential array sizes\n- Random array access, rather than sequential array access.\n\nIf you wish to test these other parameters, uncomment them and remember to comment out any\nother conflicting parameters. Then recompile the program and run using the above mentioned commands.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHK-Transfield%2Fjava-last-level-cache-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHK-Transfield%2Fjava-last-level-cache-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHK-Transfield%2Fjava-last-level-cache-analyzer/lists"}