Abstract: In an overhead-aware schedulability study, we show how schedulability improves when using the NJLP (this work) compared to using the FMLP in non-job-level fixed-priority (non-JLFP) systems. The NJLP is the first non-JLFP-compatible locking protocol that obtains an asymptotically optimal \(O(m)\) pi-blocking (priority-inversion blocking) bound compared to the \(O(n)\) from the FMLP, where \(m\) is the number of processors and \(n\) is the number of tasks in the system. First, we graphically visualize the improved theoretical blocking time bounds. Second, overhead data is collected on real hardware where generated graphs help visualize the overhead cost of the NJLP. Lastly, the third experiment conducts the overhead-aware schedulability study using the EDZL scheduler and the overhead data collected in the second experiment.
This artifact evaluates the tradeoff between the NJLP's increased overhead costs and lower pi-blocking bound compared to the FMLP's lower overhead cost but higher pi-blocking bound.
There are three experiments central to this work.
The first experiment is a theoretical visualization of the difference between the pi-blocking of this work and the FMLP.
The second experiment obtains overhead data under EDZL-NJLP and EDZL-FMLP.
The third experiment uses the overhead data to perform a schedulability study.
In the tabs above, we specify the system requirements for each experiment and references in the paper.
Note that experiments 2 and 3 will require moving files from a machine with python2 to a machine with python3. Some examples of how this can be easily accomplished is in the moving files section.
The first experiment requires python3, matplotlib, and numpy. You can run it on any OS with a desktop environment.
This experiment references Fig. 8 (below).
The second experiment is more involved as it requires real hardware for accurate results. To ease the artifact evaluation process, we provide three methods to derive overheads.
(1) We provide a qemu virtual machine image.
(2) We provide a virtualbox machine image.
(3) We provide instructions on how the experiment can be set up from scratch.
If setting up the machine from scratch, you will need at least 4gb ram, 6 cores (not threads), and 128gb of disk space. We target Ubuntu 20.04.6 (the server install image).
The third experiment is a schedulability study. The data from the second experiment is required. You can also use the pre-generated data, provided in the instructions for experiment 3.
For plotting, we require python3, matplotlib, and numpy.
The schedulability study requires g++ and c++14 support.
This experiment references Fig. 10 (below).
The purpose of this experiment is to visualize the pi-blocking difference obtained from subtracting the maximum pi-blocking due to the NJLP from the maximum pi-blocking due to the FMLP. As such, positive values show where the NJLP does better than the FMLP.
Requirements: python3, matplotlib, numpy, and any window manager that can render matplotlib.
First, download plot_blocking.py.
Usage: python plot_blocking.py lg2mmax nmax lmax
lg2mmax: plots are made for the last four \(m\in\{1,2,4,8,...,2^k\}\) where \(k=lg2mmax-1\).
nmax: the maximum number of tasks where a data point exists for every \(n\in[1,nmax]\).
lmax: the maximum length of a critical section.
To generate the exact same graph as the paper, use: python plot_blocking.py 4 60 1

