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0d/F"Elp(O?s8O3R)\%&o80Fl71uQ_J:(IIbLHH-tZClrB)E:/G%9J3]TRd^E +MKBCtF:h9PMKgO<4 ,+hHG-QOQRF\0qo3XmJ:ddXml^Bc"PJNs1O?6;Kr?`3o# +lLGC&GVG#&L62/eI`#TeCc3+Qp)=,?2B*/LAfD2.6Qe+=*/7;Pj,QBUa>AoKq&Hmu +Km3@RD`E`Z=QOg08&D@..Lfd^Ab2<1i.<2H8.\J4r/ZF85ob=[!XXOr&b&(?YYW@% +"nipcr-Jo4s'bq9Da9GEs6rN#5`q)!hLP_3o9eLQJe3JDrX^7B@"eXb#X/eC_6,!c +6']N,O7&?j^]XX&~> +EI +Q +BT +286.08 414 TD +0 0 0 rg +/N8 12 Tf +-0.0086 Tc +0.0326 Tw +(Figure 2)Tj +ET +PDFVars/TermAll get exec end end +userdict /pgsave get restore +showpage +%%PageTrailer +%%EndPage +%%Trailer +%%DocumentProcessColors: Cyan Magenta Yellow Black +%%EOF diff --git a/doc/threads.texi b/doc/threads.texi index c604b96..4341cac 100644 --- a/doc/threads.texi +++ b/doc/threads.texi @@ -32,8 +32,10 @@ primitives (semaphores, locks, and condition variables). @c FIXME: base system doesn't do anything. Debugger sucks. However, there's a lot of magic going on in some of this code, so you should compile and run the base system to see a simple test of the -code. You should trace the execution using your favorite debugger to -get a sense for what's going on. +code. You should read through the source code by hand to see what's +going on. If you like, you can add calls to @code{printf()} almost +anywhere, then recompile and run to see what happens and in what +order. When a thread is created, you are creating a new context to be scheduled. You provide a function to be run in this context as an @@ -52,8 +54,8 @@ synchronization primitives are used to force context switches when one thread needs to wait for another thread to do something. The exact mechanics of a context switch are pretty gruesome and have -been provided for you in @file{switch.S} (this is 80@var{x}86 -assembly; don't worry about understanding it). It involves saving the +been provided for you in @file{threads/switch.S} (this is 80@var{x}86 +assembly; don't worry about understanding it). It involves saving the state of the currently running thread and restoring the state of the thread we're switching to. @c FIXME @@ -263,9 +265,9 @@ However, you do need to implement priority scheduling in all cases. @section Problem 1-4 Advanced Scheduler Implement Solaris's multilevel feedback queue scheduler (MFQS), as -explained below, to reduce the average response time for running jobs -on your system. -@c FIXME need link +explained in this @uref{mlfqs.pdf, , PDF} or @uref{mlfqs.ps, , +PostScript} file, to reduce the average response time for running jobs +on your system. Demonstrate that your scheduling algorithm reduces response time relative to the original Pintos scheduling algorithm (round robin) for diff --git a/doc/userprog.texi b/doc/userprog.texi index 2b7edb4..f80a80c 100644 --- a/doc/userprog.texi +++ b/doc/userprog.texi @@ -516,6 +516,10 @@ restore registers before and after a function call, you need to write the stack pointer, you have a couple of jumps which probably wrecks some of your caches. This is why inlining code can be much faster. +@menu +* Argument Passing to main:: +@end menu + @node Argument Passing to main @subsection Argument Passing to @code{main()} diff --git a/doc/vm.texi b/doc/vm.texi index 812915e..84b0752 100644 --- a/doc/vm.texi +++ b/doc/vm.texi @@ -570,13 +570,13 @@ length, and then use Mmap: #include int main (void) -{ +@{ void *addr = (void *) 0x10000000; int fd = open ("foo"); int length = filesize (fd); if (mmap (fd, addr, length)) printf ("success!\n"); -} +@} @end example Suppose @file{foo} is a text file and you want to print the first 64 -- 2.30.2