Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Belady on traces without future information #62

Open
1a1a11a opened this issue Mar 17, 2024 · 2 comments
Open

Support Belady on traces without future information #62

1a1a11a opened this issue Mar 17, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@1a1a11a
Copy link
Owner

1a1a11a commented Mar 17, 2024

The current implementation of Belady's algorithm requires an oracleGeneral trace format, which has future access information. This design was chosen to reduce the memory requirement because we need to allocate an array of size N (number of requests) to store future access time. However, requiring the oracleGeneral trace makes ad-hoc experiments hard. It would be good to support Belady's MIN algorithm for non oracleGeneral traces, e.g., txt trace.

@1a1a11a 1a1a11a added the help wanted Extra attention is needed label Mar 17, 2024
@zztaki
Copy link
Contributor

zztaki commented Mar 17, 2024

Nice feature!

LRB Simulation can serve as a demonstration. It converts the non-oracle trace into an oracle trace and then executes the belady's MIN. :) https://github.com/sunnyszy/lrb/blob/9e8b4423383c01c4528deb447f152f0437a37c3a/src/caches/annotate.cpp#L19

@1a1a11a
Copy link
Owner Author

1a1a11a commented Mar 17, 2024

Yeah, this is one option.

Currently there is a traceConv tool that can perform the conversion from a trace to oracleGeneral format. I thought this is a better approach if one wants to run the same trace several times. Using the oracleGeneral trace often speeds up simulation by a few times (compared to txt trace), and also significantly reduces memory consumption.

However, the separate conversion process is not documented. I probably need to 1. add the description in the code and documentation and 2. allow people to run ad-hoc experiments with Belady without converting the trace.

Let me know if you have any thoughts and ideas. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants