c493bce93f5fa9031f818c8f82cfa77b0afe573a
[pintos-anon] / TODO
1 -*- text -*-
2
3 Godmar says:
4
5 - In Project 2, we're missing tests that pass arguments to system calls
6 that span multiple pages, where some are mapped and some are not. 
7 An implementation that only checks the first page, rather than all pages 
8 that can be touched during a call to read()/write() passes all tests.
9
10 - Need some tests that test that illegal accesses lead to process
11 termination. I have written some, will add them. In P2, obviously, 
12 this would require that the students break this functionality since 
13 the page directory is initialized for them, still it would be good 
14 to have.
15
16 - There does not appear to be a test that checks that they close all
17 fd's on exit.  Idea: add statistics & self-diagnostics code to palloc.c
18 and malloc.c.  Self-diagnostics code could be used for debugging.
19 The statistics code would report how much kernel memory is free.
20 Add a system call "get_kernel_memory_information".  User programs
21 could engage in a variety of activities and notice leaks by checking
22 the kernel memory statistics.
23
24 From: "Godmar Back" <godmar@gmail.com>
25 Subject: set_priority & donation - a TODO item
26 To: "Ben Pfaff" <blp@cs.stanford.edu>
27 Date: Mon, 20 Feb 2006 22:20:26 -0500
28
29 Ben,
30
31 it seems that there are currently no tests that check the proper
32 behavior of thread_set_priority() when called by a thread that is
33 running under priority donation.  The proper behavior, I assume, is to
34 temporarily drop the donation if the set priority is higher, and to
35 reassume the donation should the thread subsequently set its own
36 priority again to a level that's lower than a still active donation.
37
38  - Godmar
39
40 From: Godmar Back <godmar@gmail.com>
41 Subject: on caching in project 4
42 To: Ben Pfaff <blp@cs.stanford.edu>
43 Date: Mon, 9 Jan 2006 20:58:01 -0500
44
45 here's an idea for future semesters.
46
47 I'm in the middle of project 4, I've started by implementing a buffer
48 cache and plugging it into the existing filesystem.  Along the way I
49 was wondering how we could test the cache.
50
51 Maybe one could adopt a similar testing strategy as in project 1 for
52 the MLQFS scheduler: add a function that reads "get_cache_accesses()"
53 and a function "get_cache_hits()".  Then create a version of pintos
54 that creates access traces for a to-be-determined workload.  Run an
55 off-line analysis that would determine how many hits a perfect cache
56 would have (MAX), and how much say an LRU strategy would give (MIN).
57 Then add a fudge factor to account for different index strategies and
58 test that the reported number of cache hits/accesses is within (MIN,
59 MAX) +/- fudge factor.
60
61 (As an aside - I am curious why you chose to use a clock-style
62 algorithm rather than the more straightforward LRU for your buffer
63 cache implementation in your sample solution. Is there a reason for
64 that?  I was curious to see if it made a difference, so I implemented
65 LRU for your cache implementation and ran the test workload of project
66 4 and printed cache hits/accesses.
67 I found that for that workload, the clock-based algorithm performs
68 almost identical to LRU (within about 1%, but I ran nondeterministally
69 with QEMU). I then reduced the cache size to 32 blocks and found again
70 the same performance, which raises the suspicion that the test
71 workload might not force any cache replacement, so the eviction
72 strategy doesn't matter.)
73
74 Godmar Back <godmar@gmail.com> writes:
75
76 > in your sample solution to P4, dir_reopen does not take any locks when
77 > changing a directory's open_cnt. This looks like a race condition to
78 > me, considering that dir_reopen is called from execute_process without
79 > any filesystem locks held.
80
81 * Get rid of rox--causes more trouble than it's worth
82
83 * Reconsider command line arg style--confuses everyone.
84
85 * Finish writing tour.
86
87 via Godmar Back:
88
89 * Get rid of mmap syscall, add sbrk.
90
91 * page-linear, page-shuffle VM tests do not use enough memory to force
92   eviction.  Should increase memory consumption.
93
94 * Add FS persistence test(s).
95
96 * process_death test needs improvement
97
98 * Internal tests.
99
100 * Improve automatic interpretation of exception messages.
101
102 * Userprog project:
103
104   - Mark read-only pages as actually read-only in the page table.  Or,
105     since this was consistently rated as the easiest project by the
106     students, require them to do it.
107
108   - Don't provide per-process pagedir implementation but only
109     single-process implementation and require students to implement
110     the separation?  This project was rated as the easiest after all.
111     Alternately we could just remove the synchronization on pid
112     selection and check that students fix it.
113
114 * Filesys project:
115
116   - Need a better way to measure performance improvement of buffer
117     cache.  Some students reported that their system was slower with
118     cache--likely, Bochs doesn't simulate a disk with a realistic
119     speed.
120
121 * Documentation:
122
123   - Add "Digging Deeper" sections that describe the nitty-gritty x86
124     details for the benefit of those interested.
125
126   - Add explanations of what "real" OSes do to give students some
127     perspective.
128
129 * Assignments:
130
131   - Add extra credit:
132
133     . Low-level x86 stuff, like paged page tables.
134
135     . Specifics on how to implement sbrk, malloc.
136
137     . Other good ideas.
138
139     . opendir/readdir/closedir
140
141     . everything needed for getcwd()
142
143 To add partition support:
144
145 - Find four partition types that are more or less unused and choose to
146   use them for Pintos.  (This is implemented.)
147
148 - Bootloader reads partition tables of all BIOS devices to find the
149   first that has the "Pintos kernel" partition type.  (This is
150   implemented.)  Ideally the bootloader would make sure there is
151   exactly one such partition, but I didn't implement that yet.
152
153 - Bootloader reads kernel into memory at 1 MB using BIOS calls.  (This
154   is implemented.)
155
156 - Kernel arguments have to go into a separate sector because the
157   bootloader is otherwise too big to fit now?  (I don't recall if I
158   did anything about this.)
159
160 - Kernel at boot also scans partition tables of all the disks it can
161   find to find the ones with the four Pintos partition types (perhaps
162   not all exist).  After that, it makes them available to the rest of
163   the kernel (and doesn't allow access to other devices, for safety).
164
165 - "pintos" and "pintos-mkdisk" need to write a partition table to the
166   disks that they create.  "pintos-mkdisk" will need to take a new
167   parameter specifying the type.  (I might have partially implemented
168   this, don't remember.)
169
170 - "pintos" should insist on finding a partition header on disks handed
171   to it, for safety.
172
173 - Need some way for "pintos" to assemble multiple disks or partitions
174   into a single image that can be copied directly to a USB block
175   device.  (I don't know whether I came up with a good solution yet or
176   not, or whether I implemented any of it.)
177
178 To add USB support:
179
180 - Needs to be able to scan PCI bus for UHCI controller.  (I
181   implemented this partially.)
182
183 - May want to be able to initialize USB controllers over CardBus
184   bridges.  I don't know whether this requires additional work or if
185   it's useful enough to warrant extra work.  (It's of special interest
186   for me because I have a laptop that only has USB via CardBus.)
187
188 - There are many protocol layers involved: SCSI over USB-Mass Storage
189   over USB over UHCI over PCI.  (I may be forgetting one.)  I don't
190   know yet whether it's best to separate the layers or to merge (some
191   of) them.  I think that a simple and clean organization should be a
192   priority.
193
194 - VMware can likely be used for testing because it can expose host USB
195   devices as guest USB devices.  This is safer and more convenient
196   than using real hardware for testing.
197
198 - Should test with a variety of USB keychain devices because there
199   seems to be wide variation among them, especially in the SCSI
200   protocols they support.  Should try to use a "lowest-common
201   denominator" SCSI protocol if any such thing really exists.
202
203 - Might want to add a feature whereby kernel arguments can be given
204   interactively, rather than passed on-disk.  Needs some though.