summaryrefslogtreecommitdiffstats
path: root/proj2.txt
diff options
context:
space:
mode:
Diffstat (limited to 'proj2.txt')
-rw-r--r--proj2.txt34
1 files changed, 28 insertions, 6 deletions
diff --git a/proj2.txt b/proj2.txt
index 5405336..3b89826 100644
--- a/proj2.txt
+++ b/proj2.txt
@@ -30,7 +30,7 @@ Manuel Mausz <manuel-uni@mausz.at>
30>> enumeration. Identify the purpose of each in 25 words or less. 30>> enumeration. Identify the purpose of each in 25 words or less.
31 31
32struct thread: 32struct thread:
33 struct hash page_table ...page table of thread 33 struct hash page_table ...supplemental page table of thread
34 34
35struct page_table_entry: 35struct page_table_entry:
36 void *upage ...virtual address of page 36 void *upage ...virtual address of page
@@ -44,13 +44,28 @@ struct page_table_entry:
44>> determine the file and file offset corresponding to a virtual 44>> determine the file and file offset corresponding to a virtual
45>> address? 45>> address?
46 46
47TODO 47When we try to insert a new segment into our supplemental page table we record some information in the struct segment of each page table entry. This struct contains
48
49-) the virtual address of the page
50-) the type of the page table entry, weather it is an ordinary segment or a
51memory mapped file page
52-) if the page is already loaded or not (per default false)
53-) the file the page corresponds to
54-) the offset in the file
55-) if the page is writable or not
56
57Lazy loading of pages is accomplished by not loading the page instantly. The
58actual page-loading is done when a page-fault occurs.
59
48 60
49---- SYNCHRONIZATION ---- 61---- SYNCHRONIZATION ----
50>> A3: How do you deal with or prevent page faults in file system 62>> A3: How do you deal with or prevent page faults in file system
51>> routines. Argue why your solution is deadlock free. 63>> routines. Argue why your solution is deadlock free.
52 64
53TODO 65As we do not have any global structures, that means they are per process and
66per thread, page faults can not happen, the same argument goes for the
67question of being deadlock free. File-structures are per process too, so only
68one process can deal with a file at once.
54 69
55 STACK GROWTH 70 STACK GROWTH
56 ============ 71 ============
@@ -68,14 +83,21 @@ extern void *syscall_sp ...stored stack pointer for the "page fault inside
68>> B2: Describe how you integrated the (potentially growing) stack segment 83>> B2: Describe how you integrated the (potentially growing) stack segment
69>> into your page table management implementation. 84>> into your page table management implementation.
70 85
71TODO 86The Stack growth itself is implemented in the page fault handler. The page
87table is just needed to allocate a new page for the stack when it needs to
88grow.
72 89
73---- ALGORITHMS ---- 90---- ALGORITHMS ----
74>> B3: Explain how you detect a page fault which should trigger a 91>> B3: Explain how you detect a page fault which should trigger a
75>> stack growth. What asssumptions are needed for your implementation 92>> stack growth. What assumptions are needed for your implementation
76>> to work? 93>> to work?
77 94
78TODO 95If we do not find a valid entry in our supplemental page-table it could be
96very well be a valid stack access. The maximum offset we consider as a valid
97access is due to the PUSHA instruction, which can try to access an address 32
98bytes below the current stack pointer. If this is the case we try to grow the
99stack by one page.
100
79 101
80 MEMORY MAPPED FILES 102 MEMORY MAPPED FILES
81 =================== 103 ===================