-2

Operating System Concepts says

A character-stream device transfers bytes one by one, whereas a block device transfers a block of bytes as a unit.

But I heard that the unit of transfer between main memory and disk is page.

Between what and what do the "transfers" in the quote happen? Why is its transfer unit not page but block or byte?

Thanks.

  • Thanks. Why is its transfer unit not page but block or byte? – Tim Oct 4 '18 at 1:12
1

The transfers typically occur between the storage device and main memory. When you hear about pages when referring to disk, they're probably talking about virtual memory which is in terms of pages since that's the unit of storage the MMU deals with. But block devices relate to all sorts of devices that may or may not be disks so you have this separate concept of a blocks and block size. Disk block size and memory page size used to (generally) be the same, 4096 bytes, which of course was very convenient. But there's nothing that says they must be the same. For example, you might have a multi-terabyte disk used to store images where it makes sense to increase the block size to 32k or more... having no impact on memory page size. Generally, as long as one is a power of two multiple of the other it can be made to work without too much trouble.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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