In the future it may make sense to reintroduce it (and test it).
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
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;
#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);
" -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 ();
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;