Compare commits

..

2 commits

Author SHA1 Message Date
f211870a18
Merge branch 'main' into retrievedata 2024-04-24 23:26:09 +02:00
8cb18041f7
locale 2024-04-24 18:07:06 +02:00
18 changed files with 420 additions and 838 deletions

View file

@ -1,6 +1,6 @@
CC = gcc CC = gcc
RM = rm -rf RM = rm -rf
TAR = tar -czf TAR = tar -cf
CP = cp -r CP = cp -r
MKDIR = mkdir -p MKDIR = mkdir -p
@ -63,11 +63,11 @@ pdf-clean:
$(MAKE) clean $(MAKE) clean
clean: pdf-clean clean: pdf-clean
$(RM) $(ALL_OBJECTS) "$(EXE)$(EXE_EXT)" "$(ARCHIVE_NAME).tar.gz" $(RM) $(ALL_OBJECTS) "$(EXE)$(EXE_EXT)" "$(ARCHIVE_NAME).tar"
archive: pdf-make archive: pdf-make
$(MKDIR) "$(ARCHIVE_NAME)" $(MKDIR) "$(ARCHIVE_NAME)"
$(CP) "$(SRC_DIR)" "$(INC_DIR)" Makefile README "$(ARCHIVE_NAME)" $(CP) "$(SRC_DIR)" "$(INC_DIR)" Makefile README "$(ARCHIVE_NAME)"
$(CP) "$(wildcard $(PDF_DIR)/*.pdf)" "$(ARCHIVE_NAME)/$(PDF_NEWNAME).pdf" $(CP) "$(wildcard $(PDF_DIR)/*.pdf)" "$(ARCHIVE_NAME)/$(PDF_NEWNAME).pdf"
$(TAR) "$(ARCHIVE_NAME).tar.gz" "$(ARCHIVE_NAME)" $(TAR) "$(ARCHIVE_NAME).tar" "$(ARCHIVE_NAME)"
$(RM) "$(ARCHIVE_NAME)" $(RM) "$(ARCHIVE_NAME)"

11
README
View file

@ -14,8 +14,6 @@ Paramètres disponibles :
* -m : lance le benchmark avec mandelbrot * -m : lance le benchmark avec mandelbrot
* -t n : où `n` est le nombre de threads à utiliser, 0 signifie qu'on utilise * -t n : où `n` est le nombre de threads à utiliser, 0 signifie qu'on utilise
tous les cœurs disponibles. tous les cœurs disponibles.
* -n x : où `x` est le nombre minimum de tâches simultanées supporter
par l'ordonnanceur
* -s : n'utilises pas d'ordonnanceur * -s : n'utilises pas d'ordonnanceur
Exemple : quicksort en utilisant tous les cœurs disponibles Exemple : quicksort en utilisant tous les cœurs disponibles
@ -23,8 +21,8 @@ Exemple : quicksort en utilisant tous les cœurs disponibles
./ordonnanceur.elf -qt 0 ./ordonnanceur.elf -qt 0
Cibles du makefile Cible du makefile
------------------ --------------
Il est possible d'utiliser d'autres implémentations d'ordonnanceur en changeant Il est possible d'utiliser d'autres implémentations d'ordonnanceur en changeant
la cible du Makefile. la cible du Makefile.
@ -35,10 +33,9 @@ la cible du Makefile.
* `make ws` : work-stealing * `make ws` : work-stealing
Informations Infos
------------ -----
Le rapport se trouve dans le dossier courant. Le rapport se trouve dans le dossier courant.
Lien vers le dépôt : https://git.mylloon.fr/Paris7/work-stealing-scheduler
Anri Kennel 22302653 Anri Kennel 22302653

View file

@ -3,4 +3,4 @@
/* Lance le benchmark avec mandelbrot (TP10) /* Lance le benchmark avec mandelbrot (TP10)
* *
* Renvoie le temps d'exécution */ * Renvoie le temps d'exécution */
double benchmark_mandelbrot(int, int, int); double benchmark_mandelbrot(int, int);

View file

@ -3,4 +3,4 @@
/* Lance le benchmark avec quicksort (fournis) /* Lance le benchmark avec quicksort (fournis)
* *
* Renvoie le temps d'exécution */ * Renvoie le temps d'exécution */
double benchmark_quicksort(int, int, int); double benchmark_quicksort(int, int);

View file

@ -5,13 +5,11 @@ SRC = $(TEX)
PDF = $(TEX:.tex=.pdf) PDF = $(TEX:.tex=.pdf)
TEXMK = latexmk -shell-escape -lualatex -interaction=nonstopmode TEXMK = latexmk -shell-escape -lualatex -interaction=nonstopmode
QPDF = qpdf --linearize --replace-input
all: $(PDF) all: $(PDF)
$(PDF): %.pdf: %.tex $(PDF): %.pdf: %.tex
$(TEXMK) $< $(TEXMK) $<
@$(QPDF) $@ 2>/dev/null |:
EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc
clean: clean:

View file

@ -1,101 +1,103 @@
serial;solution1;solution2;solution3;solution4 serial;solution1;solution2;solution3;solution4
3,699373;69,908451;0,748724;0,724536;0,4388 3,699373;5,488023;0,47237;0,478026;0,433025
3,700028;69,651509;0,758207;0,735602;0,452657 3,700028;5,455712;0,494962;0,43337;0,417979
3,706003;70,409085;0,760916;0,77577;0,471077 3,706003;5,525636;0,454447;0,4357;0,433579
3,680465;68,879508;0,754408;0,856882;0,463803 3,680465;5,782133;0,449261;0,448702;0,420426
3,755356;68,715224;0,758946;0,735604;0,436798 3,755356;5,760779;0,430482;0,432999;0,421888
3,773443;70,05263;0,742368;0,715597;0,485953 3,773443;5,628832;0,437057;0,451089;0,425781
3,762929;61,071574;0,757395;0,709591;0,449706 3,762929;5,534626;0,451706;0,442623;0,434668
3,728524;61,826388;0,76639;0,709813;0,432972 3,728524;5,547798;0,449807;0,435755;0,423926
3,765843;60,281954;0,755399;0,724667;0,443676 3,765843;5,544817;0,437969;0,428514;0,416397
3,760712;59,989333;0,760786;0,731358;0,482156 3,760712;5,559137;0,456097;0,459615;0,443395
;;0,753061;0,751812;0,486163 ;;0,435231;0,447139;0,417403
;;0,732515;0,737792;0,463441 ;;0,435863;0,431024;0,422645
;;0,766985;0,727256;0,461299 ;;0,47099;0,442824;0,438633
;;0,755468;0,758367;0,452605 ;;0,444217;0,426627;0,424975
;;0,754449;0,743946;0,463087 ;;0,441064;0,428842;0,426369
;;0,763504;0,737184;0,508087 ;;0,464321;0,455673;0,440124
;;0,816164;0,718047;0,443023 ;;0,440808;0,431802;0,421606
;;0,818466;0,707516;0,466842 ;;0,444501;0,431392;0,417215
;;0,820094;0,714751;0,427232 ;;0,466562;0,451748;0,438959
;;0,777806;0,72513;0,454773 ;;0,444408;0,440035;0,4254
;;0,756754;0,736922;0,481304 ;;0,440298;0,429963;0,418044
;;0,756295;0,726482;0,457485 ;;0,469805;0,445796;0,429213
;;0,764344;0,725604;0,435368 ;;0,435337;0,428611;0,429957
;;0,812846;0,703642;0,454735 ;;0,428776;0,430837;0,418727
;;0,794532;0,701544;0,439924 ;;0,439373;0,445644;0,428272
;;0,802799;0,714291;0,432497 ;;0,430075;0,439031;0,439621
;;0,776952;0,701825;0,456261 ;;0,448776;0,431147;0,414435
;;0,811182;0,731952;0,435513 ;;0,453934;0,452697;0,413957
;;0,867716;0,725562;0,434193 ;;0,436708;0,43642;0,438138
;;0,786163;0,744599;0,438291 ;;0,437682;0,439661;0,426635
;;0,817451;0,744788;0,45231 ;;0,458744;0,448007;0,422047
;;0,814847;0,705125;0,456504 ;;0,46211;0,439246;0,439724
;;0,775259;0,715851;0,428383 ;;0,439103;0,436682;0,420238
;;0,873499;0,726173;0,470819 ;;0,455765;0,443933;0,420346
;;0,833682;0,714716;0,485135 ;;0,435958;0,443765;0,441586
;;0,788488;0,71715;0,464806 ;;0,443098;0,43171;0,421882
;;0,803513;0,72059;0,448136 ;;0,46374;0,465626;0,420092
;;0,765686;0,736539;0,471816 ;;0,448221;0,434924;0,437275
;;0,764588;0,715728;0,441337 ;;0,45311;0,427708;0,421062
;;0,780008;0,724693;0,427149 ;;0,450469;0,427194;0,424122
;;0,759503;0,711983;0,448329 ;;0,430775;0,433748;0,422986
;;0,769281;0,70784;0,461468 ;;0,442299;0,420065;0,439952
;;0,759218;0,741248;0,438958 ;;0,449738;0,426692;0,495084
;;0,762445;0,697456;0,447645 ;;0,434351;0,437632;0,528238
;;0,766437;0,710466;0,44675 ;;0,42759;0,431623;0,525092
;;0,762647;0,71167;0,448525 ;;0,458849;0,42209;0,485978
;;0,760154;0,705879;0,415549 ;;0,441104;0,438151;0,464852
;;0,762126;0,724284;0,448755 ;;0,435596;0,422125;0,444847
;;0,772651;0,70883;0,446395 ;;0,451678;0,413834;0,452927
;;0,770516;0,709702;0,47213 ;;0,431298;0,449076;0,545694
;;0,765692;0,723043;0,422993 ;;0,434293;0,418434;0,472326
;;0,776426;0,704135;0,41982 ;;0,450405;0,425737;0,500946
;;0,75852;0,701932;0,451463 ;;0,429664;0,435361;0,507181
;;0,757897;0,72304;0,479726 ;;0,434408;0,428158;0,461463
;;0,752233;0,705475;0,465615 ;;0,44453;0,429692;0,46309
;;0,762813;0,706186;0,470113 ;;0,447389;0,428587;0,487651
;;0,774626;0,742427;0,448547 ;;0,44155;0,433786;0,50062
;;0,76221;0,704019;0,436901 ;;0,431118;0,423676;0,488046
;;0,770988;0,710307;0,457316 ;;0,448942;0,426093;0,471528
;;0,773389;0,740255;0,41779 ;;0,427483;0,44348;0,462296
;;0,765078;0,707632;0,41624 ;;0,429674;0,420654;0,456372
;;0,75806;0,70628;0,439199 ;;0,446553;0,422958;0,453673
;;0,840276;0,711741;0,444 ;;0,426328;0,436407;0,428236
;;0,809256;0,718686;0,435362 ;;0,427325;0,422546;0,461682
;;0,831878;0,706377;0,424162 ;;0,450518;0,426066;0,437946
;;0,818649;0,747162;0,46451 ;;0,437274;0,439085;0,426752
;;0,82472;0,703069;0,458657 ;;0,430804;0,417064;0,449537
;;0,821336;0,712093;0,451079 ;;0,448709;0,422231;0,451591
;;0,774274;0,721804;0,444846 ;;0,436712;0,437314;0,461608
;;0,816145;0,713959;0,404737 ;;0,430153;0,426393;0,501439
;;0,833468;0,725223;0,444446 ;;0,444711;0,421434;0,471776
;;0,84426;0,721485;0,441903 ;;0,428339;0,430742;0,469594
;;0,814416;0,717384;0,439355 ;;0,422936;0,430833;0,449374
;;0,806517;0,728766;0,446225 ;;0,443323;0,419846;0,501901
;;0,774625;0,71279;0,447389 ;;0,424732;0,434814;0,470192
;;0,799289;0,709757;0,401106 ;;0,427097;0,442446;0,452176
;;0,790709;0,731097;0,431719 ;;0,444068;0,456833;0,439405
;;0,823297;0,722108;0,420039 ;;0,426348;0,438789;0,455701
;;0,814804;0,708578;0,439513 ;;0,421448;0,437946;0,528443
;;0,842211;0,732622;0,426168 ;;0,440158;0,430192;0,50939
;;0,86405;0,715635;0,440741 ;;0,442971;0,42516;0,482255
;;0,820204;0,711505;0,443982 ;;0,483969;0,456829;0,478885
;;0,815872;0,732674;0,481752 ;;0,427999;0,431844;0,465756
;;0,809534;0,713409;0,47172 ;;0,436225;0,435414;0,497307
;;0,826922;0,715205;0,43914 ;;0,423702;0,444849;0,523557
;;0,806153;0,716027;0,510146 ;;0,436075;0,420309;0,448597
;;0,87398;0,706652;0,414881 ;;0,438504;0,424081;0,515072
;;0,801666;0,729932;0,436974 ;;0,428824;0,439707;0,50559
;;0,796379;0,719451;0,418621 ;;0,435219;0,418414;0,442364
;;0,77153;0,709199;0,418687 ;;0,443414;0,425195;0,448883
;;0,761019;0,728372;0,424339 ;;0,435936;0,432847;0,429692
;;0,776813;0,703809;0,441159 ;;0,430754;0,426698;0,421615
;;0,797319;0,705532;0,450558 ;;0,440062;0,420274;0,435846
;;0,766324;0,731904;0,457835 ;;0,429719;0,440123;0,421792
;;0,809568;0,709436;0,462539 ;;0,427208;0,426243;0,425134
;;0,794211;0,718473;0,444126 ;;0,445394;0,419549;0,424762
;;0,779595;0,71933;0,416904 ;;0,422881;0,421731;0,428183
;;0,777302;0,707086;0,422294 ;;0,41912;0,433301;0,437734
;;0,786113;0,721242;0,45898 ;;0,431884;0,420508;0,422997
;;0,779815;0,718811;0,419718 ;;0,425924;0,423692;0,450753
;;;;
=AVERAGE(A2:A101);=AVERAGE(B2:B101);=AVERAGE(C2:C101);=AVERAGE(D2:D101);=AVERAGE(E2:E101)

