11. Threads
Review the presentation Threads
Tasks
- Explore the jtm.activity11 package
- View Activity11.png to understand the design and three different approaches to filling arrays.
- Implement the ArrayFiller and ArrayFillerManager classes to pass unit tests.
To check the processor load, run the command top or System monitor.
You can also add a CPU monitor:
- Right-click on an empty space on the panel, select Panel — Add new Items..
- Select CPU Graph and press Add.
- Then left-click on CPU graph to open the task manager.
You can also install gnome-system-monitor):
sudo apt install gnome-system-monitorThen run Start menu — System — System monitor.
To kill unresponsive threads (with Eclipse):
killall -9 java
You can implement latency with the Thread.sleep(latency); method.