Registers

GNU Debugger

Breakpoints and Usage

You probably know you can type `break function_name` (this places a break at the START of the function). Not so useful for concurrency when you might be switching in and out of functions all the time. More useful is `break filename.c:XX`, where XX is line number.

(gdb) break producerconsumer.c:28
Breakpoint 5 at 0x80002bf8: file ../../asst1/producerconsumer.c, line 28.
(gdb) break producerconsumer.c:56
Breakpoint 6 at 0x80002dfc: file ../../asst1/producerconsumer.c, line 56.

Also check out backtrace (bt) and list (l)

Read more >

Memory

Honestly, the diagrams that I wish to reproduce already exist here. Currently this page is in construction and probably will be until I finish my Doctorate.

“Memory is the mother of all wisdom." — Aeschylus

Babbage's Big Brain

Memory as a Hierarchy — Not a Monolith

Hierarchy exists for two intertwined reasons:

  1. Physics – Smaller structures are faster and nearer to ALUs but hold less data; larger structures store more but are farther away and thus slower.
  2. Economics – Fast memory costs disproportionately more per byte.

An efficient system arranges multiple layers so that > the majority of accesses hit the small, fast part, > while the bulk of bytes reside in the large, cheap part.

Read more >