1 serial solution1 solution2 solution3 solution4
2 3,699373 69,908451 5,488023 0,748724 0,47237 0,724536 0,478026 0,4388 0,433025
3 3,700028 69,651509 5,455712 0,758207 0,494962 0,735602 0,43337 0,452657 0,417979
4 3,706003 70,409085 5,525636 0,760916 0,454447 0,77577 0,4357 0,471077 0,433579
5 3,680465 68,879508 5,782133 0,754408 0,449261 0,856882 0,448702 0,463803 0,420426
6 3,755356 68,715224 5,760779 0,758946 0,430482 0,735604 0,432999 0,436798 0,421888
7 3,773443 70,05263 5,628832 0,742368 0,437057 0,715597 0,451089 0,485953 0,425781
8 3,762929 61,071574 5,534626 0,757395 0,451706 0,709591 0,442623 0,449706 0,434668
9 3,728524 61,826388 5,547798 0,76639 0,449807 0,709813 0,435755 0,432972 0,423926
10 3,765843 60,281954 5,544817 0,755399 0,437969 0,724667 0,428514 0,443676 0,416397
11 3,760712 59,989333 5,559137 0,760786 0,456097 0,731358 0,459615 0,482156 0,443395
12 0,753061 0,435231 0,751812 0,447139 0,486163 0,417403
13 0,732515 0,435863 0,737792 0,431024 0,463441 0,422645
14 0,766985 0,47099 0,727256 0,442824 0,461299 0,438633
15 0,755468 0,444217 0,758367 0,426627 0,452605 0,424975
16 0,754449 0,441064 0,743946 0,428842 0,463087 0,426369
17 0,763504 0,464321 0,737184 0,455673 0,508087 0,440124
18 0,816164 0,440808 0,718047 0,431802 0,443023 0,421606
19 0,818466 0,444501 0,707516 0,431392 0,466842 0,417215
20 0,820094 0,466562 0,714751 0,451748 0,427232 0,438959
21 0,777806 0,444408 0,72513 0,440035 0,454773 0,4254
22 0,756754 0,440298 0,736922 0,429963 0,481304 0,418044
23 0,756295 0,469805 0,726482 0,445796 0,457485 0,429213
24 0,764344 0,435337 0,725604 0,428611 0,435368 0,429957
25 0,812846 0,428776 0,703642 0,430837 0,454735 0,418727
26 0,794532 0,439373 0,701544 0,445644 0,439924 0,428272
27 0,802799 0,430075 0,714291 0,439031 0,432497 0,439621
28 0,776952 0,448776 0,701825 0,431147 0,456261 0,414435
29 0,811182 0,453934 0,731952 0,452697 0,435513 0,413957
30 0,867716 0,436708 0,725562 0,43642 0,434193 0,438138
31 0,786163 0,437682 0,744599 0,439661 0,438291 0,426635
32 0,817451 0,458744 0,744788 0,448007 0,45231 0,422047
33 0,814847 0,46211 0,705125 0,439246 0,456504 0,439724
34 0,775259 0,439103 0,715851 0,436682 0,428383 0,420238
35 0,873499 0,455765 0,726173 0,443933 0,470819 0,420346
36 0,833682 0,435958 0,714716 0,443765 0,485135 0,441586
37 0,788488 0,443098 0,71715 0,43171 0,464806 0,421882
38 0,803513 0,46374 0,72059 0,465626 0,448136 0,420092
39 0,765686 0,448221 0,736539 0,434924 0,471816 0,437275
40 0,764588 0,45311 0,715728 0,427708 0,441337 0,421062
41 0,780008 0,450469 0,724693 0,427194 0,427149 0,424122
42 0,759503 0,430775 0,711983 0,433748 0,448329 0,422986
43 0,769281 0,442299 0,70784 0,420065 0,461468 0,439952
44 0,759218 0,449738 0,741248 0,426692 0,438958 0,495084
45 0,762445 0,434351 0,697456 0,437632 0,447645 0,528238
46 0,766437 0,42759 0,710466 0,431623 0,44675 0,525092
47 0,762647 0,458849 0,71167 0,42209 0,448525 0,485978
48 0,760154 0,441104 0,705879 0,438151 0,415549 0,464852
49 0,762126 0,435596 0,724284 0,422125 0,448755 0,444847
50 0,772651 0,451678 0,70883 0,413834 0,446395 0,452927
51 0,770516 0,431298 0,709702 0,449076 0,47213 0,545694
52 0,765692 0,434293 0,723043 0,418434 0,422993 0,472326
53 0,776426 0,450405 0,704135 0,425737 0,41982 0,500946
54 0,75852 0,429664 0,701932 0,435361 0,451463 0,507181
55 0,757897 0,434408 0,72304 0,428158 0,479726 0,461463
56 0,752233 0,44453 0,705475 0,429692 0,465615 0,46309
57 0,762813 0,447389 0,706186 0,428587 0,470113 0,487651
58 0,774626 0,44155 0,742427 0,433786 0,448547 0,50062
59 0,76221 0,431118 0,704019 0,423676 0,436901 0,488046
60 0,770988 0,448942 0,710307 0,426093 0,457316 0,471528
61 0,773389 0,427483 0,740255 0,44348 0,41779 0,462296
62 0,765078 0,429674 0,707632 0,420654 0,41624 0,456372
63 0,75806 0,446553 0,70628 0,422958 0,439199 0,453673
64 0,840276 0,426328 0,711741 0,436407 0,444 0,428236
65 0,809256 0,427325 0,718686 0,422546 0,435362 0,461682
66 0,831878 0,450518 0,706377 0,426066 0,424162 0,437946
67 0,818649 0,437274 0,747162 0,439085 0,46451 0,426752
68 0,82472 0,430804 0,703069 0,417064 0,458657 0,449537
69 0,821336 0,448709 0,712093 0,422231 0,451079 0,451591
70 0,774274 0,436712 0,721804 0,437314 0,444846 0,461608
71 0,816145 0,430153 0,713959 0,426393 0,404737 0,501439
72 0,833468 0,444711 0,725223 0,421434 0,444446 0,471776
73 0,84426 0,428339 0,721485 0,430742 0,441903 0,469594
74 0,814416 0,422936 0,717384 0,430833 0,439355 0,449374
75 0,806517 0,443323 0,728766 0,419846 0,446225 0,501901
76 0,774625 0,424732 0,71279 0,434814 0,447389 0,470192
77 0,799289 0,427097 0,709757 0,442446 0,401106 0,452176
78 0,790709 0,444068 0,731097 0,456833 0,431719 0,439405
79 0,823297 0,426348 0,722108 0,438789 0,420039 0,455701
80 0,814804 0,421448 0,708578 0,437946 0,439513 0,528443
81 0,842211 0,440158 0,732622 0,430192 0,426168 0,50939
82 0,86405 0,442971 0,715635 0,42516 0,440741 0,482255
83 0,820204 0,483969 0,711505 0,456829 0,443982 0,478885
84 0,815872 0,427999 0,732674 0,431844 0,481752 0,465756
85 0,809534 0,436225 0,713409 0,435414 0,47172 0,497307
86 0,826922 0,423702 0,715205 0,444849 0,43914 0,523557
87 0,806153 0,436075 0,716027 0,420309 0,510146 0,448597
88 0,87398 0,438504 0,706652 0,424081 0,414881 0,515072
89 0,801666 0,428824 0,729932 0,439707 0,436974 0,50559
90 0,796379 0,435219 0,719451 0,418414 0,418621 0,442364
91 0,77153 0,443414 0,709199 0,425195 0,418687 0,448883
92 0,761019 0,435936 0,728372 0,432847 0,424339 0,429692
93 0,776813 0,430754 0,703809 0,426698 0,441159 0,421615
94 0,797319 0,440062 0,705532 0,420274 0,450558 0,435846
95 0,766324 0,429719 0,731904 0,440123 0,457835 0,421792
96 0,809568 0,427208 0,709436 0,426243 0,462539 0,425134
97 0,794211 0,445394 0,718473 0,419549 0,444126 0,424762
98 0,779595 0,422881 0,71933 0,421731 0,416904 0,428183
99 0,777302 0,41912 0,707086 0,433301 0,422294 0,437734
100 0,786113 0,431884 0,721242 0,420508 0,45898 0,422997
101 0,779815 0,425924 0,718811 0,423692 0,419718 0,450753
102
103 =AVERAGE(A2:A101) =AVERAGE(B2:B101) =AVERAGE(C2:C101) =AVERAGE(D2:D101) =AVERAGE(E2:E101)

View file

@ -99,3 +99,5 @@ serial;solution1;solution2;solution3;solution4
0,848781;;0,255499;0,38121;0,240645 0,848781;;0,255499;0,38121;0,240645
0,843061;;0,258374;0,413357;0,227622 0,843061;;0,258374;0,413357;0,227622
0,848842;;0,262713;0,383977;0,219846 0,848842;;0,262713;0,383977;0,219846
;;;;
=AVERAGE(A2:A101);=AVERAGE(B2:B101);=AVERAGE(C2:C101);=AVERAGE(D2:D101);=AVERAGE(E2:E101)

