Concept of paging in computer science
Table of contents
What is paging in computer science?
Paging is a memory management technique where we try to decide how much data can be used from main memory for current operation & how much data can be written to secondary memory. All this is during the runtime of the application.
Internal working in general?
Let us say, we have configured 512 MB as heap memory for our java application and a specific operation wherein we have to do intensive IO calls for example fetch records from DB and use it for processing or buffer and read a large content from a file for processing it in batch.
In this case, the concept of paging comes in useful.
To begin, the paging strategy assumes that all of the data we retrieve need not be processed all at once.
What I mean is that we can fetch on demand by storing certain information in the main memory, such as the beginning address of the content we will be fetching.
In the Operating system, data is read from blocks called pages, which are all the same size. A frame represents the physical part of memory containing one page. A page table is used by a virtual memory to keep track of mappings between virtual addresses and physical addresses, so the OS will refer to the page table. The paging technique does not require a frame to be a single physically contiguous location in storage. Paging has an advantage over previous memory management strategies in that it uses memory more efficiently and uses storage more quickly.