From 9ba449a6e5f9db20923fb9802eefe0f090ba5fff Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 20 Feb 2015 15:47:51 +0100 Subject: Change mode of operation for mmap_file (see readme) --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 282054c..b74eeef 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,22 @@ running the tests): ### Things to design -* Cache architecture +* Cache architecture : + - A RAM file is basically a bunch of pages that contain the data (rather than a segment of + malloc()'ed memory) + - A framebuffer device is basically a bunch of pages at a fixed hardware location, that cannot + grow + - In the two previous cases, the pages are never freed : they are not a cache, they are the + data itself. + - In the case of an on-disk file, the pages are a copy of the file's data that is originally + on-disk, and we might want to free these pages even while a process is using them, because + we can always reload them from the disk. + - An on-disk file with a page cache must be aware of all the places where the page is mapped, + so that it can unmap it when reclaiming pages. + - Simpler model : cached pages cannot be freed while the file is open with `FM_MMAP` +* Reclaiming physical memory : + - Freeing some cached stuff, ie swapping pages from mmap regions + - Swapping pages from processes non-mmap regions (ie real data regions) * IPC * How does a process exit, what does it do, how do processes synchronize ? * Have several threads in a single process -- cgit v1.2.3