From 8bcf9bc88723ef7821ff697683b4c1008b980a5b Mon Sep 17 00:00:00 2001 From: hiGepi Date: Tue, 22 Nov 2022 14:39:55 +0100 Subject: [PATCH] t2 tp test --- T2/tp/exercice-1/acquisitionManagerAtomic.c | 168 ++++++++++++++++++ T2/tp/exercice-1/acquisitionManagerAtomic.o | Bin 0 -> 5624 bytes T2/tp/exercice-1/acquisitionManagerPOSIX.c | 6 +- T2/tp/exercice-1/acquisitionManagerPOSIX.o | Bin 6264 -> 0 bytes .../exercice-1/acquisitionManagerTestAndSet.c | 165 +++++++++++++++++ T2/tp/exercice-1/displayManager.c | 4 +- T2/tp/exercice-1/displayManager.o | Bin 2864 -> 2864 bytes T2/tp/exercice-1/messageAdder.c | 10 +- T2/tp/exercice-1/messageAdder.o | Bin 3304 -> 3304 bytes .../exercice-1/multitaskingAccumulatorAtomic | Bin 0 -> 18736 bytes T2/tp/exercice-1/multitaskingAccumulatorPosix | Bin 18928 -> 0 bytes 11 files changed, 343 insertions(+), 10 deletions(-) create mode 100755 T2/tp/exercice-1/acquisitionManagerAtomic.c create mode 100644 T2/tp/exercice-1/acquisitionManagerAtomic.o delete mode 100644 T2/tp/exercice-1/acquisitionManagerPOSIX.o create mode 100755 T2/tp/exercice-1/acquisitionManagerTestAndSet.c create mode 100755 T2/tp/exercice-1/multitaskingAccumulatorAtomic delete mode 100755 T2/tp/exercice-1/multitaskingAccumulatorPosix diff --git a/T2/tp/exercice-1/acquisitionManagerAtomic.c b/T2/tp/exercice-1/acquisitionManagerAtomic.c new file mode 100755 index 0000000..f91618d --- /dev/null +++ b/T2/tp/exercice-1/acquisitionManagerAtomic.c @@ -0,0 +1,168 @@ +#include +#include +#include +#include +#include +#include +#include "acquisitionManager.h" +#include "msg.h" +#include "iSensor.h" +#include "multitaskingAccumulator.h" +#include "iAcquisitionManager.h" +#include "debug.h" +#include "stdatomic.h" + + +//producer count storage +_Atomic int produceCount = 0; + +pthread_t producers[4]; + +static void *produce(void *params); + +MSG_BLOCK Buffer[BUFFER_SIZE]; + +/** +* Semaphores and Mutex +*/ +//TODO +sem_t semaphore_libre; +sem_t semaphore_occupe; + +// pthread_mutex_t m_write = PTHREAD_MUTEX_INITIALIZER; + +/** + * Usefull variables + */ + +_Atomic int index_libre = 0; +_Atomic int thread_count = 0; + +/* +* Creates the synchronization elements. +* @return ERROR_SUCCESS if the init is ok, ERROR_INIT otherwise +*/ +static unsigned int createSynchronizationObjects(void); + +/* +* Increments the produce count. +*/ +static void incrementProducedCount(void); + +static unsigned int createSynchronizationObjects(void) +{ + int error; + + //TODO DONE + if((error = sem_init(&semaphore_libre, 0, BUFFER_SIZE)) < 0){ + printf("[acquisitionManager]Semaphore L Error No. %d\n",error); + return error; + } + + if((error = sem_init(&semaphore_occupe, 0, 0)) < 0){ + printf("[acquisitionManager]Semaphore O Error No. %d\n",error); + return error; + } + + printf("[acquisitionManager]Semaphore created\n"); + return ERROR_SUCCESS; +} + +static void incrementProducedCount(void) +{ + //TODO + produceCount++; +} + +unsigned int getProducedCount(void) +{ + unsigned int p = 0; + //TODO + p = produceCount; + return p; +} + +MSG_BLOCK getMessage(void){ + //TODO + MSG_BLOCK res; + static int index_count = 0; + + sem_wait(&semaphore_occupe); + res = Buffer[index_count]; + index_count = (index_count+1)%BUFFER_SIZE; + sem_post(&semaphore_libre); + + return res; +} + +//TODO create accessors to limit semaphore and mutex usage outside of this C module. + +unsigned int acquisitionManagerInit(void) +{ + unsigned int i; + printf("[acquisitionManager]Synchronization initialization in progress...\n"); + fflush( stdout ); + if (createSynchronizationObjects() == ERROR_INIT) + return ERROR_INIT; + + printf("[acquisitionManager]Synchronization initialization done.\n"); + + for (i = 0; i < PRODUCER_COUNT; i++) + { + //TODO + pthread_create(&producers[i], NULL, produce, NULL); + } + + return ERROR_SUCCESS; +} + +void acquisitionManagerJoin(void) +{ + unsigned int i; + for (i = 0; i < PRODUCER_COUNT; i++) + { + //TODO + pthread_join(producers[i], NULL); + } + + //TODO + sem_destroy(&semaphore_libre); + sem_destroy(&semaphore_occupe); + printf("[acquisitionManager]Semaphore cleaned\n"); +} + +void *produce(void* params) +{ + D(printf("[acquisitionManager]Producer created with id %d\n", gettid())); + unsigned int i = 0; + int index_lock; + int thread_num; + MSG_BLOCK message; + + //Counting producers + thread_num = thread_count; + thread_count++; + + while (i < PRODUCER_LOOP_LIMIT) + { + i++; + sleep(PRODUCER_SLEEP_TIME+(rand() % 5)); + //TODO + sem_wait(&semaphore_libre); + + // pthread_mutex_lock(&m_write); + index_lock = index_libre; + index_libre = (index_libre + 1)%BUFFER_SIZE; + // pthread_mutex_unlock(&m_write); + + getInput(thread_num, &message); + Buffer[index_lock] = message; + incrementProducedCount(); + + sem_post(&semaphore_occupe); + } + printf("[acquisitionManager] %d termination\n", gettid()); + //TODO + pthread_exit(NULL); + +} diff --git a/T2/tp/exercice-1/acquisitionManagerAtomic.o b/T2/tp/exercice-1/acquisitionManagerAtomic.o new file mode 100644 index 0000000000000000000000000000000000000000..fde4d32272fb32742671fb27373ad8561c63d618 GIT binary patch literal 5624 zcmb_fU2Ggz6~61;B-{LqHzk0frJkYG^rG*6x@=^oO9=1 z`*<>ggv6C*?!Di9=ey^g`#WD5O&{n8g_uks_DQy0lPF`2Ti45jyg0}dwu8OddB@wy z&n6#C&LpR2ru4PFp(f$My-LmuYi1V+s!I9Rx z5pSLe>Bbr7MZLH*arN9d*I4;r@A>xj!FJ?C?-_@)I)8MH3#6SD-FaDGz7$P`ey6v> zpK7O1gHIv7y%0^cM&j4>=BvP1yb%Uhd*9M~|FF0m0biFdhu_qnl^xQFOU-ve^}7;F zT>Uo~OufxJ@0<}}VwHdE>>gyN@%!b->gsB~vwMW`c(!_)@bff3N1S9RyS?mUm(!f=Gn>uvW-dtmYBM}Y#qJ1;_LTAQ6M5G^V1hD=|+IbN=Q zD-usTf6<*+Qtij$Q4CGWiNy8RvA8!rDHwai+&CcvXF^Wj>rRdO4t?<)b|vjxN`C&V z2#7nMrbWPb@DfWiQ=;wlQBPd|1$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44IG)W4??(^>zmreEqwxI*f*}8s z@F;v3K@hL~qXJ#YHzkht@f=rnjuZS-1gGcIrwRUT$;WZ=j8k@AkvQ7NdxgSZl{oV8 znym2eOWYgpj|l%^!v873shvL&obs;j( z;ExczU*c#7?=Z^F0m8>SfWi+EyqVw=#136QxbLB$KXjeozK4S2Zi7eJ$9)e4acbwA z#135#uMxfuI?B#(2%pX`?r$h)AAM5${T#vRI$w)K5U)Sm2u|%hDsgYT5yGeO?j|^m zH%f5I?<4kU9`+GFUFQc0e>23P@^hZxc!n$dEn=sU;D021x*o0({^tn)UBbsRR@wi6 z@Ts4734c4`H^_4fyLE!EkvQg=@*gC8{9{(*ZYKOK1aBdHjo^boYo$#rjzbE{5V&~6R$Ge2d_$Fmpr(-2Qi~GF=i)^L1|lV zIjU-wnM)dQ)v%e7PTEOk94nQW0S7uXkRCC1Gb2?P8#Cc(H}VDBG~idZO&sO2J(4dQ za4#yFmOTNgXwV!@WUSg(7bqWo9T zQ&2&hUj49~x0{M6ORs(oaKHH%mptejmwGt=csEq~YX1GkMwNLv{&_i%jey~~=G8}= i-nj>e{SXHPx#mfjrwRW+{`%v1c!NCa7K?AM{(k@<%O@oO diff --git a/T2/tp/exercice-1/acquisitionManagerTestAndSet.c b/T2/tp/exercice-1/acquisitionManagerTestAndSet.c new file mode 100755 index 0000000..17c40f9 --- /dev/null +++ b/T2/tp/exercice-1/acquisitionManagerTestAndSet.c @@ -0,0 +1,165 @@ +#include +#include +#include +#include +#include +#include +#include "acquisitionManager.h" +#include "msg.h" +#include "iSensor.h" +#include "multitaskingAccumulator.h" +#include "iAcquisitionManager.h" +#include "debug.h" + + +//producer count storage +_Atomic int produceCount = 0; + +volatile unsigned int producedCount = 0; + +pthread_t producers[4]; + +static void *produce(void *params); + +/** +* Semaphores and Mutex +*/ +//TODO +sem_t semaphore_libre; +sem_t semaphore_occupe; + +// pthread_mutex_t m_write = PTHREAD_MUTEX_INITIALIZER; + +/** + * Usefull variables + */ + +_Atomic int index_libre = 0; +_Atomic int thread_count = 0; + +/* +* Creates the synchronization elements. +* @return ERROR_SUCCESS if the init is ok, ERROR_INIT otherwise +*/ +static unsigned int createSynchronizationObjects(void); + +/* +* Increments the produce count. +*/ +static void incrementProducedCount(void); + +static unsigned int createSynchronizationObjects(void) +{ + int error; + + //TODO DONE + if((error = sem_init(&semaphore_libre, 0, BUFFER_SIZE)) < 0){ + printf("[acquisitionManager]Semaphore L Error No. %d\n",error); + return error; + } + + if((error = sem_init(&semaphore_occupe, 0, 0)) < 0){ + printf("[acquisitionManager]Semaphore O Error No. %d\n",error); + return error; + } + + printf("[acquisitionManager]Semaphore created\n"); + return ERROR_SUCCESS; +} + +static void incrementProducedCount(void) +{ + //TODO + produceCount++; +} + +unsigned int getProducedCount(void) +{ + unsigned int p = 0; + //TODO + p = produceCount; + return p; +} + + +MSG_BLOCK getMessage(void){ + //TODO + MSG_BLOCK res; + static int index_count = 0; + + sem_wait(&semaphore_occupe); + res = Buffer[index_count]; + index_count = (index_count+1)%BUFFER_SIZE; + sem_post(&semaphore_libre); + + return res; +} + +//TODO create accessors to limit semaphore and mutex usage outside of this C module. + +unsigned int acquisitionManagerInit(void) +{ + unsigned int i; + printf("[acquisitionManager]Synchronization initialization in progress...\n"); + fflush( stdout ); + if (createSynchronizationObjects() == ERROR_INIT) + return ERROR_INIT; + + printf("[acquisitionManager]Synchronization initialization done.\n"); + + for (i = 0; i < PRODUCER_COUNT; i++) + { + //TODO + pthread_create(&producers[i], NULL, produce, NULL); + } + + return ERROR_SUCCESS; +} + +void acquisitionManagerJoin(void) +{ + unsigned int i; + for (i = 0; i < PRODUCER_COUNT; i++) + { + //TODO + pthread_join(producers[i], NULL); + } + + //TODO + sem_destroy(&semaphore_libre); + sem_destroy(&semaphore_occupe); + printf("[acquisitionManager]Semaphore cleaned\n"); +} + +void *produce(void* params) +{ + D(printf("[acquisitionManager]Producer created with id %d\n", gettid())); + unsigned int i = 0; + int index_lock; + int thread_num; + MSG_BLOCK message; + + //Counting producers + thread_num = thread_count; + thread_count++; + + while (i < PRODUCER_LOOP_LIMIT) + { + i++; + sleep(PRODUCER_SLEEP_TIME+(rand() % 5)); + //TODO + sem_wait(&semaphore_libre); + + index_lock = index_libre; + index_libre = (index_libre + 1)%BUFFER_SIZE; + + getInput(thread_num, &message); + Buffer[index_lock] = message; + incrementProducedCount(); + + sem_post(&semaphore_occupe); + } + printf("[acquisitionManager] %d termination\n", gettid()); + //TODO + pthread_exit(NULL); +} \ No newline at end of file diff --git a/T2/tp/exercice-1/displayManager.c b/T2/tp/exercice-1/displayManager.c index 3d1a292..6d7c237 100755 --- a/T2/tp/exercice-1/displayManager.c +++ b/T2/tp/exercice-1/displayManager.c @@ -30,7 +30,7 @@ void displayManagerJoin(void){ static void *display( void *parameters ) { - D(printf("[displayManager]Thread created for display with id %d\n", getpid())); + D(printf("[displayManager]Thread created for display with id %d\n", gettid())); unsigned int diffCount = 0; MSG_BLOCK mBlock; while(diffCount < DISPLAY_LOOP_LIMIT){ @@ -41,7 +41,7 @@ static void *display( void *parameters ) messageDisplay(&mBlock); print(getProducedCount(),getConsumedCount()); } - printf("[displayManager] %d termination\n", getpid()); + printf("[displayManager] %d termination\n", gettid()); //TODO DONE pthread_exit(NULL); } diff --git a/T2/tp/exercice-1/displayManager.o b/T2/tp/exercice-1/displayManager.o index 5b336ebee7a293f444fb21ae5e27642ccfc02d43..5f1ec68ee420190748a603d7f220833486260566 100644 GIT binary patch delta 84 zcmdlWwn1#dDJH`M6Hh5`d~d?SSh87#m4#8VmjMD;fRr#0|M?FAGbcN;iAyd*k`+Oc LUAeiCZ9fYDn4%sa delta 84 zcmdlWwn1#dsflNlnOqn)zBgfEEZD5V%EBnw%>V%`KuQ>h|NMu5>60DV#3dI%BpE=m OB1p2!Hy5()X8{0bhaG7E diff --git a/T2/tp/exercice-1/messageAdder.c b/T2/tp/exercice-1/messageAdder.c index 90e76fa..7b41074 100755 --- a/T2/tp/exercice-1/messageAdder.c +++ b/T2/tp/exercice-1/messageAdder.c @@ -34,7 +34,7 @@ MSG_BLOCK getCurrentSum(){ } unsigned int getConsumedCount(){ - //TODO + //TODO DONE return consumeCount; } @@ -62,13 +62,13 @@ static void incrementConsumeCount(void){ static void *sum( void *parameters ) { - D(printf("[messageAdder]Thread created for sum with id %d\n", getpid())); + D(printf("[messageAdder]Thread created for sum with id %d\n", gettid())); unsigned int i = 0; MSG_BLOCK message; while(i%NV2VBOGb}k z)0cyR&37Epbi1YOo}QktOSj##+iiBw>Djbf7MoBK=mUqAZdl6VK3HT3!MKp7G(r2j zGjl(ElBLr2^ql=;Jvs87`7s~kpQCW5PCfFCw^5~gTMOy9_DjQu70!ADlip^nw^{2k z6lM>BEzgwlps@ADRQONHZ?o1j->>Wx)1N3< zFy;Jih93Fl4-MSRTXcTq+F?}tlPR?~h3k5wdsnTvt~cD+8;zw08V6cdHLhCWNya_P zWIC0L@}NGo;ihfW9HWG3H_EnHsCi0%%76XJU2lKw-1fs4PS^gMf9Q>gZ;Z1I%9CU$ zkUlpt@f3d#J|v^+zYk2U!~ltg%MV<3BJ!g?ikAvefO;qwBwqy1C_ohRG)O7=Z-H}u(8Wzdk zNTeTFR93!~BbG#kv* z{Nc~vkHji*vF6i@N!}%{08gPp{>v{%D!tN9=k_xL(?1%9I0Nz(zpNI&hlrIB@?Z+q#G{sYlC`ZS4w)_d9T& zLn&dvf%95G_>cpqx^dX=z}ZKXcF=+AErL{ez=6+YBcO*IxZWDb)UP}6c@Fu*4jdi9 z4o4ig+eWciIB@De9F9A1nxi?4JMdET49m^ZSr5#5VAcb(9+>sOAL4;uFL>Wu=J2T+ zbENv&>#)7JXEarr8#jj^t2rvwb1Rntp3Ysh9Av=~LGnG6GCle8TrPJ|^0bgoPoA)O z+GtEqj@djd=+l$`V)L|+PftE*^R!8rp8UMc(}F%dxzFZlvoJk*yUo+WK0O(ai4uPovli}e@_-CB_=Iv%?<*-|bN2np2N2xz#lki6N zCbUd;2i%tFO~8uuOzbcZPS`E$4*~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B~1 zA9WFnceWXaA&-a+}eFDoDkH7C}eQtkYXh}^s=<%#k zyZxA_b0qRV>+^Xb)1R=Qrp5U`SESG9icEPPVl&)-n12xwyd;uikT5=%;s4*GSe|*N zuR~{nL!Zxq%to@7@2`r>^Q?a!3DkGlO?;lo|6dC`hQ=QS*5h{kM_}YXTVLO!Y}Q{` zsed^G>odIo%1(XZ)zVFhaz1Q>^_ZvspMWsV-|(uGTCH!cW=TbjLRMU)^Vi~bD(hck zBPv2=rQoF8cT|e{>(vG)<|_VjkQRKn{5=2A@Zhp5N%hxQqv&#ck8=jjmoXZyrS!LY MmBivAg(6n`FJly^Y5)KL literal 0 HcmV?d00001 diff --git a/T2/tp/exercice-1/multitaskingAccumulatorPosix b/T2/tp/exercice-1/multitaskingAccumulatorPosix deleted file mode 100755 index 3c934e3673f01ef62cf6e235d4f5bf7b38cb6ee9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18928 zcmeHPeRN#Kb)VHrSQvXPzz)KE_(2TV0k0*nT^XXXD@*p15!fI*HZ^9o-d#zHrCnt| zf(%KpBXHOwFEJ%4 zbD!Qm?LyM_kG4nSv$`|Cx%bY@ojWt{&AjnFEp5vyTrR=EE&fhL)V@#&1ZCLICs zi3Twpf9Hsc#TiIfN=)VZ6hW>EhboF`wZ`3`Bv(t367)g^3#ME{q9j)?bWc?|Oht`K zlUx-=b=pZ=rYSzAoNtw9sC?m|9a9v})GkN1nYTdY&uc8EIc=9+pH?`_5lnIoTCPFM zF%?>lDch55Lca!WPbW2yN5PPPg>cHP*K$tUtofNz85G*zNQM6^<*n9o<|maNCw)=D zf+?4GGvvrFzi;4fzD1W;t{VNZ0^l0^%9!V7w$v2_1}{)QzBmMron$BOr6H^X+;oVuUK9a6*y|(wEg{*_hBpwPR z&s|Juihlw>;!*A2hD43T0Eu}Q?YQt@%3@ZSX zYFBj`JM@>~f4>ZV68PC-wlI8%Anwu*D*g+9?@M(jBEc{@d7TKfuDLM~jwB*o z(P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