summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2012-06-22 01:47:28 +0200
committermanuel <manuel@mausz.at>2012-06-22 01:47:28 +0200
commitc7129e1a1a2cca41042c1e5e27584550dfcab922 (patch)
tree24f5dbf5504b16796a0e065a6e977482ea6a9e2e
parent25f8116442c7cdfa206186fa0d23ced5ebda857f (diff)
downloadprogos-c7129e1a1a2cca41042c1e5e27584550dfcab922.tar.gz
progos-c7129e1a1a2cca41042c1e5e27584550dfcab922.tar.bz2
progos-c7129e1a1a2cca41042c1e5e27584550dfcab922.zip
use 80 character long linesHEADproj2master
-rw-r--r--proj2.txt29
1 files changed, 14 insertions, 15 deletions
diff --git a/proj2.txt b/proj2.txt
index ab96337..2cc2d43 100644
--- a/proj2.txt
+++ b/proj2.txt
@@ -59,11 +59,11 @@ actual page-loading is done when a page-fault occurs.
59>> A3: How do you deal with or prevent page faults in file system 59>> A3: How do you deal with or prevent page faults in file system
60>> routines. Argue why your solution is deadlock free. 60>> routines. Argue why your solution is deadlock free.
61 61
62All system calls assert that a page fault can never occur while the 62All system calls assert that a page fault can never occur while the file system
63file system is locked. As for this reason syscall_read uses a temporary page 63is locked. As for this reason syscall_read uses a temporary page as buffer which
64as buffer which is copied into user space after the filesystem is unlocked 64is copied into user space after the filesystem is unlocked again. This means if
65again. This means if a page fault occurs during copying the file system is not 65a page fault occurs during copying the file system is not locked an therefore
66locked an therefore this cannot create a deadlock. 66this cannot create a deadlock.
67 67
68 STACK GROWTH 68 STACK GROWTH
69 ============ 69 ============
@@ -123,22 +123,21 @@ struct mmap_table_entry:
123>> memory subsystem. 123>> memory subsystem.
124 124
125For every page required by the memory mapped file we create an associated entry 125For every page required by the memory mapped file we create an associated entry
126in the page table. It contains the first virtual address of the memory mapped file, 126in the page table. It contains the first virtual address of the memory mapped
127the file handler and the number of pages which are needed for the mapping. 127file, the file handler and the number of pages which are needed for the mapping.
128Additionally we store the lowest free index, the highest used index and the 128Additionally we store the lowest free index, the highest used index and the
129capacity of the mmap table. We then create for every page required by the 129capacity of the mmap table. We then create for every page required by the memory
130memory mapped file a new page table entry. 130mapped file a new page table entry.
131 131
132>> C3: Explain how you determine whether a new file mapping overlaps 132>> C3: Explain how you determine whether a new file mapping overlaps
133>> any existing segment. 133>> any existing segment.
134 134
135We avoid overlaps of file mappings by determining in the systemcall which tries 135We avoid overlaps of file mappings by determining in the systemcall which tries
136to map a file if the required number of pages for the mapping are still free. 136to map a file if the required number of pages for the mapping are still free.
137To obtain this information we lookup the entries in the page table 137To obtain this information we lookup the entries in the page table that imply
138that imply that the memory space needed for the mapping is occupied by other 138that the memory space needed for the mapping is occupied by other pages.
139pages. Furthermore we must check if any page not in the page table (for 139Furthermore we must check if any page not in the page table (for instance loaded
140instance loaded pages on the stack) occupies the space we want to map our file 140pages on the stack) occupies the space we want to map our file to.
141to.
142 141
143---- RATIONALE ---- 142---- RATIONALE ----
144 143
@@ -150,7 +149,7 @@ to.
150>> the two situations. 149>> the two situations.
151 150
152As our implementation of the supplemental page table does not distinguish 151As our implementation of the supplemental page table does not distinguish
153between pages of memory mapped files and pages of data segments they share 152between pages of memory mapped files and pages of data segments they share
154the same insert and loading code. 153the same insert and loading code.
155 154
156 SURVEY QUESTIONS 155 SURVEY QUESTIONS