Virtual Memory



translation lookaside buffer (TLB)



TLB implementation



Memory Cache



Cache Behavior



Cache Organization



Cache Access



context switch



context switch implementation



homework



main.c

#include <unistd.h>

extern int create(void f(), char * stack);
extern void ctswitch();

int t1, t2 = 0;

void f1 () {
  while (1) {
    printf ("thread 1\n");
    sleep (1);
    ctswitch (t2);
  }
}

void f2 () {
  while (1) {
    printf ("thread 2\n");
    sleep (1);
    ctswitch (t1);
  }
}

main () {
  char stack1 [10000], stack2 [10000];
  t1 = create (f1, stack1);
  t2 = create (f2, stack2);
  ctswitch (t1);
}



Preview of the rest of the course