Skip to content
Snippets Groups Projects
Select Git revision
  • 3d9a8a8b94cea2e04288b7c5f42645bc9452af2b
  • main default protected
2 results

concurrent-search

  • Clone with SSH
  • Clone with HTTPS
  • Exercise 1.3

    This is a solution to exercise 1.3 (Concurrent Search) of the hands-on training of lecture distributed systems.

    The folder contains a gradle project. The project implements a simple concurrent search algorithm (see exercise for details).

    Pass the following parameters when starting the program:

    • args[0]: Size of list N
    • args[1]: Element to search for n
    • args[2]: Number of threads p

    Start the iterative server from a CLI (like bash, cmd, powershell) as follows:

    • $ gradle run --args="50000000 80 8"

    That will work, if gradle is installed on your system, otherwise use the gradle wrapper contained in the folder (gradlew.bat, gradlew).

    In this example the algorithm uses 8 threads to find the positions of number 8 in a list of numbers of size 50.000.000.

    In the end, the programm will print the result and the running time to the screen.