What is the difference between pages and blocks?
A block is the smallest unit of data that an operating system can either write to a file or read from a file.
What exactly is a page?
Pages are used by some operating systems instead of blocks. A page is basically a virtual block. And, pages have a fixed size – 4K and 2K are the most commonly used sizes. So, the two key points to remember about pages is that they are virtual blocks and they have fixed sizes.
Why pages may be used instead of blocks
Pages are used because they make processing easier when there are many storage devices, because each device may support a different block size. With pages the operating system can deal with just a fixed size page, rather than try to figure out how to deal with blocks that are all different sizes. So, pages act as sort of a middleman between operating systems and hardware drivers, which translate the pages to the appropriate blocks. But, both pages and blocks are used as a unit of data storage.
本文探讨了操作系统中数据存储的基本单位——块与页面的区别。块是最小的数据读写单位,而页面作为虚拟块,具有固定大小,如4K或2K,用于简化多存储设备的处理。页面充当操作系统与硬件驱动之间的中介,统一处理不同设备的块大小差异。
2903

被折叠的 条评论
为什么被折叠?



