#include “tests/vm/qsort.h” #include #include #include /* Picks a pivot for the quicksort from the SIZE bytes in BUF. */ static unsigned char pick_pivot (unsigned char…
/* The main thread acquires locks A and B, then it creates two higher-priority threads. Each of these threads blocks acquiring one of the locks…
## Exercise Chapter 3 ## Problem 4 ## Background set.seed(109) # Set the “seed” of the random number generators n
#include #include #include #include #include #include #include #include #include “threads/palloc.h” #include “threads/loader.h” #include “threads/semaphore.h” #include “threads/lock.h” #include “threads/condvar.h” #include “threads/vaddr.h” /* Page allocator. Hands out…
Midterm • My Student ID is 35634617. The value of • Summarize the main contribution of the paper: In this paper, the authors study the…
# -*- perl -*- use strict; use warnings; use tests::tests; use tests::random; check_archive ({“testme” => [random_bytes (72943)]}); pass;
/* Child process for mmap-inherit test. Tries to write to a mapping present in the parent. The process must be terminated with -1 exit code.…
/* Starts 60 threads numbered 0 through 59. Thread #i sleeps for (10+i) seconds, then spins in a loop for 60 seconds, then sleeps until…
#ifndef THREADS_INTERRUPT_H #define THREADS_INTERRUPT_H #include #include /* Interrupts on or off? */ enum intr_level { INTR_OFF, /* Interrupts disabled. */ INTR_ON /* Interrupts enabled. */…
/* Try to write to the code segment. The process must be terminated with -1 exit code. */ #include “tests/lib.h” #include “tests/main.h” void test_main (void)…