diff options
| author | manuel <manuel@mausz.at> | 2012-06-21 19:16:26 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2012-06-21 19:16:26 +0200 |
| commit | 5a6b07a186f9f3f718f312b6b9b365cb02da6556 (patch) | |
| tree | 8415244bba6ebf0a32a3b330610994f5325a6286 | |
| parent | f442c3fbe203752f0a751317d3e833fe0b660ae1 (diff) | |
| download | progos-5a6b07a186f9f3f718f312b6b9b365cb02da6556.tar.gz progos-5a6b07a186f9f3f718f312b6b9b365cb02da6556.tar.bz2 progos-5a6b07a186f9f3f718f312b6b9b365cb02da6556.zip | |
add structs into proj2 and some simple explanations
| -rw-r--r-- | proj2.txt | 16 |
1 files changed, 16 insertions, 0 deletions
| @@ -104,6 +104,17 @@ an exception. | |||
| 104 | >> `struct' member, global or static variable, `typedef', or | 104 | >> `struct' member, global or static variable, `typedef', or |
| 105 | >> enumeration. Identify the purpose of each in 25 words or less. | 105 | >> enumeration. Identify the purpose of each in 25 words or less. |
| 106 | 106 | ||
| 107 | struct mmap_table: | ||
| 108 | struct mmap_table_entry **ids; | ||
| 109 | int id_free; ...lowest-index free | ||
| 110 | int id_max; ...highest-index used | ||
| 111 | int id_cap; ...mmap table capacity | ||
| 112 | |||
| 113 | struct mmap_table_entry: | ||
| 114 | void *upage; ...virtual address of first page of mmapped file | ||
| 115 | struct file *file; ...file handle | ||
| 116 | int pages; ...number of pages the mapping needs | ||
| 117 | |||
| 107 | struct page_table_entry: | 118 | struct page_table_entry: |
| 108 | union struct TODO ...structure needed for loading of memory mapped files | 119 | union struct TODO ...structure needed for loading of memory mapped files |
| 109 | 120 | ||
| @@ -112,11 +123,15 @@ struct page_table_entry: | |||
| 112 | >> C2: Describe how memory mapped files integrate into your virtual | 123 | >> C2: Describe how memory mapped files integrate into your virtual |
| 113 | >> memory subsystem. | 124 | >> memory subsystem. |
| 114 | 125 | ||
| 126 | for every page required by the memory mapped file we create a new page table | ||
| 127 | entry | ||
| 115 | TODO | 128 | TODO |
| 116 | 129 | ||
| 117 | >> C3: Explain how you determine whether a new file mapping overlaps | 130 | >> C3: Explain how you determine whether a new file mapping overlaps |
| 118 | >> any existing segment. | 131 | >> any existing segment. |
| 119 | 132 | ||
| 133 | in mmap() we simply check if the required pages are still free (no entry in | ||
| 134 | the page table). | ||
| 120 | TODO | 135 | TODO |
| 121 | 136 | ||
| 122 | ---- RATIONALE ---- | 137 | ---- RATIONALE ---- |
| @@ -128,6 +143,7 @@ TODO | |||
| 128 | >> implementation either does or does not share much of the code for | 143 | >> implementation either does or does not share much of the code for |
| 129 | >> the two situations. | 144 | >> the two situations. |
| 130 | 145 | ||
| 146 | we share the same page table entries | ||
| 131 | TODO | 147 | TODO |
| 132 | 148 | ||
| 133 | SURVEY QUESTIONS | 149 | SURVEY QUESTIONS |