Download the qemu images here (4.28 GB).
To launch the image: sudo ./start_vm.sh
Username: test
Password: NJLP
The experiments folder is: /home/ztong/RTAS25
Download the virtual box image as either an ova (12.31 GB) or 7z (6.29 GB).
To launch the image, import it in VirtualBox, then press play.
Username: njlp
Password: realtime
The experiments folder is: ~/experiments
Most of these instructions are similar to the ones found on LitmusRT webpage. For convenience, we repeat the instructions here. For the best results, consider disabling SMT/hyperthreading.
(1) Install Ubuntu 20.04.6 server install image from https://releases.ubuntu.com/focal/.
sudo apt update
sudo apt upgrade
sudo apt install bc bison dwarves flex gcc git libelf-dev libncurses-dev libssl-dev make
cd ~
mkdir litmus
cd litmus
git clone https://github.com/MarkovInequality/litmus-rt-NJLP
cd ~/litmus/litmus-rt-NJLP
cp /boot/config-`uname -r` .config
make menuconfig
General setup- Local Version- add an identifier for your kernel (e.g. njlp)
General setup- Timers subsystem- Timer tick handling- Periodic timer ticks (constant rate, no dynticks)
General setup- Preemption Model- Preemptible Kernel (Low-Latency Desktop)
General setup- (uncheck) Automatic process group scheduling
General setup- Control group support- Cpu controller- (uncheck) Group scheduling for SCHED_OTHER
Power management and ACPI options- (disable) Suspend to RAM and standby
Power management and ACPI options- (disable) Hibernation (aka 'suspend to disk')
Power management and ACPI options- (disable) Opportunistic sleep
Cryptographic API- Certificates for signature checking- Provide system-wide ring of trusted keys
Default is "debian/canonical-certs.pem"
Press enter on the Additional X.509 keys for default system keyring
Erase "debian/canonical-certs.pem" and leave it empty
LITMUS^RT- Real-Time Synchronization- Support for real-time locking should be on
make bzImage -j [core count]
(e.g. make bzImage -j 6)
make modules -j [core count]
sudo make INSTALL_MOD_STRIP=1 modules_install
sudo make install
sudo vim /etc/default/grub
-- Change GRUB_DEFAULT=0 to
-- GRUB_DEFAULT=saved
-- Add GRUB_SAVEDEFAULT=true
-- Change GRUB_TIMEOUT_STYLE=hidden to
-- GRUB_TIMEOUT_STYLE=menu
-- Change GRUB_TIMEOUT=0 to
-- GRUB_TIMEOUT=5
sudo update-grub
sudo reboot
sudo apt update && sudo apt upgrade
cd ~/litmus
git clone https://github.com/MarkovInequality/liblitmus-NJLP
cd liblitmus-NJLP
vim Makefile
-- Make sure your LITMUS_KERNEL is pointing to the right directory.
-- (e.g. /home/username/litmus/litmus-rt-NJLP)
cd ~/litmus/liblitmus
sudo apt install python g++ unzip
make
cd ~/litmus
git clone https://github.com/LITMUS-RT/feather-trace-tools
cd feather-trace-tools
vim Makefile
-- Make sure the LITMUS variable is pointing to the right liblitmus directory
-- (e.g. LITMUS ?= /home/username/litmus/liblitmus)
make
mkdir ~/experiments
cd ~/experiments
wget https://www.cs.unc.edu/~swali/rtas25/njlp-tests-dist.zip
unzip njlp-tests-dist.zip
vim test_overhead.py
-- Make sure the LIBLITMUS and FEATHER_TRACE directories point to the proper location
-- (e.g. LIBLITMUS = "/home/username/litmus/liblitmus" and FEATHER_TRACE = "/home/username/litmus/feather-trace-tools")
cd ~/experiments/taskgen
sudo make
cd ..
python2 get-pip.py
echo 'export PATH=$PATH:/home/username/.local/bin' >> ~/bashrc
source ~/.bashrc
pip install numpy
-- We do this again because many things run in sudo
sudo visudo
-- Add ":/home/username/.local/bin" to "Defaults secure_path=..."
sudo python2 get-pip.py
sudo pip install numpy
Requirements: python3, matplotlib, numpy, g++ (c++14 support), make, and overhead data from experiment 2.
You may also download prerecorded overhead data from exp2-results.zip. Note, overhead generation was done with python2, and as such, the results from experiment 2 need to be moved to a system with python3.
This schedulability study determines how frequently schedulable the same task set is when utilizing the NJLP versus the FMLP. Because the NJLP is intended for non-job-level-fixed-priority schedulers, we use the EDZL schedulability test by Lee and Shin (2012). We use the same task generation as experiment 2 (Emberson et. al.).
Task set generation information: Task sets were randomly generated with the number of tasks \(n\) randomly selected from \([2m, 25]\) (small), \([4m, 50]\) (medium), or \([8m, 100]\) (large), and \emph{normalized utilization}, \(\sum_{i = 1}^{n}\frac{C_i}{T_i \cdot m}\), in \(\{0.2, 0.3, ..., 0.9\}\). Each task's utilization was generated using the method from Emberson et. al., and its period is selected randomly from \([3, 33]ms\) (short), \([10, 100]ms\) (moderate), or \([50, 500]ms\) (long). Each task was defined to have an implicit deadline, \(D_i = T_i\), and its execution cost was obtained by multiplying its utilization and period.
As described in the paper, overheads are added to the task set. Then, schedulability is determined for each of the tasks described above for both the NJLP and FMLP.
(1) Download exp3.zip, extract, and compile.
mkdir ~/experiments/exp3
cd ~/experiments/exp3
wget https://www.cs.unc.edu/~swali/rtas25/exp3.zip
unzip exp3.zip
make
(2) Usage: ./edzl_test folder csvname blocking
folder: the folder that contains experiment 2's results.
csvname: for NJLP, the csvname will be EDZL-NJLP_stats.csv, FMLP will be EDZL_stats.csv.
blocking: for NJLP, 1, for FMLP, 0.
Generate schedulability tests for both the FMLP and NJLP.
sudo ./edzl_test ../ EDZL_stats.csv 0
* We use sudo here because the overhead files are likely still owned by root, but if you change permissions, you do not need to sudo.
sudo ./edzl_test ../ EDZL-NJLP_stats.csv 1
python plot_schedulability.py

When using either a virtual machine image or bare metal hardware, you will need to move files back and forth between that machine and a machine that has python3. This is because overhead data is gathered using a machine that uses python2 because feather-trace-tools also requires python2 while the graph generation uses python3. To make sure there are no issues with this, we suggest the following ways to move files out of the vm/ssh machine.
scp user@host:/path/to/folder/* /localpath/to/folderscp user@host:/path/to/file /localpath/to/filesudo apt install openssh-serversudo apt install openssh-server