Discussion
Locality of reference means that
Answer: D
Correct answer: a program tends to access a small portion of its address space at any time
Locality of reference is the observed tendency of programs to concentrate their memory accesses in a small region of their address space over any short interval. It has two forms. Temporal locality: a location just referenced is likely to be referenced again soon - loop counters, frequently called routines. Spatial locality: locations near one just referenced are likely to be needed next - sequential instructions, elements of an array. It arises from how programs are written: loops, sequential execution, and data structures traversed in order. Its importance is that the entire memory hierarchy depends on it. Cache, the TLB and demand paging all work by keeping a small active portion in fast storage, and every one of them would be useless if accesses were uniformly random. The working set model is the formal expression of the same observation. It also explains why some algorithms are far faster than their instruction counts suggest - traversing an array beats traversing a linked list of the same length.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development