Concurrent Implementation of k-NN for WLAN Positioning Eros Gulo - - PowerPoint PPT Presentation

concurrent implementation of k nn for wlan positioning
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Concurrent Implementation

  • f k-NN for WLAN

Positioning

Eros Gulo Department of Earth and Space Science, York University December 1st, 2015

slide-2
SLIDE 2

FINAL CONCURRENT IMPLEMENTATION

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.

slide-3
SLIDE 3

TESTING ENVIRONMENT (COMPUTERS)

MacBook Pro with a Dual-Core, 2.4 GHz, 64-bit CPU (Intel Core 2 Duo). Windows Desktop with a Quad-Core, 2.83 GHz, 64-bit CPU (Intel Core 2 Quad Q9550). Navy with an Octa-Core CPU (specifics unknown). Manycore Testing Lab node with 40 processors/cores.

slide-4
SLIDE 4

TESTING ENVIRONMENT (JVM PARAMETERS)

Heap size set to 512 MB corresponding to largest heap size allowed on Android. Server mode for best runtime performance. JVM set to 64-bit since tests were performed on 64-bit machines.

slide-5
SLIDE 5

TESTING ENVIRONMENT (DATASETS)

Reference database made up of 104 discrete locations, each represented by an averaged reference fingerprint. N5 testing dataset has approx. 3100 query fingerprints. N4 testing dataset has approx. 1300 query fingerprints. Z3 testing dataset has approx. 800 query fingerprints.

  • Approx. 50 – 80 AP’s visible at each discrete location, at

least 10 – 20 visible in every WLAN scan. Up to 3000 AP signal differences!

slide-6
SLIDE 6

VARIABLES TESTED

Mean Computation Time Per Position Estimate is the dependent variable that I measured. Number of Threads used for the computation is the main independent variable that I varied throughout the tests. The use of a Thread Pool was a secondary independent variable that I varied throughout the tests.

slide-7
SLIDE 7

EXPERIMENTAL RESULTS ON MACBOOK

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

slide-8
SLIDE 8

EXPERIMENTAL RESULTS ON MACBOOK

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

slide-9
SLIDE 9

EXPERIMENTAL RESULTS ON WINDOWS DESKTOP

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

slide-10
SLIDE 10

EXPERIMENTAL RESULTS ON WINDOWS DESKTOP

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

slide-11
SLIDE 11

EXPERIMENTAL RESULTS ON NAVY

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

slide-12
SLIDE 12

EXPERIMENTAL RESULTS ON NAVY

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

slide-13
SLIDE 13

EXPERIMENTAL RESULTS ON MTL

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

slide-14
SLIDE 14

EXPERIMENTAL RESULTS ON MTL

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

slide-15
SLIDE 15

IMPACT OF RE-USING THREADS

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

slide-16
SLIDE 16

IMPACT OF RE-USING THREADS

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

Thread Crea7on ~ 67µs per thread

slide-17
SLIDE 17

IMPACT OF RE-USING THREADS

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

Thread Crea7on ~ 72µs per thread

slide-18
SLIDE 18

IMPACT OF RE-USING THREADS

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

Thread Crea7on ~ 96µs per thread

slide-19
SLIDE 19

IRRELEVANT PARAMETERS

Sorting Algorithm – Computation time is so small it is immeasurable. k-value of k-NN – Effect is immeasurable, likely due to the small computational impact of the sorting. Effect may become measurable on larger reference datasets.

slide-20
SLIDE 20

FUTURE WORK

Finish writing Assignment 3. Implement what I learned in this course in my positioning application on Android.

slide-21
SLIDE 21

END OF PRESENTATION

Thank you for your attention. Feel free to ask any questions you may have.