OS Memory Mapped Files
Conceptually, we can imagine the existence of the following two new system calls:
From the above two new imagined system calls, the map gives a file name and a virtual address that causes the OS to map the file into the address space at the virtual address.
For those type of computer system that supports segmentation, file mapping works best there.
File mapping introduces the following three problems:
- It is too hard for any computer system to know the exact length of any output file
- If a file is mapped in by one process and opened for conventional reading by another. If the first process modifies a page, then that change willn't be reflected in the file on the disk until the page is evicted
- A file may be larger than a segment, or sometime larger than the whole virtual address space
« Previous Tutorial Next Tutorial »
Like/Share Us on Facebook 😋