Difference between page and block in operating system
Last Updated :
08 Sep, 2024
In an operating system, a block is a variable-size storage that can either read a file or write data into a file. The page is a fixed-size memory unit that can be loaded into the processor from main memory. In this article, we will provide an overview of the page and block in the operating system and then discuss the differences by mentioning the features of both. Let’s discuss it one by one.
What is a Block in OS?
The block is the smallest unit of data storage. It is used to read a file or write data to a file. A block is also a sequence of bits and bytes. Block is made up of sectors. A sector is a physical spot on a formatted disk that holds information. A block is made up of either one sector or even no of sectors (2,4,6..). A block is also called a physical record.
Example:
PS DOS used 65,536 block addresses ( earlier, now pages are used). The default NTFS Block size is 4096 bytes.

A formatted disk
Features of Block
- Most of the OS use blocks for storing data.
- When we put the data into the block it is known as blocking and when we extract data from blocks it is known as deblocking.
- Blocks can be of different sizes. The size of the block is known as the block size.
- Every file in OS occupies at least one block even if it is of 0 bytes.
- Block provides a level of abstraction for hardware that is responsible for storing and retrieving the data.
- Blocking increases the data handling streams speed and reduces overhead.
Advantages of Using Blocks in Storage Systems
- Blocks allow for more efficient use of storage space, as files can be stored in smaller, contiguous units rather than being fragmented across multiple sectors.
- Blocks can improve performance by allowing the storage device to read or write multiple blocks at once, reducing the number of disk seeks required.
Disadvantages of Using Blocks in Storage Systems
- Using fixed block sizes can result in wasted storage space if a file is smaller than the block size.
- Using variable block sizes can introduce additional overhead, as the file system needs to keep track of the size and location of each block.
What is Page Overview in OS?
A page is also a unit of data storage. A page is loaded into the processor from the main memory. A page is made up of unit blocks or groups of blocks. Pages have fixed sizes, usually 2k or 4k. A page is also called a virtual page or memory page. When the transfer of pages occurs between main memory and secondary memory it is known as paging. Refer to https://www.geeksforgeeks.org/paging-in-operating-system/ for a detailed explanation.
Example:
A well-known example depicting the usage of pages is Storage Area Network. Storage Area Network(SAN) uses paging to move data between driver types.

