Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Just as RAM is divided into frames, the logical address space is divided into pages and the secondary storage into blocks of the same size. Pages are very small in size, 4 kB or so, and are swapped out when needed and stored as pagefiles.

All easy to understand until now. What confuses me is that:

  • Most modern hard drives have sectors the size of 4 kB or 8 kB, so does it mean each sector becomes a page?
  • And what is a "block" on a hard drive? Isn't it a collection of sectors? Is a block the same as a "cluster" which is also a collection of sectors?
  • If the OS wants to keep the page size independent of the sector size then it can designate a portion of the harddrive as virtual memory and operate on it differently from how it operates on the rest of the hard drive. Here the blocks could be the same size as page size and in the rest of the hard drive it could be different. Is that correct?
share|improve this question
    
I really can't help you. But +1 for an excellent question. –  Josiah Oct 11 '12 at 15:58
    
Silberschatz (I know you possess that book ;-)) chapter 12 –  artistoex Oct 11 '12 at 15:59
    
Hang on. Going over it. –  Fasih Khatib Oct 11 '12 at 16:03
    
Id like to know this as well. –  Jared Tritsch Oct 11 '12 at 16:19
    
The lengthy answer i posted is not being displayed. Don't know why. In short, 1. No sector != page. 2. They're different. 3. Perhaps the block size is different. I'll post the detailed answer again if possible :) –  Fasih Khatib Oct 12 '12 at 4:14
add comment

2 Answers

"Block" and "cluster" are filesystem-layer terminology, and "sector" is disk-layer terminology. Unlike "page", block size is determined entirely by software.

A "block", "sector", or "allocation unit" is a group of sectors that are fetched at once. Fetching more sectors at once improves latency: reading a large file a sector at a time is like trying to read a library book with a separate trip to the library for each page.

Virtual memory in Windows is just implemented as a file, and I believe it's not handled in a particularly special way.

share|improve this answer
add comment
up vote 1 down vote accepted

Ok, first of all pages are not as small as I thought they were. They are in MBs.

  • No, sector size not equal to page size
  • Block is a collection of sectors made by the OS to reduce the number of addresses required to manage the entire hard drive. Cluster is also a collection of sectors but contiguous. However, when the OS wants to write a file, it simply asks the HDD to write it to a free block. How that data is stored in the block is not the concern of the OS. The file maybe stored in various sectors or in a cluster.
  • Yes, perhaps they are managed differently. The block size may be different for virtual memory than for the rest of the drive. Here, block size maybe equal to the page size
  • share|improve this answer
    add comment

    Your Answer

     
    discard

    By posting your answer, you agree to the privacy policy and terms of service.

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