1
$\begingroup$

I am bit confused on these terminologies.

While studying Paging of Operating System we study about Page and Frame.

Size of one Frame of Main Memory = Size of one Page of a Process

While studying Cache Memory Mapping in Computer Organization we study about Memory Block.

Size of one Block of Main Memory = Size of one Block of a Cache Memory

Questions

  • 1] Difference(s) between Page/Frame and Block.
  • 2] How are they related, if at all they are?
  • 3] Do they both exist at the same time? If yes, how?
$\endgroup$

1 Answer 1

1
$\begingroup$

Paging is a non-contiguous, fixed size partitioning method to allocate memory to a process. The process(virtual address space/virtual memory) is divided into fixed size partitions(pages) and then loaded into main memory. This post explains why page size is the same as frame size. A page is not the same as a frame, as a page refers to a partition of virtual memory whereas a frame is a partition of physical memory, which holds a page.


A cache block/cache line is a fixed size partition of the cache, which exploits [locality of reference][2]. A cache is an optimization, an effort to reduce the effective memory access time. A system can work perfectly fine without a cache, just slower.

Are they related? Yes and No. The idea of partitioning in both concepts is similar, however their purposes and working are entirely different. The main memory is an addressable memory and needs an address translation mechanism to work with paging, whereas the cache is a content addressable memory, it doesn't have addresses of its own and uses Cache mapping techniques to place data in cache. The size of a cache block is generally not equal to page size.


Do they both exist at the same time? Yes and No, in modern computer systems, Yes. However, no one can stop you from building your own system without paging and caching, or keeping either of them or both.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.