1 serial solution1 solution2 solution3 solution4
99 0,848781 0,255499 0,38121 0,240645
100 0,843061 0,258374 0,413357 0,227622
101 0,848842 0,262713 0,383977 0,219846
102
103 =AVERAGE(A2:A101) =AVERAGE(B2:B101) =AVERAGE(C2:C101) =AVERAGE(D2:D101) =AVERAGE(E2:E101)

View file

@ -1,101 +1,103 @@
serial;solution1;solution2;solution3;solution4 serial;solution1;solution2;solution3;solution4
6,456785;41,649159;1,961234;1,75471;0,858611 6,456785;7,686787;1,052787;1,035684;1,056697
5,961551;41,159579;1,867443;1,889605;0,894257 5,961551;7,456977;1,090401;1,078624;1,070915
5,978221;40,853888;1,850687;1,9106;0,852761 5,978221;7,492764;0,945853;0,940012;0,941003
5,987699;41,108181;1,844775;1,889086;0,889301 5,987699;7,487839;0,961475;0,930909;0,947027
5,994593;41,039507;1,859437;1,870542;0,894762 5,994593;7,475912;0,948906;0,93964;0,948985
5,978152;40,552478;1,846758;1,892396;0,898126 5,978152;7,501028;0,96521;0,945842;0,960884
6,008653;40,871344;1,846668;1,887571;0,905322 6,008653;7,492859;0,943485;0,938186;0,944773
5,931275;40,921027;1,856589;1,882765;0,929054 5,931275;7,508583;0,947526;0,936625;0,958647
5,984718;41,185944;1,850752;1,887107;0,906014 5,984718;7,48269;0,969535;0,941158;0,954904
5,926464;41,262677;1,871987;1,865323;0,910078 5,926464;7,521487;1,095308;0,962646;0,952086
;;1,83989;1,916642;0,923592 ;;1,187541;1,120839;0,9507
;;1,852396;1,89344;0,95798 ;;1,180552;1,117982;1,011738
;;1,862238;1,866349;1,154997 ;;1,178994;1,101996;1,127789
;;1,858035;1,883279;1,181362 ;;1,198735;1,115272;1,118482
;;1,846289;1,894672;1,168078 ;;1,187537;1,114234;1,11758
;;1,843845;1,886991;1,170702 ;;1,169716;1,122988;1,129877
;;1,851448;1,867351;1,17776 ;;1,183357;1,116626;1,124217
;;1,839527;1,874013;1,169461 ;;1,201513;1,11083;1,114629
;;1,846443;1,897992;1,153499 ;;1,189228;1,112732;1,119815
;;1,841239;1,812167;1,166388 ;;1,185339;1,191832;1,111635
;;1,861473;1,885996;1,150545 ;;1,205089;1,1096;1,122624
;;1,832398;1,869662;1,149051 ;;1,190949;1,102573;1,116943
;;1,854925;1,854097;1,158301 ;;1,182796;1,104611;1,108262
;;1,876801;1,882358;1,186379 ;;1,182168;1,110547;1,112515
;;1,84395;1,861017;1,148933 ;;1,18521;1,120449;1,130948
;;1,861973;1,871175;1,621548 ;;1,186162;1,107524;1,10815
;;1,853741;1,863857;1,188869 ;;1,171052;1,104342;1,11375
;;1,832475;1,867693;1,172454 ;;1,174987;1,115831;1,063593
;;1,864345;1,863113;1,166068 ;;1,170191;1,115308;1,054527
;;1,853464;1,866527;1,180661 ;;1,183476;1,117734;1,067821
;;1,85081;1,885281;1,167348 ;;1,181003;1,098069;1,091237
;;1,889002;1,875104;1,186249 ;;1,176937;1,099926;1,063959
;;1,860324;1,871488;1,39919 ;;1,183003;1,104753;1,05376
;;1,854712;1,874508;1,179918 ;;1,164995;1,129294;1,068562
;;1,855974;1,873498;1,177229 ;;1,189621;1,103004;1,072569
;;1,851012;1,877581;1,174236 ;;1,189487;1,101624;1,05788
;;1,865635;1,868135;1,17737 ;;1,17728;1,107398;1,053151
;;1,853532;1,868136;1,158592 ;;1,176664;1,107917;1,054929
;;1,854242;1,853068;1,245401 ;;1,190181;1,106081;1,067136
;;1,870519;1,873454;1,145411 ;;1,171804;1,110127;1,056735
;;1,845472;1,863465;1,137178 ;;1,181075;1,103754;1,060074
;;1,838413;1,856358;1,13146 ;;1,171117;1,105473;1,048996
;;1,857152;1,875315;1,1778 ;;1,234976;1,111731;1,054774
;;1,857796;1,846695;1,194727 ;;1,19734;1,100651;1,063619
;;1,867392;1,914703;1,165279 ;;1,183142;1,106409;1,051499
;;1,844359;1,867281;1,157697 ;;1,184678;1,102033;1,051034
;;1,851905;1,840478;1,170331 ;;1,188219;1,111736;1,055196
;;1,864936;1,884241;1,14201 ;;1,169105;1,101426;1,056565
;;1,851607;1,860397;1,137485 ;;1,169737;1,102269;1,057922
;;1,867725;1,893906;1,159054 ;;1,182779;1,102808;1,052283
;;1,851121;1,874498;1,172483 ;;1,179676;1,103962;1,051546
;;1,862048;1,889899;1,161742 ;;1,192515;1,114528;1,054307
;;1,885169;1,868436;1,152555 ;;1,173776;1,104606;1,059195
;;1,873032;1,906535;1,145294 ;;1,18694;1,111368;1,065876
;;1,856007;1,88278;1,14767 ;;1,167176;1,10553;1,059063
;;1,857178;1,882084;1,137471 ;;1,184172;1,121461;1,055983
;;1,847874;1,874691;1,15807 ;;1,173655;1,101533;1,071379
;;1,845905;1,906517;1,173693 ;;1,174559;1,109685;1,059781
;;1,871005;1,866356;1,244258 ;;1,180622;1,105634;1,052543
;;1,854912;1,875587;1,126782 ;;1,186669;1,102102;1,052587
;;1,873241;1,889467;1,13651 ;;1,186964;1,110219;1,050079
;;1,846162;1,892907;1,141141 ;;1,180694;1,108002;1,055051
;;1,845868;1,844845;1,152296 ;;1,18293;1,112525;1,060719
;;1,868418;1,885305;1,149503 ;;1,185275;1,105263;1,053945
;;1,868781;1,857484;1,129044 ;;1,186219;1,114569;1,058368
;;1,866335;1,894812;1,136199 ;;1,186204;1,10186;1,044708
;;1,896873;1,862369;1,156769 ;;1,176664;1,103141;1,064363
;;1,846406;1,874016;1,131681 ;;1,188062;1,101297;1,058389
;;1,868205;1,88935;1,159828 ;;1,186302;1,107418;1,052813
;;1,851202;1,870441;1,189857 ;;1,174208;1,109082;1,057208
;;1,856573;1,874161;1,123324 ;;1,182153;1,103994;1,051057
;;1,857687;1,901919;1,131326 ;;1,169753;1,099634;1,069187
;;1,846702;1,887909;1,158933 ;;1,179525;1,10862;1,054363
;;1,844168;1,927572;1,127763 ;;1,176094;1,118282;1,049696
;;1,873514;1,885122;1,147745 ;;1,180424;1,109521;1,049554
;;1,868296;1,902559;1,156985 ;;1,174649;1,111231;1,059195
;;1,869302;1,959778;1,139736 ;;1,176279;1,109939;1,068946
;;1,856765;1,896785;1,15666 ;;1,185085;1,105018;1,055443
;;1,940473;1,859601;1,141663 ;;1,172958;1,119652;1,060145
;;1,882615;1,895935;1,145446 ;;1,179878;1,102493;1,0528
;;1,853098;1,87943;1,162117 ;;1,18904;1,103832;1,049931
;;1,851497;1,867225;1,127709 ;;1,185939;1,10617;1,068577
;;1,857364;1,900579;1,089162 ;;1,184071;1,110488;1,053296
;;1,857159;1,871569;1,121629 ;;1,176863;1,10142;1,053043
;;1,869184;1,913335;1,132436 ;;1,180537;1,10233;1,053079
;;1,849316;1,861857;1,172125 ;;1,175333;1,110237;1,064754
;;1,83884;1,916172;1,166059 ;;1,181432;1,102337;1,05552
;;1,855392;1,973927;1,128083 ;;1,176338;1,124259;1,053189
;;1,85446;1,954403;1,116037 ;;1,182357;1,160978;1,056288
;;1,864228;2,023192;1,153666 ;;1,188036;1,107052;1,056224
;;1,862845;1,896327;1,146614 ;;1,178734;1,107852;1,059644
;;1,840648;1,892307;1,142001 ;;1,248277;1,109694;1,060426
;;1,857235;1,882943;1,141889 ;;1,177892;1,106097;1,047429
;;1,861538;1,91871;1,164709 ;;1,192703;1,104682;1,052129
;;1,844699;1,892722;1,141951 ;;1,187199;1,105608;1,059152
;;1,873747;1,913999;1,101117 ;;1,190741;1,10163;1,062313
;;1,849665;1,923279;1,158205 ;;1,192773;1,110093;1,052282
;;1,855647;2,02672;1,118689 ;;1,17697;1,107769;1,055542
;;1,876364;2,004184;1,093833 ;;1,18526;1,109078;1,051843
;;1,855262;2,000091;1,120682 ;;1,177081;1,103607;1,056059
;;;;
=AVERAGE(A2:A101);=AVERAGE(B2:B101);=AVERAGE(C2:C101);=AVERAGE(D2:D101);=AVERAGE(E2:E101)

