diff options
| author | manuel <manuel@mausz.at> | 2012-06-22 01:47:28 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2012-06-22 01:47:28 +0200 |
| commit | c7129e1a1a2cca41042c1e5e27584550dfcab922 (patch) | |
| tree | 24f5dbf5504b16796a0e065a6e977482ea6a9e2e | |
| parent | 25f8116442c7cdfa206186fa0d23ced5ebda857f (diff) | |
| download | progos-c7129e1a1a2cca41042c1e5e27584550dfcab922.tar.gz progos-c7129e1a1a2cca41042c1e5e27584550dfcab922.tar.bz2 progos-c7129e1a1a2cca41042c1e5e27584550dfcab922.zip | |
| -rw-r--r-- | proj2.txt | 29 |
1 files changed, 14 insertions, 15 deletions
| @@ -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 | ||
| 62 | All system calls assert that a page fault can never occur while the | 62 | All system calls assert that a page fault can never occur while the file system |
| 63 | file system is locked. As for this reason syscall_read uses a temporary page | 63 | is locked. As for this reason syscall_read uses a temporary page as buffer which |
| 64 | as buffer which is copied into user space after the filesystem is unlocked | 64 | is copied into user space after the filesystem is unlocked again. This means if |
| 65 | again. This means if a page fault occurs during copying the file system is not | 65 | a page fault occurs during copying the file system is not locked an therefore |
| 66 | locked an therefore this cannot create a deadlock. | 66 | this 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 | ||
| 125 | For every page required by the memory mapped file we create an associated entry | 125 | For every page required by the memory mapped file we create an associated entry |
| 126 | in the page table. It contains the first virtual address of the memory mapped file, | 126 | in the page table. It contains the first virtual address of the memory mapped |
| 127 | the file handler and the number of pages which are needed for the mapping. | 127 | file, the file handler and the number of pages which are needed for the mapping. |
| 128 | Additionally we store the lowest free index, the highest used index and the | 128 | Additionally we store the lowest free index, the highest used index and the |
| 129 | capacity of the mmap table. We then create for every page required by the | 129 | capacity of the mmap table. We then create for every page required by the memory |
| 130 | memory mapped file a new page table entry. | 130 | mapped 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 | ||
| 135 | We avoid overlaps of file mappings by determining in the systemcall which tries | 135 | We avoid overlaps of file mappings by determining in the systemcall which tries |
| 136 | to map a file if the required number of pages for the mapping are still free. | 136 | to map a file if the required number of pages for the mapping are still free. |
| 137 | To obtain this information we lookup the entries in the page table | 137 | To obtain this information we lookup the entries in the page table that imply |
| 138 | that imply that the memory space needed for the mapping is occupied by other | 138 | that the memory space needed for the mapping is occupied by other pages. |
| 139 | pages. Furthermore we must check if any page not in the page table (for | 139 | Furthermore we must check if any page not in the page table (for instance loaded |
| 140 | instance loaded pages on the stack) occupies the space we want to map our file | 140 | pages on the stack) occupies the space we want to map our file to. |
| 141 | to. | ||
| 142 | 141 | ||
| 143 | ---- RATIONALE ---- | 142 | ---- RATIONALE ---- |
| 144 | 143 | ||
| @@ -150,7 +149,7 @@ to. | |||
| 150 | >> the two situations. | 149 | >> the two situations. |
| 151 | 150 | ||
| 152 | As our implementation of the supplemental page table does not distinguish | 151 | As our implementation of the supplemental page table does not distinguish |
| 153 | between pages of memory mapped files and pages of data segments they share | 152 | between pages of memory mapped files and pages of data segments they share |
| 154 | the same insert and loading code. | 153 | the same insert and loading code. |
| 155 | 154 | ||
| 156 | SURVEY QUESTIONS | 155 | SURVEY QUESTIONS |
