Solutions to exercises in The Art of Multiprocessor Programming (available for purchase here).
Using the following technology:
- C++ (gcc 10)
- Java (JDK 14)
See a hint of how many threads can be run with machine_check.cpp
. My machine can
run 4
threads. How about yours?
- Compile without thread sanitizers
g++ -std=c++17 -I ./include/ ./lib/*.cpp ./main/main.cpp -lpthread
- Compile the includes into a jar
jar cf includes.jar include/*.java
- Compile with correct classpath
javac -cp ".:includes.jar;" Main.java