1 serial solution1 solution2 solution3 solution4
2 6,456785 41,649159 7,686787 1,961234 1,052787 1,75471 1,035684 0,858611 1,056697
3 5,961551 41,159579 7,456977 1,867443 1,090401 1,889605 1,078624 0,894257 1,070915
4 5,978221 40,853888 7,492764 1,850687 0,945853 1,9106 0,940012 0,852761 0,941003
5 5,987699 41,108181 7,487839 1,844775 0,961475 1,889086 0,930909 0,889301 0,947027
6 5,994593 41,039507 7,475912 1,859437 0,948906 1,870542 0,93964 0,894762 0,948985
7 5,978152 40,552478 7,501028 1,846758 0,96521 1,892396 0,945842 0,898126 0,960884
8 6,008653 40,871344 7,492859 1,846668 0,943485 1,887571 0,938186 0,905322 0,944773
9 5,931275 40,921027 7,508583 1,856589 0,947526 1,882765 0,936625 0,929054 0,958647
10 5,984718 41,185944 7,48269 1,850752 0,969535 1,887107 0,941158 0,906014 0,954904
11 5,926464 41,262677 7,521487 1,871987 1,095308 1,865323 0,962646 0,910078 0,952086
12 1,83989 1,187541 1,916642 1,120839 0,923592 0,9507
13 1,852396 1,180552 1,89344 1,117982 0,95798 1,011738
14 1,862238 1,178994 1,866349 1,101996 1,154997 1,127789
15 1,858035 1,198735 1,883279 1,115272 1,181362 1,118482
16 1,846289 1,187537 1,894672 1,114234 1,168078 1,11758
17 1,843845 1,169716 1,886991 1,122988 1,170702 1,129877
18 1,851448 1,183357 1,867351 1,116626 1,17776 1,124217
19 1,839527 1,201513 1,874013 1,11083 1,169461 1,114629
20 1,846443 1,189228 1,897992 1,112732 1,153499 1,119815
21 1,841239 1,185339 1,812167 1,191832 1,166388 1,111635
22 1,861473 1,205089 1,885996 1,1096 1,150545 1,122624
23 1,832398 1,190949 1,869662 1,102573 1,149051 1,116943
24 1,854925 1,182796 1,854097 1,104611 1,158301 1,108262
25 1,876801 1,182168 1,882358 1,110547 1,186379 1,112515
26 1,84395 1,18521 1,861017 1,120449 1,148933 1,130948
27 1,861973 1,186162 1,871175 1,107524 1,621548 1,10815
28 1,853741 1,171052 1,863857 1,104342 1,188869 1,11375
29 1,832475 1,174987 1,867693 1,115831 1,172454 1,063593
30 1,864345 1,170191 1,863113 1,115308 1,166068 1,054527
31 1,853464 1,183476 1,866527 1,117734 1,180661 1,067821
32 1,85081 1,181003 1,885281 1,098069 1,167348 1,091237
33 1,889002 1,176937 1,875104 1,099926 1,186249 1,063959
34 1,860324 1,183003 1,871488 1,104753 1,39919 1,05376
35 1,854712 1,164995 1,874508 1,129294 1,179918 1,068562
36 1,855974 1,189621 1,873498 1,103004 1,177229 1,072569
37 1,851012 1,189487 1,877581 1,101624 1,174236 1,05788
38 1,865635 1,17728 1,868135 1,107398 1,17737 1,053151
39 1,853532 1,176664 1,868136 1,107917 1,158592 1,054929
40 1,854242 1,190181 1,853068 1,106081 1,245401 1,067136
41 1,870519 1,171804 1,873454 1,110127 1,145411 1,056735
42 1,845472 1,181075 1,863465 1,103754 1,137178 1,060074
43 1,838413 1,171117 1,856358 1,105473 1,13146 1,048996
44 1,857152 1,234976 1,875315 1,111731 1,1778 1,054774
45 1,857796 1,19734 1,846695 1,100651 1,194727 1,063619
46 1,867392 1,183142 1,914703 1,106409 1,165279 1,051499
47 1,844359 1,184678 1,867281 1,102033 1,157697 1,051034
48 1,851905 1,188219 1,840478 1,111736 1,170331 1,055196
49 1,864936 1,169105 1,884241 1,101426 1,14201 1,056565
50 1,851607 1,169737 1,860397 1,102269 1,137485 1,057922
51 1,867725 1,182779 1,893906 1,102808 1,159054 1,052283
52 1,851121 1,179676 1,874498 1,103962 1,172483 1,051546
53 1,862048 1,192515 1,889899 1,114528 1,161742 1,054307
54 1,885169 1,173776 1,868436 1,104606 1,152555 1,059195
55 1,873032 1,18694 1,906535 1,111368 1,145294 1,065876
56 1,856007 1,167176 1,88278 1,10553 1,14767 1,059063
57 1,857178 1,184172 1,882084 1,121461 1,137471 1,055983
58 1,847874 1,173655 1,874691 1,101533 1,15807 1,071379
59 1,845905 1,174559 1,906517 1,109685 1,173693 1,059781
60 1,871005 1,180622 1,866356 1,105634 1,244258 1,052543
61 1,854912 1,186669 1,875587 1,102102 1,126782 1,052587
62 1,873241 1,186964 1,889467 1,110219 1,13651 1,050079
63 1,846162 1,180694 1,892907 1,108002 1,141141 1,055051
64 1,845868 1,18293 1,844845 1,112525 1,152296 1,060719
65 1,868418 1,185275 1,885305 1,105263 1,149503 1,053945
66 1,868781 1,186219 1,857484 1,114569 1,129044 1,058368
67 1,866335 1,186204 1,894812 1,10186 1,136199 1,044708
68 1,896873 1,176664 1,862369 1,103141 1,156769 1,064363
69 1,846406 1,188062 1,874016 1,101297 1,131681 1,058389
70 1,868205 1,186302 1,88935 1,107418 1,159828 1,052813
71 1,851202 1,174208 1,870441 1,109082 1,189857 1,057208
72 1,856573 1,182153 1,874161 1,103994 1,123324 1,051057
73 1,857687 1,169753 1,901919 1,099634 1,131326 1,069187
74 1,846702 1,179525 1,887909 1,10862 1,158933 1,054363
75 1,844168 1,176094 1,927572 1,118282 1,127763 1,049696
76 1,873514 1,180424 1,885122 1,109521 1,147745 1,049554
77 1,868296 1,174649 1,902559 1,111231 1,156985 1,059195
78 1,869302 1,176279 1,959778 1,109939 1,139736 1,068946
79 1,856765 1,185085 1,896785 1,105018 1,15666 1,055443
80 1,940473 1,172958 1,859601 1,119652 1,141663 1,060145
81 1,882615 1,179878 1,895935 1,102493 1,145446 1,0528
82 1,853098 1,18904 1,87943 1,103832 1,162117 1,049931
83 1,851497 1,185939 1,867225 1,10617 1,127709 1,068577
84 1,857364 1,184071 1,900579 1,110488 1,089162 1,053296
85 1,857159 1,176863 1,871569 1,10142 1,121629 1,053043
86 1,869184 1,180537 1,913335 1,10233 1,132436 1,053079
87 1,849316 1,175333 1,861857 1,110237 1,172125 1,064754
88 1,83884 1,181432 1,916172 1,102337 1,166059 1,05552
89 1,855392 1,176338 1,973927 1,124259 1,128083 1,053189
90 1,85446 1,182357 1,954403 1,160978 1,116037 1,056288
91 1,864228 1,188036 2,023192 1,107052 1,153666 1,056224
92 1,862845 1,178734 1,896327 1,107852 1,146614 1,059644
93 1,840648 1,248277 1,892307 1,109694 1,142001 1,060426
94 1,857235 1,177892 1,882943 1,106097 1,141889 1,047429
95 1,861538 1,192703 1,91871 1,104682 1,164709 1,052129
96 1,844699 1,187199 1,892722 1,105608 1,141951 1,059152
97 1,873747 1,190741 1,913999 1,10163 1,101117 1,062313
98 1,849665 1,192773 1,923279 1,110093 1,158205 1,052282
99 1,855647 1,17697 2,02672 1,107769 1,118689 1,055542
100 1,876364 1,18526 2,004184 1,109078 1,093833 1,051843
101 1,855262 1,177081 2,000091 1,103607 1,120682 1,056059
102
103 =AVERAGE(A2:A101) =AVERAGE(B2:B101) =AVERAGE(C2:C101) =AVERAGE(D2:D101) =AVERAGE(E2:E101)

View file

