Select Page

6.828/2018 Homework: Barriers

As always, download barrier.c and read it. main() creates argv[1] number of Pthreads. Each thread does: static void * thread(void *xa) { long n = (long) xa; long delay; int i; for (i = 0; i < 20000; i++) { int t = bstate.round; assert (i == t); barrier();...

6.828/2018 Homework: User-level Threads

If a concurrent thread causes the condition to be true, that thread must either hold the lock on the condition before the sleeping thread acquired it, or after the sleeping thread released it in sleep. If before, the sleeping thread must have seen the new condition...

6.828/2018 Homework: Threads and Locking

Getting familiar with Pthreads. Download ph.c: #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <assert.h> #include <pthread.h> #include <sys/time.h> #define SOL #define NBUCKET 5 #define NKEYS 100000 struct entry { int key; int...

6.828/2018 Lab 3: User Environments

divzero: OK (1.0s)softint: OK (0.7s)badsegment: OK (1.0s)Part A score: 30/30 faultread: OK (0.9s)faultreadkernel: OK (1.0s)faultwrite: OK (1.4s)faultwritekernel: OK (0.5s)breakpoint: OK (3.4s)testbss: OK (4.0s)hello: OK (1.5s)buggyhello: OK (4.5s)buggyhello2: OK...

6.828/2018 Lab 2: Memory Management

K> showmappings 0xef7bc000Virtual Address      Physical Address      Flags0xef7bc000           0x003fd000            ——————U—PK> chpgperm clear 0xef7bc000[0xef7bc000...