If it is not explicitly told in following recipe, setting up services are described for Ubuntu 20.04 server, but applications are described for Xubuntu 20.04 workstation. If you use different Ubuntu version or Linux distribution, settings as well as content, names and places of configuration files may be different!
Got it.

12. Threads

  1. Review presentation Threads

    Practical exercise

  2. Investigate jtm.activity12 package
  3. Look at Activity12.png to understand design and 3 different approaches of array filling
  4. Implement classes ArrayFiller, and ArrayFillerManager to pass unit tests

lightbulb To check load on processor, run top command or System monitor.
Additionally you can add CPU monitor:

  1. Right click on free space of the panel, select Panel — Add new Items..
  2. Select CPU Graph and press Add.
  3. Then left click on CPU graph to open task manager.
  4. You can also install gnome-system-monitor:

    sudo apt install gnome-system-monitor

    Then run Start menu — System — System monitor.

lightbulb To kill non-responding threads together with Eclipse, enter command:

killall -9 java

lightbulb You implement latency with Thread.sleep(latency); method

Optional task

  1. Try to analyse execution of fillParalelly() method step-by-step in Eclipse Debugger.
  2. Compare it with debugging experience by writing informative messages into standard output by System.out.println() and step-by-step analysis of produced output after execution of your program.

Alternative


  

Created by Valdis Vītoliņš on 2017-01-03 08:07
Last modified by Valdis Vītoliņš on 2024-01-19 14:56
 
Xwiki Powered
Creative Commons Attribution 3.0 Unported License