@ -1,101 +1,103 @@
serial;solution1;solution2;solution3;solution4 serial;solution1;solution2;solution3;solution4
1,169317;18,853278;0,351625;0,437063;0,277223 1,169317;18,853278;0,351625;0,437063;0,382723
1,135357;18,647222;0,346113;0,415457;0,30976 1,135357;18,647222;0,346113;0,415457;0,381181
1,116063;18,716067;0,333315;0,478798;0,29798 1,116063;18,716067;0,333315;0,478798;0,398743
1,114389;18,852186;0,405765;0,427855;0,296451 1,114389;18,852186;0,405765;0,427855;0,416678
1,100082;18,915434;0,345879;0,417337;0,27663 1,100082;18,915434;0,345879;0,417337;0,377607
1,122489;18,859351;0,341637;0,413364;0,289742 1,122489;18,859351;0,341637;0,413364;0,378226
1,118625;18,880979;0,338688;0,424781;0,276373 1,118625;18,880979;0,338688;0,424781;0,371909
1,116783;18,896289;0,340782;0,419739;0,298701 1,116783;18,896289;0,340782;0,419739;0,376049
1,123764;18,966756;0,34598;0,419586;0,280514 1,123764;18,966756;0,34598;0,419586;0,378886
1,112053;18,961847;0,347781;0,417307;0,282288 1,112053;18,961847;0,347781;0,417307;0,371564
1,106222;;0,345977;0,418911;0,29461 1,106222;;0,345977;0,418911;0,382286
1,117542;;0,344575;0,423238;0,283487 1,117542;;0,344575;0,423238;0,374463
1,123042;;0,380316;0,423481;0,303554 1,123042;;0,380316;0,423481;0,384574
1,122666;;0,348965;0,422239;0,277983 1,122666;;0,348965;0,422239;0,386472
1,094784;;0,350091;0,428141;0,302062 1,094784;;0,350091;0,428141;0,413726
1,117887;;0,347079;0,421924;0,279742 1,117887;;0,347079;0,421924;0,379888
1,107592;;0,351519;0,422242;0,296745 1,107592;;0,351519;0,422242;0,379254
1,110112;;0,348146;0,421897;0,281091 1,110112;;0,348146;0,421897;0,383506
1,110634;;0,344438;0,423664;0,30145 1,110634;;0,344438;0,423664;0,375633
1,122727;;0,352911;0,416374;0,28529 1,122727;;0,352911;0,416374;0,379337
1,118713;;0,358144;0,425869;0,301081 1,118713;;0,358144;0,425869;0,378915
1,145003;;0,357419;0,421071;0,277248 1,145003;;0,357419;0,421071;0,383542
1,158742;;0,352318;0,429645;0,309069 1,158742;;0,352318;0,429645;0,380849
1,139315;;0,351734;0,426712;0,28449 1,139315;;0,351734;0,426712;0,378048
1,11389;;0,348296;0,428159;0,300195 1,11389;;0,348296;0,428159;0,3879
1,115792;;0,344813;0,423699;0,280263 1,115792;;0,344813;0,423699;0,377888
1,130178;;0,35095;0,418282;0,293245 1,130178;;0,35095;0,418282;0,370342
1,13437;;0,37976;0,418731;0,277778 1,13437;;0,37976;0,418731;0,385092
1,118635;;0,370856;0,414341;0,284453 1,118635;;0,370856;0,414341;0,384217
1,130626;;0,352924;0,41674;0,284434 1,130626;;0,352924;0,41674;0,373857
1,131715;;0,344628;0,424953;0,280787 1,131715;;0,344628;0,424953;0,385397
1,126394;;0,350694;0,419971;0,282349 1,126394;;0,350694;0,419971;0,377804
1,119051;;0,357199;0,420048;0,270621 1,119051;;0,357199;0,420048;0,380921
1,166946;;0,357381;0,42662;0,324383 1,166946;;0,357381;0,42662;0,377479
1,131719;;0,349864;0,423074;0,309926 1,131719;;0,349864;0,423074;0,378388
1,122401;;0,356168;0,425048;0,318613 1,122401;;0,356168;0,425048;0,383581
1,153248;;0,354049;0,419466;0,312714 1,153248;;0,354049;0,419466;0,385966
1,137804;;0,345239;0,427234;0,31447 1,137804;;0,345239;0,427234;0,384223
1,154568;;0,344695;0,415409;0,357493 1,154568;;0,344695;0,415409;0,3834
1,134548;;0,351951;0,422346;0,304176 1,134548;;0,351951;0,422346;0,377832
1,141694;;0,346957;0,420225;0,319239 1,141694;;0,346957;0,420225;0,383113
1,138798;;0,349656;0,417503;0,314283 1,138798;;0,349656;0,417503;0,374977
1,14691;;0,354899;0,417815;0,308839 1,14691;;0,354899;0,417815;0,380706
1,156523;;0,353429;0,421822;0,322845 1,156523;;0,353429;0,421822;0,383708
1,156974;;0,356433;0,42952;0,307459 1,156974;;0,356433;0,42952;0,380314
1,137881;;0,350235;0,421268;0,311346 1,137881;;0,350235;0,421268;0,37869
1,182041;;0,341791;0,422629;0,424512 1,182041;;0,341791;0,422629;0,389657
1,255355;;0,355822;0,423966;0,295332 1,255355;;0,355822;0,423966;0,373055
1,274741;;0,352674;0,422633;0,317655 1,274741;;0,352674;0,422633;0,364184
1,286123;;0,351432;0,424711;0,30888 1,286123;;0,351432;0,424711;0,411692
1,316496;;0,344587;0,425153;0,365595 1,316496;;0,344587;0,425153;0,419045
1,264997;;0,355617;0,416388;0,317795 1,264997;;0,355617;0,416388;0,429214
1,294749;;0,351376;0,425924;0,30476 1,294749;;0,351376;0,425924;0,412711
1,279336;;0,356047;0,418391;0,324489 1,279336;;0,356047;0,418391;0,416824
1,15115;;0,353281;0,419928;0,302113 1,15115;;0,353281;0,419928;0,414186
1,157065;;0,352129;0,425628;0,320394 1,157065;;0,352129;0,425628;0,415634
1,134674;;0,342187;0,425554;0,313931 1,134674;;0,342187;0,425554;0,411532
1,148537;;0,352382;0,481699;0,313504 1,148537;;0,352382;0,481699;0,407371
1,162825;;0,354259;0,42336;0,327433 1,162825;;0,354259;0,42336;0,421037
1,125219;;0,355084;0,423364;0,303773 1,125219;;0,355084;0,423364;0,417315
1,135948;;0,351672;0,394221;0,319334 1,135948;;0,351672;0,394221;0,412084
1,126676;;0,355635;0,449527;0,306527 1,126676;;0,355635;0,449527;0,4207
1,138703;;0,349666;0,464888;0,335988 1,138703;;0,349666;0,464888;0,423857
1,119315;;0,351147;0,466629;0,312778 1,119315;;0,351147;0,466629;0,409047
1,148766;;0,347634;0,462687;0,306124 1,148766;;0,347634;0,462687;0,418437
1,141104;;0,341901;0,461755;0,325993 1,141104;;0,341901;0,461755;0,415447
1,118401;;0,343974;0,476791;0,306907 1,118401;;0,343974;0,476791;0,417919
1,128814;;0,348128;0,464594;0,316588 1,128814;;0,348128;0,464594;0,419329
1,121958;;0,34178;0,464364;0,304631 1,121958;;0,34178;0,464364;0,414912
1,128093;;0,345766;0,463223;0,317844 1,128093;;0,345766;0,463223;0,414757
1,128975;;0,347413;0,452773;0,327408 1,128975;;0,347413;0,452773;0,405286
1,121784;;0,359716;0,461508;0,312561 1,121784;;0,359716;0,461508;0,423785
1,132107;;0,352905;0,467514;0,346329 1,132107;;0,352905;0,467514;0,391218
1,133611;;0,355789;0,461167;0,307356 1,133611;;0,355789;0,461167;0,415502
1,130427;;0,346789;0,457815;0,31519 1,130427;;0,346789;0,457815;0,412782
1,126433;;0,356803;0,464759;0,322447 1,126433;;0,356803;0,464759;0,420365
1,123953;;0,348465;0,474755;0,313538 1,123953;;0,348465;0,474755;0,410116
1,127655;;0,354976;0,458914;0,401558 1,127655;;0,354976;0,458914;0,410436
1,132243;;0,352192;0,468238;0,307872 1,132243;;0,352192;0,468238;0,40962
1,143742;;0,348525;0,457865;0,304387 1,143742;;0,348525;0,457865;0,410799
1,106861;;0,351524;0,460753;0,318627 1,106861;;0,351524;0,460753;0,420131
1,120433;;0,348578;0,455885;0,308049 1,120433;;0,348578;0,455885;0,412946
1,135562;;0,343631;0,466659;0,316858 1,135562;;0,343631;0,466659;0,417832
1,117834;;0,350116;0,462351;0,308032 1,117834;;0,350116;0,462351;0,409707
1,11625;;0,333757;0,459712;0,328463 1,11625;;0,333757;0,459712;0,405304
1,11195;;0,341549;0,463326;0,319812 1,11195;;0,341549;0,463326;0,406791
1,127202;;0,373114;0,466854;0,305431 1,127202;;0,373114;0,466854;0,41183
1,101792;;0,379246;0,456734;0,322798 1,101792;;0,379246;0,456734;0,413631
1,120175;;0,38736;0,466337;0,304799 1,120175;;0,38736;0,466337;0,414521
1,111876;;0,384814;0,457412;0,316439 1,111876;;0,384814;0,457412;0,411496
1,118578;;0,380565;0,461057;0,308321 1,118578;;0,380565;0,461057;0,40549
1,12683;;0,386794;0,462855;0,315443 1,12683;;0,386794;0,462855;0,419142
1,138092;;0,377734;0,459669;0,315014 1,138092;;0,377734;0,459669;0,414253
1,116206;;0,38403;0,457826;0,316235 1,116206;;0,38403;0,457826;0,42314
1,104377;;0,384854;0,456568;0,323074 1,104377;;0,384854;0,456568;0,413144
1,117096;;0,394539;0,459206;0,305813 1,117096;;0,394539;0,459206;0,411529
1,099433;;0,419737;0,473687;0,321035 1,099433;;0,419737;0,473687;0,408364
1,133824;;0,425726;0,461766;0,302243 1,133824;;0,425726;0,461766;0,409931
1,131027;;0,417199;0,467319;0,312465 1,131027;;0,417199;0,467319;0,40179
1,138425;;0,386066;0,459411;0,321559 1,138425;;0,386066;0,459411;0,413237
;;;;
=AVERAGE(A2:A101);=AVERAGE(B2:B101);=AVERAGE(C2:C101);=AVERAGE(D2:D101);=AVERAGE(E2:E101)

1 serial solution1 solution2 solution3 solution4
2 1,169317 18,853278 0,351625 0,437063 0,277223 0,382723
3 1,135357 18,647222 0,346113 0,415457 0,30976 0,381181
4 1,116063 18,716067 0,333315 0,478798 0,29798 0,398743
5 1,114389 18,852186 0,405765 0,427855 0,296451 0,416678
6 1,100082 18,915434 0,345879 0,417337 0,27663 0,377607
7 1,122489 18,859351 0,341637 0,413364 0,289742 0,378226
8 1,118625 18,880979 0,338688 0,424781 0,276373 0,371909
9 1,116783 18,896289 0,340782 0,419739 0,298701 0,376049
10 1,123764 18,966756 0,34598 0,419586 0,280514 0,378886
11 1,112053 18,961847 0,347781 0,417307 0,282288 0,371564
12 1,106222 0,345977 0,418911 0,29461 0,382286
13 1,117542 0,344575 0,423238 0,283487 0,374463
14 1,123042 0,380316 0,423481 0,303554 0,384574
15 1,122666 0,348965 0,422239 0,277983 0,386472
16 1,094784 0,350091 0,428141 0,302062 0,413726
17 1,117887 0,347079 0,421924 0,279742 0,379888
18 1,107592 0,351519 0,422242 0,296745 0,379254
19 1,110112 0,348146 0,421897 0,281091 0,383506
20 1,110634 0,344438 0,423664 0,30145 0,375633
21 1,122727 0,352911 0,416374 0,28529 0,379337
22 1,118713 0,358144 0,425869 0,301081 0,378915
23 1,145003 0,357419 0,421071 0,277248 0,383542
24 1,158742 0,352318 0,429645 0,309069 0,380849
25 1,139315 0,351734 0,426712 0,28449 0,378048
26 1,11389 0,348296 0,428159 0,300195 0,3879
27 1,115792 0,344813 0,423699 0,280263 0,377888
28 1,130178 0,35095 0,418282 0,293245 0,370342
29 1,13437 0,37976 0,418731 0,277778 0,385092
30 1,118635 0,370856 0,414341 0,284453 0,384217
31 1,130626 0,352924 0,41674 0,284434 0,373857
32 1,131715 0,344628 0,424953 0,280787 0,385397
33 1,126394 0,350694 0,419971 0,282349 0,377804
34 1,119051 0,357199 0,420048 0,270621 0,380921
35 1,166946 0,357381 0,42662 0,324383 0,377479
36 1,131719 0,349864 0,423074 0,309926 0,378388
37 1,122401 0,356168 0,425048 0,318613 0,383581
38 1,153248 0,354049 0,419466 0,312714 0,385966
39 1,137804 0,345239 0,427234 0,31447 0,384223
40 1,154568 0,344695 0,415409 0,357493 0,3834
41 1,134548 0,351951 0,422346 0,304176 0,377832
42 1,141694 0,346957 0,420225 0,319239 0,383113
43 1,138798 0,349656 0,417503 0,314283 0,374977
44 1,14691 0,354899 0,417815 0,308839 0,380706
45 1,156523 0,353429 0,421822 0,322845 0,383708
46 1,156974 0,356433 0,42952 0,307459 0,380314
47 1,137881 0,350235 0,421268 0,311346 0,37869
48 1,182041 0,341791 0,422629 0,424512 0,389657
49 1,255355 0,355822 0,423966 0,295332 0,373055
50 1,274741 0,352674 0,422633 0,317655 0,364184
51 1,286123 0,351432 0,424711 0,30888 0,411692
52 1,316496 0,344587 0,425153 0,365595 0,419045
53 1,264997 0,355617 0,416388 0,317795 0,429214
54 1,294749 0,351376 0,425924 0,30476 0,412711
55 1,279336 0,356047 0,418391 0,324489 0,416824
56 1,15115 0,353281 0,419928 0,302113 0,414186
57 1,157065 0,352129 0,425628 0,320394 0,415634
58 1,134674 0,342187 0,425554 0,313931 0,411532
59 1,148537 0,352382 0,481699 0,313504 0,407371
60 1,162825 0,354259 0,42336 0,327433 0,421037
61 1,125219 0,355084 0,423364 0,303773 0,417315
62 1,135948 0,351672 0,394221 0,319334 0,412084
63 1,126676 0,355635 0,449527 0,306527 0,4207
64 1,138703 0,349666 0,464888 0,335988 0,423857
65 1,119315 0,351147 0,466629 0,312778 0,409047
66 1,148766 0,347634 0,462687 0,306124 0,418437
67 1,141104 0,341901 0,461755 0,325993 0,415447
68 1,118401 0,343974 0,476791 0,306907 0,417919
69 1,128814 0,348128 0,464594 0,316588 0,419329
70 1,121958 0,34178 0,464364 0,304631 0,414912
71 1,128093 0,345766 0,463223 0,317844 0,414757
72 1,128975 0,347413 0,452773 0,327408 0,405286
73 1,121784 0,359716 0,461508 0,312561 0,423785
74 1,132107 0,352905 0,467514 0,346329 0,391218
75 1,133611 0,355789 0,461167 0,307356 0,415502
76 1,130427 0,346789 0,457815 0,31519 0,412782
77 1,126433 0,356803 0,464759 0,322447 0,420365
78 1,123953 0,348465 0,474755 0,313538 0,410116
79 1,127655 0,354976 0,458914 0,401558 0,410436
80 1,132243 0,352192 0,468238 0,307872 0,40962
81 1,143742 0,348525 0,457865 0,304387 0,410799
82 1,106861 0,351524 0,460753 0,318627 0,420131
83 1,120433 0,348578 0,455885 0,308049 0,412946
84 1,135562 0,343631 0,466659 0,316858 0,417832
85 1,117834 0,350116 0,462351 0,308032 0,409707
86 1,11625 0,333757 0,459712 0,328463 0,405304
87 1,11195 0,341549 0,463326 0,319812 0,406791
88 1,127202 0,373114 0,466854 0,305431 0,41183
89 1,101792 0,379246 0,456734 0,322798 0,413631
90 1,120175 0,38736 0,466337 0,304799 0,414521
91 1,111876 0,384814 0,457412 0,316439 0,411496
92 1,118578 0,380565 0,461057 0,308321 0,40549
93 1,12683 0,386794 0,462855 0,315443 0,419142
94 1,138092 0,377734 0,459669 0,315014 0,414253
95 1,116206 0,38403 0,457826 0,316235 0,42314
96 1,104377 0,384854 0,456568 0,323074 0,413144
97 1,117096 0,394539 0,459206 0,305813 0,411529
98 1,099433 0,419737 0,473687 0,321035 0,408364
99 1,133824 0,425726 0,461766 0,302243 0,409931
100 1,131027 0,417199 0,467319 0,312465 0,40179
101 1,138425 0,386066 0,459411 0,321559 0,413237
102
103 =AVERAGE(A2:A101) =AVERAGE(B2:B101) =AVERAGE(C2:C101) =AVERAGE(D2:D101) =AVERAGE(E2:E101)

