X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=TODO;h=53a7060081310488bf1d7f47e4722f2aba11f4cf;hb=edb2693ddd1f451e190a81da0ddda4df845fb246;hp=95bf2aeb4ff2994762d6440765fb3e85d03eb2f9;hpb=13753f29344700c01d9dc80834e51c7303ed18f7;p=pintos-anon diff --git a/TODO b/TODO index 95bf2ae..53a7060 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,5 @@ -*- text -*- -* Bochs is not fully reproducible. - Godmar says: - In Project 2, we're missing tests that pass arguments to system calls @@ -28,46 +26,6 @@ Add a system call "get_kernel_memory_information". User programs could engage in a variety of activities and notice leaks by checking the kernel memory statistics. ---- - -From: "Godmar Back" -Subject: priority donation tests -To: "Ben Pfaff" -Date: Fri, 3 Mar 2006 11:02:08 -0500 - -Ben, - -it seems the priority donation tests are somewhat incomplete and allow -incorrect implementations to pass with a perfect score. - -We are seeing the following wrong implementations pass all tests: - -- Implementations that assume locks are released in the opposite order -in which they're acquired. The students implement this by -popping/pushing on the donation list. - -- Implementations that assume that the priority of a thread waiting on -a semaphore or condition variable cannot change between when the -thread was blocked and when it is unblocked. The students implement -this by doing an insert into an ordered list on block, rather than -picking the maximum thread on unblock. - -Neither of these two cases is detected; do you currently check for -these mistakes manually? - -I wrote a test that checks for the first case; it is here: -http://people.cs.vt.edu/~gback/pintos/priority-donate-multiple-2.patch - -[...] - -I also wrote a test case for the second scenario: -http://people.cs.vt.edu/~gback/pintos/priority-donate-sema.c -http://people.cs.vt.edu/~gback/pintos/priority-donate-sema.ck - -I put the other tests up here: -http://people.cs.vt.edu/~gback/pintos/priority-donate-multiple2.c -http://people.cs.vt.edu/~gback/pintos/priority-donate-multiple2.ck - From: "Godmar Back" Subject: multiple threads waking up at same clock tick To: "Ben Pfaff" @@ -103,82 +61,6 @@ I actually tested it and it's hard to pass with the current ips setting. The bounds on how quickly a thread would need to be able to return after sleep appear too tight. Need another idea. ---- -From: "Waqar Mohsin" -Subject: 3 questions about switch_threads() in switch.S -To: blp@cs.stanford.edu, joshwise@stanford.edu -Date: Fri, 3 Mar 2006 17:09:21 -0800 - -QUESTION 2 - - # This stack frame must match the one set up by thread_create(). - pushl %ebx - pushl %ebp - pushl %esi - pushl %edi - -I find the comment confusing. thread_create() is a special case: the set of -registers popped from switch_threads stack frame for a newly created thread -are all zero, so their order shouldn't dictate the order above. - -I think all that matters is that the order of pops at the end of -switch_threads() is the opposite of the pushes at the beginning (as shown -above). - -QUESTION 3 - -Is it true that struct switch_threads_frame does NOT strictly require - - struct thread *cur; /* 20: switch_threads()'s CUR argument. */ - struct thread *next; /* 24: switch_threads()'s NEXT argument. */ -at the end ? - -When a newly created thread's stack pointer is installed in switch_threads(), -all we do is pop the saved registers and return to switch_entry() which pops -off and discards the above two simulated (and not used) arguments to -switch_threads(). - -If we remove these two from struct switch_threads_frame and don't do a - - # Discard switch_threads() arguments. - addl $8, %esp -in switch_entry(), things should still work. Am I right ? - -Thanks -Waqar - -From: "Godmar Back" -Subject: thread_yield in irq handler -To: "Ben Pfaff" -Date: Wed, 22 Feb 2006 22:18:50 -0500 - -Ben, - -you write in your Tour of Pintos: - -"Second, an interrupt handler must not call any function that can -sleep, which rules out thread_yield(), lock_acquire(), and many -others. This is because external interrupts use space on the stack of -the kernel thread that was running at the time the interrupt occurred. -If the interrupt handler tried to sleep and that thread resumed, then -the two uses of the single stack would interfere, which cannot be -allowed." - -Is the last sentence really true? - -I thought the reason that you couldn't sleep is that you would put -effectively a random thread/process to sleep, but I don't think it -would cause problems with the kernel stack. After all, it doesn't -cause this problem if you call thread_yield at the end of -intr_handler(), so why would it cause this problem earlier. - -As for thread_yield(), my understanding is that the reason it's called -at the end is to ensure it's done after the interrupt is acknowledged, -which you can't do until the end because Pintos doesn't handle nested -interrupts. - - - Godmar - From: "Godmar Back" For reasons I don't currently understand, some of our students seem @@ -281,32 +163,15 @@ Godmar Back writes: * Finish writing tour. -* Introduce a "yield" system call to speed up the syn-* tests. - via Godmar Back: -* Project 3 solution needs FS lock. - * Get rid of mmap syscall, add sbrk. -* Make backtrace program accept multiple object file arguments, - e.g. add -u option to allow backtracing user program also. - * page-linear, page-shuffle VM tests do not use enough memory to force eviction. Should increase memory consumption. * Add FS persistence test(s). -* lock_acquire(), lock_release() don't need additional intr_dis/enable - calls, because the semaphore protects lock->holder. - [ Think this over: is this really true when priority donation is - implemented? intr_dis/enable prevents the race with thread_set_priority. - Leaving it there could help the students getting the correct synchronization - right. - ] - - - * process_death test needs improvement * Internal tests. @@ -353,3 +218,66 @@ via Godmar Back: . opendir/readdir/closedir . everything needed for getcwd() + +To add partition support: + +- Find four partition types that are more or less unused and choose to + use them for Pintos. (This is implemented.) + +- Bootloader reads partition tables of all BIOS devices to find the + first that has the "Pintos kernel" partition type. (This is + implemented.) Ideally the bootloader would make sure there is + exactly one such partition, but I didn't implement that yet. + +- Bootloader reads kernel into memory at 1 MB using BIOS calls. (This + is implemented.) + +- Kernel arguments have to go into a separate sector because the + bootloader is otherwise too big to fit now? (I don't recall if I + did anything about this.) + +- Kernel at boot also scans partition tables of all the disks it can + find to find the ones with the four Pintos partition types (perhaps + not all exist). After that, it makes them available to the rest of + the kernel (and doesn't allow access to other devices, for safety). + +- "pintos" and "pintos-mkdisk" need to write a partition table to the + disks that they create. "pintos-mkdisk" will need to take a new + parameter specifying the type. (I might have partially implemented + this, don't remember.) + +- "pintos" should insist on finding a partition header on disks handed + to it, for safety. + +- Need some way for "pintos" to assemble multiple disks or partitions + into a single image that can be copied directly to a USB block + device. (I don't know whether I came up with a good solution yet or + not, or whether I implemented any of it.) + +To add USB support: + +- Needs to be able to scan PCI bus for UHCI controller. (I + implemented this partially.) + +- May want to be able to initialize USB controllers over CardBus + bridges. I don't know whether this requires additional work or if + it's useful enough to warrant extra work. (It's of special interest + for me because I have a laptop that only has USB via CardBus.) + +- There are many protocol layers involved: SCSI over USB-Mass Storage + over USB over UHCI over PCI. (I may be forgetting one.) I don't + know yet whether it's best to separate the layers or to merge (some + of) them. I think that a simple and clean organization should be a + priority. + +- VMware can likely be used for testing because it can expose host USB + devices as guest USB devices. This is safer and more convenient + than using real hardware for testing. + +- Should test with a variety of USB keychain devices because there + seems to be wide variation among them, especially in the SCSI + protocols they support. Should try to use a "lowest-common + denominator" SCSI protocol if any such thing really exists. + +- Might want to add a feature whereby kernel arguments can be given + interactively, rather than passed on-disk. Needs some though.