This is not the current version of the class.

Lecture 3: Multitasking

Task switching

Context switch

Execution context state (abstract)

Execution context state (concrete)

Context switching (concrete)

Example: WeensyOS interrupt

x86-64 interrupts

x86-64 interrupts continued

Notes on x86-64 interrupt path

x86-64 fast system calls

WeensyOS kernel

Kernel task suspension

Implementing kernel task suspension

Solution: Multiple stacks

Multiprocessor

The gs segment

The swapgs instruction

Using swapgs as Intel seems to intend

THIS IS FINE

Voluntary kernel yields