From: Ben Pfaff Date: Tue, 3 Jan 2006 16:50:59 +0000 (+0000) Subject: Get rid of -rndpg option for now, because none of the tests use it. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97c0fe728053129a23dfc556e96fdf4000e7017f;p=pintos-anon Get rid of -rndpg option for now, because none of the tests use it. In the future it may make sense to reintroduce it (and test it). --- diff --git a/doc/vm.texi b/doc/vm.texi index acda932..733a830 100644 --- a/doc/vm.texi +++ b/doc/vm.texi @@ -422,13 +422,6 @@ I/O, in the meantime processes that do not fault should continue executing and other page faults that do not require I/O should be able to complete. These criteria require some synchronization effort. -Write your code so that we can choose a page replacement policy at -Pintos startup time. By default, the LRU-like algorithm must be in -effect, but we must be able to choose random replacement by invoking -@command{pintos} with the @option{-rndpg} option. Passing this option -sets @code{enable_random_paging}, declared in @file{threads/init.h}, to -true. - @node Lazy Loading @subsection Lazy Loading diff --git a/src/threads/init.c b/src/threads/init.c index e2f6379..a899921 100644 --- a/src/threads/init.c +++ b/src/threads/init.c @@ -45,13 +45,6 @@ uint32_t *base_page_dir; If true, use multi-level feedback queue scheduler. */ bool enable_mlfqs; -#ifdef VM -/* -rndpg: - If false (default), use LRU page replacement policy. - If true, use random page replacement policy. */ -bool enable_random_paging; -#endif - #ifdef FILESYS /* -f: Format the filesystem? */ static bool format_filesys; @@ -257,10 +250,6 @@ parse_options (char **argv) #ifdef USERPROG else if (!strcmp (name, "-ul")) user_page_limit = atoi (value); -#endif -#ifdef VM - else if (!strcmp (name, "-rndpg")) - enable_random_paging = true; #endif else PANIC ("unknown option `%s' (use -h for help)", name); @@ -366,9 +355,6 @@ usage (void) " -mlfqs Use multi-level feedback queue scheduler.\n" #ifdef USERPROG " -ul=COUNT Limit user memory to COUNT pages.\n" -#endif -#ifdef VM - " -rndpg Use random page replacement policy.\n" #endif ); power_off (); diff --git a/src/threads/init.h b/src/threads/init.h index 45e9545..4455c21 100644 --- a/src/threads/init.h +++ b/src/threads/init.h @@ -17,13 +17,6 @@ extern uint32_t *base_page_dir; If true, use multi-level feedback queue scheduler. */ extern bool enable_mlfqs; -#ifdef VM -/* -o random-paging: - If false (default), use LRU page replacement policy. - If true, use random page replacement policy. */ -extern bool enable_random_paging; -#endif - /* -q: Power off when kernel tasks complete? */ extern bool power_off_when_done;