summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--proj2.txt27
1 files changed, 18 insertions, 9 deletions
diff --git a/proj2.txt b/proj2.txt
index 8572b3f..8bbd521 100644
--- a/proj2.txt
+++ b/proj2.txt
@@ -92,7 +92,7 @@ So pages of the stack don't get tracked inside the page table at all!
92If we do not find a valid entry in our supplemental page-table it could be 92If we do not find a valid entry in our supplemental page-table it could be
93very well be a valid stack access. The maximum offset we consider a valid 93very well be a valid stack access. The maximum offset we consider a valid
94access is caused by the PUSHA instruction, which may try to access an address 94access is caused by the PUSHA instruction, which may try to access an address
9532 bytes below the current stack pointer. Everthing higher we consider 9532 bytes below the current stack pointer. Everything higher we consider
96an exception. 96an exception.
97 97
98 MEMORY MAPPED FILES 98 MEMORY MAPPED FILES
@@ -123,16 +123,23 @@ struct page_table_entry:
123>> C2: Describe how memory mapped files integrate into your virtual 123>> C2: Describe how memory mapped files integrate into your virtual
124>> memory subsystem. 124>> memory subsystem.
125 125
126for every page required by the memory mapped file we create a new page table 126For every memory mapped file we create a new per process mmap table. Its entries contain
127entry 127the virtual address of the first memory mapped file, the file handler and the number
128TODO 128of pages which are needed for the mapping. Additionally we store the lowest
129free index, the highest used index and the capacity of the mmap table. We then
130create for ever page required by the memory mapped file a new page table
131entry.
129 132
130>> C3: Explain how you determine whether a new file mapping overlaps 133>> C3: Explain how you determine whether a new file mapping overlaps
131>> any existing segment. 134>> any existing segment.
132 135
133in mmap() we simply check if the required pages are still free (no entry in 136We avoid overlaps of file mappings by determining in the systemcall which tries
134the page table). 137to map a file if the required number of pages for the mapping are still free.
135TODO 138To obtain this information we lookup if there are entries in the page table
139that imply that the memory space needed for the mapping is occupied by other
140pages. Furthermore we must check if any page not in the page table (for
141instance loaded pages on the stack) occupies the space we want to map our file
142to.
136 143
137---- RATIONALE ---- 144---- RATIONALE ----
138 145
@@ -143,8 +150,10 @@ TODO
143>> implementation either does or does not share much of the code for 150>> implementation either does or does not share much of the code for
144>> the two situations. 151>> the two situations.
145 152
146we share the same page table entries 153As our implementation of the supplemental page table does not distinguish
147TODO 154pages that came from memory mapped files and pages from executables, both the
155supplemental page table as the memory mapped file table can share the page
156table routines.
148 157
149 SURVEY QUESTIONS 158 SURVEY QUESTIONS
150 ================ 159 ================