Concurrent Implementation
- f k-NN for WLAN
Positioning
Eros Gulo Department of Earth and Space Science, York University December 1st, 2015
Concurrent Implementation of k-NN for WLAN Positioning Eros Gulo - - PowerPoint PPT Presentation
Concurrent Implementation of k-NN for WLAN Positioning Eros Gulo Department of Earth and Space Science, York University December 1 st , 2015 FINAL CONCURRENT IMPLEMENTATION 1. Create a Thread Pool with a user-specified amount of distance
Eros Gulo Department of Earth and Space Science, York University December 1st, 2015
1. Create a Thread Pool with a user-specified amount of distance calculation threads. 2. Allocate arrays to hold all computed distances and their respective indices. 3. Initialize a CyclicBarrier to pause the main thread until distance calculations are complete. 4. Split up the distance calculations among the threads in the thread pool, passing to them the indices of their respective reference fingerprints. Start the distance calculation threads. 5. Each thread calculates its respective distances then writes them to its allocated section of the distance array, then it calls await() on the CyclicBarrier. 6. Main thread calls await() after starting up the distance calculation threads, the CyclicBarrier allows it to proceed once all distance calculation threads have also called await(). 7. Main thread sorts the distances (while keeping track of their reference location indices) then returns the k reference location indices corresponding to the k-smallest distances.
0.5 1 1.5 2 2.5 3 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Absolute Fingerprints) on MacBook (Dual-Core CPU)
Z3 N4 N5
200 400 600 800 1000 1200 1400 1600 1800 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Difference Fingerprints) on MacBook (Dual-Core CPU)
Z3 N4 N5
0.5 1 1.5 2 2.5 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Absolute Fingerprints) on Windows Desktop (Quad-Core CPU)
Z3 N4 N5
200 400 600 800 1000 1200 1400 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Difference Fingerprints) on Windows Desktop (Quad-Core CPU)
Z3 N4 N5
0.5 1 1.5 2 2.5 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Absolute Fingerprints) on Navy (Octa-Core CPU)
Z3 N4 N5
200 400 600 800 1000 1200 1400 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Difference Fingerprints) on Navy (Octa-Core CPU)
Z3 N4 N5
0.5 1 1.5 2 2.5 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Absolute Fingerprints) on Manycore Tes7ng Lab
Z3 N4 N5
200 400 600 800 1000 1200 1400 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Difference Fingerprints) on Manycore Tes7ng Lab
Z3 N4 N5
50 100 150 200 250 300 350 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Difference Fingerprints - N5 Dataset) on Manycore Tes7ng Lab
Thread Pool Off Thread Pool On
1 2 3 4 5 6 7 8 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Absolute Fingerprints - N5 Dataset) on Manycore Tes7ng Lab
Thread Pool Off Thread Pool On
1 2 3 4 5 6 7 8 9 10 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Absolute Fingerprints - N5 Dataset) on MacBook
Thread Pool Off Thread Pool On
2 4 6 8 10 12 14 8 16 24 32 40 48 56 64 72 80 88 96 104
Mean Computa7on Time Per Posi7on Es7mate (ms) Threads Used
Mean Computa7on Time Per Posi7on Es7mate (Absolute Fingerprints - N5 Dataset) on Navy
Thread Pool Off Thread Pool On