# Linux Kernel Module Cheat

##### 24.16.6.1. gem5 Ruby MI_example protocol

This is the simplest of all protocols, and therefore the first one you should study to learn how Ruby works.

To study it, we can take an approach similar to what was done at: gem5 event queue AtomicSimpleCPU syscall emulation freestanding example analysis with caches and multiple CPUs.

Our full command line will be something like

    ./build-gem5 --arch aarch64 --gem5-build-id MI_example
    ./run \
      --arch aarch64 \
      --cli-args '2 100' \
      --cpus 3 \
      --emulator gem5 \
      --userland userland/cpp/atomic/aarch64_add.cpp \
      --gem5-build-id MI_example \
      -- \
      --ruby \
    ;

which produces a `config.dot.svg` like the following by with 3 CPUs instead of 2:

Figure 2. `config.dot.svg` for a system with three TimingSimpleCPU CPUs with the Ruby `MI_example` protocol.