View file

@ -1,12 +1,12 @@
\DocumentMetadata{testphase = {phase-II,sec,toc,graphic,minipage,text}} \DocumentMetadata{testphase = {phase-II,sec,toc,graphic,minipage,float,text}}
\documentclass[a4paper]{article} \documentclass{article}
% Fonts
\usepackage[T1]{fontenc} % encoding \usepackage[T1]{fontenc} % encoding
\renewcommand{\familydefault}{\sfdefault} % sans-serif \renewcommand{\familydefault}{\sfdefault} % sans-serif font
\usepackage[nopatch=footnote]{microtype} % better font looking
% Langages
\usepackage[french]{babel}
\frenchsetup{SmallCapsFigTabCaptions=false}
% Add \extra info to title % Add \extra info to title
\makeatletter \makeatletter
@ -19,45 +19,12 @@
} }
\makeatother \makeatother
% Code integration % Code integration
\usepackage{minted} \usepackage{minted}
\setminted[c]{autogobble,frame=lines} % code \setminted[c]{autogobble,frame=lines}
\setminted[ada]{autogobble} % stats de vol
\usemintedstyle{emacs} \usemintedstyle{emacs}
\def\titleName{Projet : Un ordonnanceur par work stealing}
% Langages
\usepackage[french]{babel}
\frenchsetup{SmallCapsFigTabCaptions=false}
\usepackage{csquotes}
\MakeOuterQuote{"}
% Aliases
\def\coeur{c\oe{}ur}
\def\mone{\textit{Machine 1}} % fixe
\def\mtwo{\textit{Machine 2}} % portable
\def\qs{\enquote{quicksort}}
\def\mandel{\enquote{mandelbrot}}
\def\bone{\textit{Benchmark \qs}}
\def\btwo{\textit{Benchmark \mandel}}
\def\ws{\enquote{work-stealing}}
% Plots
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
% Images
\usepackage{graphicx}
\usepackage{caption}
\captionsetup{justification=centering}
% Metadatas
\def\titleName{Projet : Un ordonnanceur par work-stealing}
\def\docTitle{\href{https://www.irif.fr/~jch/enseignement/systeme/projet.pdf}{\titleName}} \def\docTitle{\href{https://www.irif.fr/~jch/enseignement/systeme/projet.pdf}{\titleName}}
\def\anri{Anri Kennel} \def\anri{Anri Kennel}
@ -77,71 +44,11 @@
\extra{\docSubject~$\cdot$ \docLocation} \extra{\docSubject~$\cdot$ \docLocation}
\date{Année universitaire 2023-2024} \date{Année universitaire 2023-2024}
% Commands
\newcommand{\docref}[1]{\textit{\nameref{#1}}} % italic nameref \newcommand{\docref}[1]{\textit{\nameref{#1}}} % italic nameref
\newcommand{\statPlot}[2]{ % plot for stats
\begin{figure}[H]
\def\side{0.5\textwidth}
\def\width{\textwidth}
\def\height{0.7\textwidth}
\def\xlabel{Itérations}
\def\ylabel{Secondes}
\def\colname{#1}
\begin{minipage}{\side} % Aliases
\centering \def\coeurs{c\oe{}urs}
\begin{tikzpicture}
\begin{axis}[
xlabel={\xlabel},
ylabel={\ylabel},
width=\width,
height=\height
]
\addplot [smooth, color=red] table [
x expr=\coordindex,
y=\colname,
col sep=semicolon,
/pgf/number format/read comma as period] {data/machine1-quicksort.csv};
\addplot [smooth, color=blue] table [
x expr=\coordindex,
y=\colname,
col sep=semicolon,
/pgf/number format/read comma as period] {data/machine2-quicksort.csv};
\end{axis}
\end{tikzpicture}
\caption{Temps d'exécution pour \bone~\textit{#2}}
\end{minipage}\hfill
\begin{minipage}{\side}
\centering
\begin{tikzpicture}
\begin{axis}[
xlabel={\xlabel},
ylabel={\ylabel},
legend pos=outer north east,
width=\width,
height=\height
]
\addplot [smooth, color=red] table [
x expr=\coordindex,
y=\colname,
col sep=semicolon,
/pgf/number format/read comma as period] {data/machine1-mandelbrot.csv};
\addlegendentry{\mone}
\addplot [smooth, color=blue] table [
x expr=\coordindex,
y=\colname,
col sep=semicolon,
/pgf/number format/read comma as period] {data/machine2-mandelbrot.csv};
\addlegendentry{\mtwo}
\end{axis}
\end{tikzpicture}
\caption{Temps d'exécution pour \btwo~\textit{#2}}
\end{minipage}
\end{figure}
}
\begin{document} \begin{document}
\maketitle \maketitle
@ -149,357 +56,122 @@
\tableofcontents \tableofcontents
\clearpage \clearpage
% TODO: Mandelbrot
% TODO: Computer 2
\section{Descriptions} \section{Descriptions}
Description des différents algorithmes implémentés. Description des différents algorithmes implémentés.
\subsection{Séquentiel}\label{desc:seq} \subsection{Naïf}
Cette implémentation lance les tâches sur un \coeur. Cette implémentation naïve correspond au mode \texttt{serial}
de \texttt{quicksort.c}. Elle lance les tâches sans threads.
\subsection{Threads sans gestion}\label{desc:threads} \subsection[Threads sans gestion]{Threads sans gestion}
Cette implémentation correspond à simplement démarrer un nouveau thread Cette implémentation correspond à simplement démarrer un nouveau thread
pour chaque nouvelle tâche. pour chaque nouvelle tâche.
Comme cette implémentation n'ordonnance rien et que le nombre de threads créer
est important.
\subsection{Threads avec pile}\label{desc:th_pile} \subsection{Threads avec pile}\label{desc:th_pile}
Pour cette implémentation, nous gardons en mémoire une pile et nous démarrons Pour cette implémentation, on garde en mémoire une pile,
un nombre fixe de threads, et à chaque ajout d'une tâche, le thread l'empile. et on démarre un nombre fixe de threads et à chaque ajout d'une tâche,
Chaque thread récupère la dernière tâche ajoutée à la pile. on l'empile. Chaque thread récupère la dernière tâche ajoutée à la pile.
\subsubsection{Sélection aléatoire de tâche} \subsubsection{Sélection aléatoire de tâche}
Même fonctionnement que dans l'algorithme de \docref{desc:th_pile}, sauf Même fonctionnement que dans l'algorithme de \docref{desc:th_pile}, sauf
qu'au lieu de récupérer la dernière tâche, le thread récupère une tâche qu'au lieu de récupérer la dernière tâche, on récupère une tâche
aléatoire de la pile. aléatoire de la pile.
\subsection{Répartition par \ws}\label{desc:ws} \subsection{Répartition par work-stealing}
Ici, chaque \coeur~a sa propre liste de tâches. Quand un thread n'a \begin{itemize}
plus de tâches, il essaie d'en voler une à un autre thread. \item Au lieu d'avoir une pile unique, chaque thread à sa propre liste
\item Chaque tâche est ajouté sur le même thread de sa création.
\item Quand un thread n'as pas de tâches à faire, il vole une tâche à un autre
\section{Comportement} thread, en partant de la fin
\end{itemize}
Analyse du comportement des différentes implémentations.
\subsection{Threads sans gestion}
Cette implémentation n'ordonnance rien, alors le nombre de threads
créés est important.
\subsection{Listes}
Dans l'ordonnanceur LIFO, la liste est une pile. Chaque thread récupère le
premier élément de la pile, c'est-à-dire le dernier à avoir été ajouté.
Avec la répartition par \ws, la liste est une deque. Comme dans l'ordonnanceur
LIFO, chaque thread récupère le premier élément de la deque, mais quand il y a
un vol, c'est le dernier élément qui est récupéré par le thread.
\subsection{Synchronisations}
Dans mes implémentations, j'ai exclusivement utilisé des mutex ainsi que des
variables de conditions pour endormir/réveiller mes threads.
Pendant le développement, j'ai parfois utilisé \texttt{usleep} pour interrompre
à temps donné un thread au lieu des variables de conditions pour faire
attendre les threads, mais j'ai obtenu de meilleurs résultats avec les variables
de conditions. Aussi, je pense qu'avoir les variables de conditions m'assure
que mon ordonnanceur fonctionne sur n'importe quel CPU, qu'il soit lent ou rapide,
avec des performances honnêtes. En effet, choisir une valeur qui fonctionne bien
sur mon ordinateur n'assure pas qu'elle soit la meilleure pour un autre processeur.
\subsection{Nombre de threads}
Pour avoir un programme performant, il faut équilibrer le nombre de threads par
rapport aux nombres de \coeur{}s disponibles. Il faut également équilibrer la
création de nouvelles tâches par thread par rapport au véritable travail
effectué par ledit thread. Par exemple, dans le \btwo, chaque tâche crée soit
quatre nouvelles tâches, soit calcule une portion de l'image. Une plus grande
création de tâches favorise le \ws~parce qu'une pile unique atteint ses limites
quand trop de tâches sont ajoutées, car les threads n'ont pas le temps
"d'abattre le travail" assez rapidement.
\section{Statistiques}\label{sec:stats}
\section{Statistiques}
Chaque implémentation a été testée avec l'optimisation de niveau 2 Chaque implémentation a été testée avec l'optimisation de niveau 2
de \texttt{gcc}, sur 2 machines. de \texttt{gcc}, sur 2 machines.
Le programme utilisé pour tester les implémentations est le \texttt{quicksort}
fourni.
\def\mone{\textit{Machine 1}} % fixe
\def\mtwo{\textit{Machine 2}} % portable
\begin{enumerate} \begin{enumerate}
\item \textbf{12 \coeur{}s} pour la \mone. \item \textbf{12 \coeurs} pour la \mone.
\item \textbf{8 \coeur{}s} pour la \mtwo. \item \textbf{8 \coeurs} pour la \mtwo.
\end{enumerate} \end{enumerate}
Les benchmarks utilisés pour tester les implémentations sont le \qs~fourni \subsection{Naïf}\label{stats:naive}
et une adaptation de \mandel~fournie dans le
\href{https://www.irif.fr/~jch/enseignement/systeme/tp10.pdf}{TP 10}.
Pour lancer plusieurs fois le programme, j'ai utilisé la commande
\mintinline{fish}|for| du shell \texttt{fish}. Pour exemple, voici la commande
pour lancer l'ordonnanceur 100 fois avec \qs~et tous les threads disponibles :
\begin{figure}[H]
\centering
\mintinline{fish}|for i in (seq 100); ./ordonnanceur.elf -qt 0; end|
\end{figure}
\subsection{Séquentiel}\label{stats:seq}
\begin{description} \begin{description}
\item[\bone] \hspace{1em} \item[\mone] Le programme a été lancé \textbf{100 fois}.
\begin{description} Le temps moyen d'exécution a été de \textbf{0,855 secs}
\item[\mone] Le programme a été lancé \textbf{100 fois}. \item[\mtwo] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{0,855 secs} Le temps moyen d'exécution a été de \textbf{1,139 secs}
\item[\mtwo] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{1,139 secs}
\end{description}
\item[\btwo] \hspace{1em}
\begin{description}
\item[\mone] Le programme a été lancé \textbf{10 fois}.
Le temps moyen d'exécution a été de \textbf{3,733 secs}
\item[\mtwo] Le programme a été lancé \textbf{10 fois}.
Le temps moyen d'exécution a été de \textbf{6,020 secs}
\end{description}
\end{description} \end{description}
\statPlot{serial}{en séquentiel} Ce programme ne bénéficie pas de toute la puissance de la machine.
\begin{figure}[H]
\centering
\includegraphics[alt={Graphique},width=\textwidth]{imgs/bottom-seq.jpg}
\caption{Exploitation des ressources sur la \mone~avec \docref{desc:seq}}
\label{fig:btm-seq}
\end{figure}
Ce programme ne bénéficie pas de toute la puissance de la machine,
visible notamment grâce à la \autoref{fig:btm-seq} où l'on voit que seulement
un \coeur~est utilisé.
\subsection{Threads sans gestion}\label{stats:th_ges} \subsection{Threads sans gestion}\label{stats:th_ges}
\begin{description} \begin{description}
\item[\bone] \hspace{1em} \item[\mone] Le programme a été lancé \textbf{10 fois}.
\begin{description} Le temps moyen d'exécution a été de \textbf{35,985 secs}
\item[\mone] Le programme a été lancé \textbf{10 fois}. \item[\mtwo] Le programme a été lancé \textbf{10 fois}.
Le temps moyen d'exécution a été de \textbf{35,985 secs} Le temps moyen d'exécution a été de \textbf{18,854 secs}
\item[\mtwo] Le programme a été lancé \textbf{10 fois}.
Le temps moyen d'exécution a été de \textbf{18,854 secs}
\end{description}
\item[\btwo] \hspace{1em}
\begin{description}
\item[\mone] Le programme a été lancé \textbf{10 fois}.
Le temps moyen d'exécution a été de \textbf{66,078 secs}
\item[\mtwo] Le programme a été lancé \textbf{10 fois}.
Le temps moyen d'exécution a été de \textbf{41,060 secs}
\end{description}
\end{description} \end{description}
\statPlot{solution1}{avec des threads} La création des threads pour chaque tâche créer un énorme
goulot d'étranglement qui réduit de grandement les performances.
\begin{figure}[H] Le temps d'exécution étant long, nous pouvons voir les threads via la commande
\centering \texttt{top} : \mintinline{bash}|top -Hp $(pgrep ordonnanceur)|.
\includegraphics[alt={Graphique},width=\textwidth]{imgs/bottom-threads.jpg}
\caption{Exploitation des ressources sur la \mone~avec \docref{desc:threads}}
\label{fig:btm-threads}
\end{figure}
La création des threads pour chaque tâche crée un énorme goulot Pour augmenter les performances, il faut avoir une taille fixe de threads créer,
d'étranglement qui réduit grandement les performances. On le voit notamment et donc il faut gérer les tâches et décider de quelle tâche va sur quel thread.
sur la \autoref{fig:btm-threads} où tous les \coeur{}s sont utilisés, mais très
peu. Créer de façon incontrôlée des threads n'est pas une manière efficace de
répartir la charge.
% Le temps d'exécution étant long, nous pouvons voir les threads avec la commande
% \texttt{top} : \mintinline{bash}|top -Hp $(pgrep ordonnanceur)|.
Pour augmenter les performances, il faut donc avoir une taille fixe de threads,
et par conséquent, il faut gérer les tâches et décider de quelle tâche va sur
quel thread.
\subsection{Threads avec pile}\label{stats:stack} \subsection{Threads avec pile}\label{stats:stack}
\begin{description} \begin{description}
\item[\bone] \hspace{1em} \item[\mone] Le programme a été lancé \textbf{100 fois}.
\begin{description} Le temps moyen d'exécution a été de \textbf{0,258 secs}
\item[\mone] Le programme a été lancé \textbf{100 fois}. \item[\mtwo] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{0,258 secs} Le temps moyen d'exécution a été de \textbf{0,356 secs}
\item[\mtwo] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{0,356 secs}
\end{description}
\item[\btwo] \hspace{1em}
\begin{description}
\item[\mone] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{0,787 secs}
\item[\mtwo] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{1,858 secs}
\end{description}
\end{description} \end{description}
\statPlot{solution2}{avec LIFO} Le lancement de nouveau thread étant limité, les performances
Le lancement de nouveaux threads étant limité, les performances
sont grandement améliorées par rapport aux tests de \docref{stats:th_ges}. sont grandement améliorées par rapport aux tests de \docref{stats:th_ges}.
Également, grâce au fait que désormais nous utilisons les \coeur{}s~de notre CPU, Également grâce au fait que désormais on utilise les \coeurs~de notre CPU,
les performances sont aussi améliorées par rapport aux tests de les performances sont aussi améliorées par rapport aux tests de
\docref{stats:seq}. \docref{stats:naive}.
Dans la \autoref{fig:btm-lifo}, nous observons que les \coeur{}s du CPU ne sont pas
tous utilisés à 100~\%. Ceci est dû au fait que l'accès à la liste des tâches est
limité, car partagé entre les threads.
\begin{figure}[H]
\centering
\includegraphics[alt={Graphique},width=\textwidth]{imgs/bottom-lifo.jpg}
\caption{Utilisation ressources sur la \mone~avec \docref{desc:th_pile}}
\label{fig:btm-lifo}
\end{figure}
\subsubsection{Sélection aléatoire de tâche} \subsubsection{Sélection aléatoire de tâche}
\begin{description} \begin{description}
\item[\bone] \hspace{1em} \item[\mone] Le programme a été lancé \textbf{100 fois}.
\begin{description} Le temps moyen d'exécution a été de \textbf{0,390 secs}
\item[\mone] Le programme a été lancé \textbf{100 fois}. \item[\mtwo] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{0,390 secs} Le temps moyen d'exécution a été de \textbf{0,438 secs}
\item[\mtwo] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{0,438 secs}
\end{description}
\item[\btwo] \hspace{1em}
\begin{description}
\item[\mone] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{0,438 secs}
\item[\mtwo] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{1,887 secs}
\end{description}
\end{description} \end{description}
\statPlot{solution3}{avec LIFO aléatoire}
Cette implémentation est identique à \docref{stats:stack}, à l'exception que Cette implémentation est identique à \docref{stats:stack}, à l'exception que
les threads récupèrent une tâche aléatoire de la pile au lieu d'y prendre l'on récupère une tâche aléatoire de la pile au lieu d'y prendre la dernière
la dernière ajoutée. ajouté.
Cette façon de faire réduit les performances. Cette façon de faire réduit les performances.
\subsection{Répartition par \ws} \subsection{Répartition par work-stealing}
\begin{description} \begin{description}
\item[\bone] \hspace{1em} \item[\mone] Le programme a été lancé \textbf{100 fois}.
\begin{description} Le temps moyen d'exécution a été de \textbf{0,229 secs}
\item[\mone] Le programme a été lancé \textbf{100 fois}. \item[\mtwo] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{0,229 secs} Le temps moyen d'exécution a été de \textbf{0,397 secs}
\item[\mtwo] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{0,308 secs}
\end{description}
\item[\btwo] \hspace{1em}
\begin{description}
\item[\mone] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{0,447 secs}
\item[\mtwo] Le programme a été lancé \textbf{100 fois}.
Le temps moyen d'exécution a été de \textbf{1,131 secs}
\end{description}
\end{description} \end{description}
\statPlot{solution4}{avec du \ws} Dans cet implémentation, on n'utilises plus une pile mais un deque de tâches.
Dans cette implémentation, nous n'utilisons plus une pile, mais un deque de tâches.
Cette façon de faire est légèrement meilleur que \docref{desc:th_pile}. Cette façon de faire est légèrement meilleur que \docref{desc:th_pile}.
Dans la \autoref{fig:btm-ws}, nous observons que les \coeur{}s du CPU sont
proches de 100~\% d'utilisation. Comparé à \docref{stats:stack}, nous gagnons
en moyenne \approx~10~\% de l'utilisation du processeur dans son entièreté.
\begin{figure}[H]
\centering
\includegraphics[alt={Graphique},width=\textwidth]{imgs/bottom-ws.jpg}
\caption{Exploitation des ressources sur la \mone~avec \docref{desc:ws}}
\label{fig:btm-ws}
\end{figure}
Concernant les statistiques de vols, les résultats sont obtenus en récupérant
les données par thread en prenant des précautions pour ne pas dégrader les
performances de l'ordonnanceur. Les données sont récoltées par thread et ensuite
tout est additionné quand toutes les tâches sont terminées.
\begin{description}
\item[\bone] \hspace{1em}
\begin{description}
\item[\mone] \hspace{1em}
\begin{samepage}
\begin{minted}{ada}
------- Satistiques -------
Total tâches : 368439
Total vols : 5484
Total vols réussis : 5222
Total vols échoués : 262
----------------------------
\end{minted}
\end{samepage}
\item[\mtwo] \hspace{1em}
\begin{samepage}
\begin{minted}{ada}
------- Statistiques -------
Total tâches : 368439
Total vols : 2298
Total vols réussis : 2164
Total vols échoués : 134
----------------------------
\end{minted}
\end{samepage}
\end{description}
\item[\btwo] \hspace{1em}
\begin{description}
\item[\mone] \hspace{1em}
\begin{samepage}
\begin{minted}{ada}
------- Statistiques -------
Total tâches : 873813
Total vols : 23232
Total vols réussis : 23192
Total vols échoués : 40
----------------------------
\end{minted}
\end{samepage}
\item[\mtwo] \hspace{1em}
\begin{samepage}
\begin{minted}{ada}
------- Statistiques -------
Total tâches : 873813
Total vols : 21491
Total vols réussis : 21465
Total vols échoués : 26
----------------------------
\end{minted}
\end{samepage}
\end{description}
\end{description}
Nous pouvons remarquer que moins il y a de vols échoués, meilleur est
le temps d'exécution. Également, le nombre de vols échoués est faible quand
beaucoup de tâches sont créées, car la probabilité qu'un thread ait des tâches
en attente est plus grande.
\section{Interprétation}
En se basant sur les résultats des tests de \docref{sec:stats}, on remarque
que l'algorithme de \ws~est le plus performant dans la \mone~ainsi que dans
la \mtwo. Nous voyons aussi que ce système profite d'un grand nombre de
tâches créées, car le \btwo~créant quatre tâches d'un coup provoque nettement
moins de vol comparé au \bone~qui n'en crée que deux.
\clearpage
\appendix
\section{Crédits}
J'ai utilisé un bout de code de \href{https://expreg.org/amsi/C/}{Farès Belhadj}
d'un TP de L2 pour afficher une image au format \texttt{bmp} afin vérifier que
le \btwo~fonctionnait correctement. Ce qui donne la \autoref{fig:mandelbrot}.
\begin{figure}[H]
\centering
\includegraphics[alt={Fractale \mandel},width=0.7\textwidth]{imgs/mandelbrot.jpg}
\caption{Example de \mandel}
\label{fig:mandelbrot}
\end{figure}
Les captures d'écran d'exploitation des ressources ont été prises via le
programme \href{https://github.com/ClementTsang/bottom}{bottom}.
\end{document} \end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View file

@ -2,6 +2,7 @@
#include "../includes/quicksort.h" #include "../includes/quicksort.h"
#include <assert.h> #include <assert.h>
#include <locale.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
@ -11,14 +12,13 @@ main(int argc, char *argv[])
{ {
int serial = 0; int serial = 0;
int nthreads = -1; int nthreads = -1;
int qlen = -1;
int quicksort = 0; int quicksort = 0;
int mandelbrot = 0; int mandelbrot = 0;
double delay; double delay;
int opt; int opt;
while((opt = getopt(argc, argv, "qmst:n:")) != -1) { while((opt = getopt(argc, argv, "qmst:")) != -1) {
if(opt < 0) { if(opt < 0) {
goto usage; goto usage;
} }
@ -36,9 +36,6 @@ main(int argc, char *argv[])
case 't': case 't':
nthreads = atoi(optarg); nthreads = atoi(optarg);
break; break;
case 'n':
qlen = atoi(optarg);
break;
default: default:
goto usage; goto usage;
} }
@ -48,15 +45,16 @@ main(int argc, char *argv[])
} }
if(quicksort) { if(quicksort) {
delay = benchmark_quicksort(serial, nthreads, qlen); delay = benchmark_quicksort(serial, nthreads);
} else if(mandelbrot) { } else if(mandelbrot) {
delay = benchmark_mandelbrot(serial, nthreads, qlen); delay = benchmark_mandelbrot(serial, nthreads);
} else { } else {
goto usage; goto usage;
} }
assert(delay >= 0.0); assert(delay >= 0.0);
printf("Done in %lf seconds.\n", delay); setlocale(LC_NUMERIC, "fr_FR.UTF-8");
printf("%lf\n", delay);
return 0; return 0;

View file

@ -3,7 +3,6 @@
#include <assert.h> #include <assert.h>
#include <complex.h> #include <complex.h>
#include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
@ -121,46 +120,18 @@ draw(void *closure, struct scheduler *s)
// Sinon on recoupe le morceau // Sinon on recoupe le morceau
int mid_x = (start_x + end_x) / 2; int mid_x = (start_x + end_x) / 2;
int mid_y = (start_y + end_y) / 2; int mid_y = (start_y + end_y) / 2;
int rc;
while((rc = sched_spawn( int rc1 = sched_spawn(
draw, draw, new_mandelbrot_args(image, start_x, start_y, mid_x, mid_y),
new_mandelbrot_args(image, start_x, start_y, mid_x, mid_y), s);
s)) < 0) { int rc2 = sched_spawn(
if(errno != EAGAIN) { draw, new_mandelbrot_args(image, mid_x, start_y, end_x, mid_y), s);
break; int rc3 = sched_spawn(
} draw, new_mandelbrot_args(image, start_x, mid_y, mid_x, end_y), s);
} int rc4 = sched_spawn(
assert(rc >= 0); draw, new_mandelbrot_args(image, mid_x, mid_y, end_x, end_y), s);
while( assert(rc1 >= 0 && rc2 >= 0 && rc3 >= 0 && rc4 >= 0);
(rc = sched_spawn(
draw, new_mandelbrot_args(image, mid_x, start_y, end_x, mid_y),
s)) < 0) {
if(errno != EAGAIN) {
break;
}
}
assert(rc >= 0);
while(
(rc = sched_spawn(
draw, new_mandelbrot_args(image, start_x, mid_y, mid_x, end_y),
s)) < 0) {
if(errno != EAGAIN) {
break;
}
}
assert(rc >= 0);
while((rc = sched_spawn(
draw, new_mandelbrot_args(image, mid_x, mid_y, end_x, end_y),
s)) < 0) {
if(errno != EAGAIN) {
break;
}
}
assert(rc >= 0);
} }
} }
@ -175,19 +146,15 @@ draw_serial(unsigned int *image)
} }
double double
benchmark_mandelbrot(int serial, int nthreads, int qlen) benchmark_mandelbrot(int serial, int nthreads)
{ {
unsigned int *image; unsigned int *image;
struct timespec begin, end; struct timespec begin, end;
double delay; double delay;
int rc; int rc;
int n = WIDTH * HEIGHT; int size = WIDTH * HEIGHT;
if(qlen <= 0) { if(!(image = malloc(size * sizeof(unsigned int)))) {
qlen = n;
}
if(!(image = malloc(n * sizeof(unsigned int)))) {
perror("Image allocation"); perror("Image allocation");
return 1; return 1;
} }
@ -197,7 +164,7 @@ benchmark_mandelbrot(int serial, int nthreads, int qlen)
if(serial) { if(serial) {
draw_serial(image); draw_serial(image);
} else { } else {
rc = sched_init(nthreads, qlen, draw, rc = sched_init(nthreads, size, draw,
new_mandelbrot_args(image, 0, 0, WIDTH, HEIGHT)); new_mandelbrot_args(image, 0, 0, WIDTH, HEIGHT));
assert(rc >= 0); assert(rc >= 0);
} }

View file

@ -2,7 +2,6 @@
#include "../includes/sched.h" #include "../includes/sched.h"
#include <assert.h> #include <assert.h>
#include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
@ -88,24 +87,14 @@ quicksort(void *closure, struct scheduler *s)
} }
p = partition(a, lo, hi); p = partition(a, lo, hi);
rc = sched_spawn(quicksort, new_args(a, lo, p), s);
while((rc = sched_spawn(quicksort, new_args(a, lo, p), s)) < 0) {
if(errno != EAGAIN) {
break;
}
}
assert(rc >= 0); assert(rc >= 0);
rc = sched_spawn(quicksort, new_args(a, p + 1, hi), s);
while((rc = sched_spawn(quicksort, new_args(a, p + 1, hi), s)) < 0) {
if(errno != EAGAIN) {
break;
}
}
assert(rc >= 0); assert(rc >= 0);
} }
double double
benchmark_quicksort(int serial, int nthreads, int qlen) benchmark_quicksort(int serial, int nthreads)
{ {
int *a; int *a;
struct timespec begin, end; struct timespec begin, end;
@ -113,10 +102,6 @@ benchmark_quicksort(int serial, int nthreads, int qlen)
int rc; int rc;
int n = 10 * 1024 * 1024; int n = 10 * 1024 * 1024;
if(qlen <= 0) {
qlen = (n + 127) / 128;
}
a = malloc(n * sizeof(int)); a = malloc(n * sizeof(int));
unsigned long long s = 0; unsigned long long s = 0;
@ -130,7 +115,8 @@ benchmark_quicksort(int serial, int nthreads, int qlen)
if(serial) { if(serial) {
quicksort_serial(a, 0, n - 1); quicksort_serial(a, 0, n - 1);
} else { } else {
rc = sched_init(nthreads, qlen, quicksort, new_args(a, 0, n - 1)); rc = sched_init(nthreads, (n + 127) / 128, quicksort,
new_args(a, 0, n - 1));
assert(rc >= 0); assert(rc >= 0);
} }

View file

@ -11,26 +11,11 @@ struct task_info {
taskfunc f; taskfunc f;
}; };
/* Statistiques */
struct stats {
/* Total des vols échoués */
int total_failed_steal;
/* Total des vols */
int total_steal;
/* Total des tâches effecutés */
int total_tasks;
};
/* Structure de chaque thread */ /* Structure de chaque thread */
struct worker { struct worker {
/* Premier élément du deque (dernier ajouter) */ /* Premier élément du deque (dernier ajouter) */
int bottom; int bottom;
/* Statistiques récoltés */
struct stats data;
/* Mutex qui protège cette structure */ /* Mutex qui protège cette structure */
pthread_mutex_t mutex; pthread_mutex_t mutex;
@ -116,10 +101,8 @@ sched_init(int nthreads, int qlen, taskfunc f, void *closure)
return -1; return -1;
} }
for(int i = 0; i < nthreads; ++i) { for(int i = 0; i < nthreads; ++i) {
// Statistiques sched.workers[i].bottom = 0;
sched.workers[i].data.total_failed_steal = 0; sched.workers[i].top = 0;
sched.workers[i].data.total_steal = 0;
sched.workers[i].data.total_tasks = 0;
// Initialisation mutex // Initialisation mutex
if(pthread_mutex_init(&sched.workers[i].mutex, NULL) != 0) { if(pthread_mutex_init(&sched.workers[i].mutex, NULL) != 0) {
@ -127,15 +110,13 @@ sched_init(int nthreads, int qlen, taskfunc f, void *closure)
return sched_init_cleanup(sched, -1); return sched_init_cleanup(sched, -1);
} }
// Initialisation deque // Allocation mémoire deque
if(!(sched.workers[i].tasks = if(!(sched.workers[i].tasks =
malloc(sched.qlen * sizeof(struct task_info)))) { malloc(sched.qlen * sizeof(struct task_info)))) {
fprintf(stderr, "Thread %d: ", i); fprintf(stderr, "Thread %d: ", i);
perror("Deque list"); perror("Deque list");
return sched_init_cleanup(sched, -1); return sched_init_cleanup(sched, -1);
} }
sched.workers[i].bottom = 0;
sched.workers[i].top = 0;
} }
// Initialise l'aléatoire // Initialise l'aléatoire
@ -183,25 +164,6 @@ sched_init(int nthreads, int qlen, taskfunc f, void *closure)
} }
} }
/* Statistiques */
int total_failed_steal = 0;
int total_steal = 0;
int total_tasks = 0;
for(int i = 0; i < sched.nthreads; ++i) {
total_failed_steal += sched.workers[i].data.total_failed_steal;
total_steal += sched.workers[i].data.total_steal;
total_tasks += sched.workers[i].data.total_tasks;
}
printf("------- Statistiques -------\n");
printf(" Total tâches\t : %d\n", total_tasks);
printf(" Total vols\t : %d\n", total_steal);
printf(" Total vols réussis : %d\n", total_steal - total_failed_steal);
printf(" Total vols échoués : %d\n", total_failed_steal);
printf("----------------------------\n");
return sched_init_cleanup(sched, 1); return sched_init_cleanup(sched, 1);
} }
@ -262,8 +224,6 @@ sched_spawn(taskfunc f, void *closure, struct scheduler *s)
return -1; return -1;
} }
s->workers[th].data.total_tasks++;
s->workers[th].tasks[s->workers[th].bottom] = s->workers[th].tasks[s->workers[th].bottom] =
(struct task_info){closure, f}; (struct task_info){closure, f};
s->workers[th].bottom = next; s->workers[th].bottom = next;
@ -301,8 +261,6 @@ sched_worker(void *arg)
if(!found) { if(!found) {
// Vol car aucune tâche trouvée // Vol car aucune tâche trouvée
s->workers[curr_th].data.total_steal++;
pthread_mutex_lock(&s->mutex); pthread_mutex_lock(&s->mutex);
int nthreads = s->nthreads; int nthreads = s->nthreads;
pthread_mutex_unlock(&s->mutex); pthread_mutex_unlock(&s->mutex);
@ -327,8 +285,6 @@ sched_worker(void *arg)
// Aucune tâche à faire // Aucune tâche à faire
if(!found) { if(!found) {
s->workers[curr_th].data.total_failed_steal++;
pthread_mutex_lock(&s->mutex); pthread_mutex_lock(&s->mutex);
s->nthsleep++; s->nthsleep++;