Awesome q2a theme
0 votes
9 views

Which of the following programming techniques and structures are good for demand – paged environment?

  1. Stack
  2. Hashed symbol table
  3. Sequential search
  1. Both a and c
  2. Both a and b
  3. Only b
  4. Only a
in Others by (178 points) | 9 views

1 Answer

+1 vote
Best answer

This question is directly copied from University of Washington’s assignment. Ans is a


Which of the following program techniques and structures are "good" for a demand-paged environment?

 

  1. Stack - Good. Memory is allocated and data is accessed in a sequential pattern, so we good locality for prefetching.

     

  2. Hashed symbol table - Bad. Each access can potentially go to any allocated page of the table.

     

  3. Sequential search - Good. Again, memory accesses are sequential.

     

  4. Binary search - Bad. Accesses are all over the place.

     

  5. Pure code (read-only code) - Good. Since code usually has good locality, prefetching will work well.

     

  6. Vector operations - Good. Operating on a whole array at a time will have lots of sequential accesses (up each element of the array.

     

  7. Indirection - Bad. The locality of the pointers in the code is betrayed since what they point to can be anywhere.
by (1.3k points)
selected by
932 questions
596 answers
1,885 comments
81,474 users