Block Diagram depicting paging. Page Map Table(PMT) contains pages from page number 0 to 7
Features of Page
- The size of pages is determined by processor architecture.
- Some of the OS use pages instead of blocks.
- Pages are the smallest unit of in-memory storage and are RAM equivalent.
- If the page required by the processor is not present in the main memory, it is known as a page fault and it is brought in the main memory by a special routine known as page fault routine.
- The technique of getting the desired page in the main memory is known as page demanding.
- Pages act as a middleman between OS and hard drives.
Advantages of Using Pages in Virtual Memory Systems
- Pages allow the operating system to manage memory more efficiently by allocating memory on demand and swapping unused pages to secondary storage.
- Pages allow for more flexible memory allocation, as applications can request memory in smaller chunks without needing to worry about physical memory constraints.
- Pages enable the use of virtual memory, which allows applications to access more memory than is physically available on the system.
Disadvantages of Using Pages in Virtual Memory Systems
- Paging can introduce additional overhead, as the operating system needs to manage the mapping between virtual and physical memory.
- Paging can lead to decreased performance if the system is thrashing, where the operating system is constantly swapping pages in and out of memory.
BLOCK
|
PAGE
|
A block is the smallest unit of data storage that can either read a file or write data into a file.
|
A page is the smallest unit of in-memory storage and is RAM equivalent.
|
Block is a variable-size storage unit.
|
Page is a fixed-size memory unit.
|
A block is a sequence of bits and bytes. It is made up of either one sector or even number of sectors (2,4,6,…).
|
A page is made up of unit blocks or groups of blocks.
|
A block is managed by the file system.
|
A page is managed by the operating system’s memory management unit.
|
Processing with blocks is more difficult than pages when there are multiple storage devices because every device supports a different block size.
|
Processing with pages is easier than block when there are multiple storage devices due to the fixed size of tthe page.
|
A bolck is also called a physical record.
|
A page is also called a virtual page or memory page.
|
In operating systems, a page is a fixed size memory unit, whereas a block is a variable size storage unit.
- A page is the smallest unit of data that is transferred between main memory and secondary storage (usually a hard disk) in a paging-based virtual memory system. Pages are typically 4KB or 8KB in size and are managed by the operating system’s memory management unit. Each page is mapped to a physical memory frame, and the mapping is tracked by the page table.
- On the other hand, a block is a contiguous group of bytes or records that is read or written to secondary storage as a unit. The size of a block can vary and is often determined by the file system or storage device. For example, a file system might use a block size of 4KB or 16KB for storing files on a hard disk.
- In summary, a page is a fixed-size memory unit managed by the operating system’s memory management unit, whereas a block is a variable size storage unit managed by the file system or storage device.
Conclusion :
In conclusion, the page and block act as a data transfer unit between main memory and secondary storage. The operating system prefers pages more than blocks for information transfer purposes. The very first reason is that processing with pages is easier than the block when there are multiple storage devices. Also, the page size is usually fixed, and blocks have varied sizes. However, both page and block are data storage units.
Similar Reads
Difference between Operating System and Kernel
In the world of computing, two terms that are frequently mentioned are Operating System (OS) and Kernel. In this article, we will explore the key differences between the OS and the Kernel, their functions, and how they work together to manage hardware and software. What is an Operating System?An Ope
3 min read
Difference Between Linux and AIX Operating System
Linux and AIX are widely used operating systems that cater to different needs and environments in computing globally. While Linux is an open-source running gadget extensively used in various computing platforms, including servers, desktops, and embedded structures, AIX is a Unix-primarily based runn
6 min read
Difference between Firmware and Operating System
Firmware : It is a piece of programming code embedded in a particular hardware. It is a modified version of the software. Firmware is equivalent to unmodified or fixed code. Examples -Firmware resides in keyboards, video cards, routers, webcams, motherboards, mice, microwave ovens, refrigerators, wa
4 min read
Difference between Hardware and Operating System
1. Hardware : Computer Hardware, as name suggest, are simply physical components or machinery or equipment's of computer that are hard, tangible as well as considered heart of computer without which computer cannot function. 2. Operating System : Operating System, as name suggests, is simply a syste
3 min read
Difference Between AIX and Solaris Operating System
An Operating System (OS) is a collection of software that manages computer hardware resources and provides common services for computer programs. In this article, we will learn the difference between AIX and Solaris. What is the AIX Operating System?AIX is a series of proprietary operating systems w
3 min read
Difference Between Host and Guest Operating System
An Operating System (OS) can be defined as a mediator, which works between the software & hardware of a computer The common task of OS includes memory management, managing different resources, device management, file handling, and others. Examples of some popular OS are Linux, MacOS, and Windows
6 min read
Differences between SDS PAGE and Native PAGE
The difference between SDS-PAGE and native PAGE lies in how proteins are separated in the polyacrylamide gel. In SDS-PAGE, the migration rate of the protein is determined by its molecular weight only, whereas in native PAGE, the migration rate depends on both the size and overall charge of the prote
7 min read
Difference Between Application Software and Operating System
A computer can only carry out certain tasks with the help of software, which is a set of guidelines or instructions. Software can be broadly divided into two categories: system software and application software. The primary program on a computer that has direct access to the hardware of the system i
5 min read
Difference between UNIX and Windows Operating System
This makes it even more important to know the differences between UNIX and Windows Operating Systems in our daily, academic and scientific use. UNIX, which is characterized by its high performance and flexibility, is preferred in stable environments that demand strong control. On the other hand, Win
8 min read
Difference between Paging and Swapping in OS
Proper memory management in any operating system is required for the smooth execution of numerous processes. Two fundamental techniques include paging and swapping. In Paging, the memory of a process is divided into fixed-size pages; this permits non-contiguous memory allocation and minimizes fragme
4 min read