Write a program that can be used to compare the effectiveness of adding a tag field to $TLB$ entries when control is toggled between two programs. The tag field is used to effectively label each entry with the process id. Note that a nontagged $TLB$ can be simulated by requiring that all $TLB$ entries have the same tag at any one time. The inputs will be:
- The number of $TLB$ entries available
- The clock interrupt interval expressed as number of memory references
- A file containing a sequence of (process, page references) entries
- The cost to update one $TLB$ entry
- Describe the basic data structures and algorithms in your implementation.
- Show that your simulation behaves as expected for a simple (but nontrivial) input example.
- Plot the number of $TLB$ updates per $1000$ references.