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