XML

kent logo

CO527 Anonymous Questions and Answers Keyword Index

This page provides a keyword index to questions and answers. Clicking on a keyword will take you to a page containing all questions and answers for that keyword, grouped by year.

To submit a question, use the anonymous questions page. You may find the keyword index and/or top-level index useful for locating past questions and answers.

Keyword reference for memory-management

2014

Question 63 (2014):

Submission reference: IN3755

I'm a little confused on the difference between R and V bits in pages. V is set if the page is currently in a page frame, and R is set if the page is referenced. Surely if a page is currently in a page frame it is referenced, and if not it is not? It seems to me these bits both perform the same function.

Answer 63:

Not entirely. One (V) means the page is valid (resident in a page frame). The other (R) means the page has been referenced by the virtual machine. It is perfectly sensible for a page to be resident but non-referenced (see stuff on pre-paging or clustering on page-in) and in some instances necessary (the NUR replacement mechanisms periodically clear the R bits). It might even make sense to have the reverse: a page marked as referenced, but which is non-resident (the OS might just like to leave the 'R' bit there to mean "it was referenced", before it got paged out).

Keywords: memory-management


Question 57 (2014):

Submission reference: IN3741

You would use the cache disable bit for memory mapped hardware right? I don't really know how to explain why though. Because it doesn't actually refer to memory and can't be treated as such, therefore it doesn't make sense to cache it? Or that its different each time and so cache doesn't make sense? Also, is it just memory mapped hardware you'd want to disable cache for?

Answer 57:

Memory-mapped I/O regions (e.g. PCI space) are sensible to cache-disable for the 2nd reason you give. The first "because it isn't memory" probably wouldn't earn you marks in an exam as it lacks an explanation as to why. But "different each time" is wrong (though some marks for that). The precise reason is that "it might be different each time it is read" and writes to I/O regions must go straight to the bus (e.g. timing requirements) and not be delayed in a write-back cache, for instance. Other memories that don't make sense to cache: graphics framebuffer. Or at an application-level, a clever programmer (who knows how their program works) could turn off cache for regions of virtual memory that they know aren't worth caching based on the access characteristics. You might also want to turn off caching to work out the performance gain the cache is giving you (but that's a more all-encompassing, less page-level, reason).

Keywords: cache , memory-management

2013

Question 20 (2013):

Submission reference: IN2822

What does the P bit (private mapping) actually show? (in relation to application page mappings in Linux).

Answer 20:

This shows that the mapping is private to the process, in the sense that only one process has it. Of course, the mapping can be shared up to the point where the process tries to modify the data there in some way, at which point a private copy will be made (but in such cases, the mapping is still private). Explicitly shared mappings arise either as a result of memory-mapped files (mapped file file-system) or from explicitly shared memory (e.g. for interprocess communication, see man shm_open on POSIX systems).

Keywords: memory-management

Valid CSS!

Valid XHTML 1.0!

Maintained by Fred Barnes, last modified Wed May 25 15:07:20 2016