Files
talks/README.org
T
2026-10-27 14:04:13 +00:00

2.3 KiB

Talks

Slides and example code from two technical presentations given in 2020.

Slides use org-mode, and were presented in Emacs with org-present.

Concurrency (June 2020)

Introduction to concurrency.

Slides

  • Sequential vs. concurrent execution, I/O latency, interrupts, and cooperative vs. preemptive scheduling
  • Concurrency vs. parallelism, processes vs. threads, and language runtimes (C, JavaScript event loop, Go scheduler)
  • Shared memory synchronization vs. message passing, backpressure, and distributed data races

Examples

  • temperatures: concurrent HTTP requests fetching city temperatures from OpenWeatherMap.
  • mutex: data race demonstration and mutual exclusion on a shared bank account balance (go run -race ./main.go).
  • csp: pipeline of goroutines and channels reading a CSV of zip codes, querying weather data with a concurrency limiter, and displaying a live top-ten leaderboard.

Running Go examples

# Mutex example (with and without race detector):
cd concurrency/cmd/mutex
go run ./main.go
go run -race ./main.go

# Weather examples (require an OpenWeatherMap API key):
export OPEN_WEATHER_MAP_API_KEY="..."
cd concurrency/cmd/temperatures && go run .
cd concurrency/cmd/csp && go run .

x86 Assembly (November 2020)

A brief tour of x86-64 assembly on Linux.

Slides

  • Compilation pipeline, ISAs, CPU registers, and Linux system calls
  • Instructions, addressing modes, control flow, and memory safety
  • Virtual memory, the stack, function prologues/epilogues, and the System V AMD64 ABI calling convention

Examples

  • exit: minimal program invoking the exit system call.
  • math: basic arithmetic instructions (mov, add, sub, mul, div), inspected via exit status.
  • control-flow: loops, comparisons (cmp), and conditional/unconditional jumps (je, jmp).
  • hello-world: writing a string from the .data section to stdout with the write system call.
  • safety: out-of-bounds memory overwrite across adjacent .data buffers.
  • stack: pushing bytes onto the stack and printing from %rsp.
  • func: function call, stack frame setup (%rbp / %rsp), and return.

Running x86-64 examples

as exit.s -o exit.o
ld exit.o -o exit
./exit
echo $?