diff --git a/4a1s/CP/PL - Aula 6.md b/4a1s/CP/PL - Aula 6.md index 9bf60d1..eb478f1 100644 --- a/4a1s/CP/PL - Aula 6.md +++ b/4a1s/CP/PL - Aula 6.md @@ -1,5 +1,6 @@ 18 Outubro 2023 - #CP +https://www.ibm.com/docs/en/xl-c-aix/13.1.0?topic=descriptions-pragma-directives-parallel-processing ## Ex 1 ### a) Running the code (first time): @@ -15,7 +16,7 @@ Yes, since the threads do the same task (orderly printing ids) following the ord NOTE: These threads use a fork-join architecture, aka both threads work simultaneously and when one ends, it waits for the other to finish their job to then end both threads and continuing on with the code. ### c) -It is dependant on the CPU availability in each clock cycle. A thread, when executed uses +It is dependant on the CPU availability in each clock cycle. * * * @@ -64,4 +65,8 @@ The output is always the same, since the instruction ''''\#pragma omp barrier''' ### 3.2 ![[Pasted image 20231018122801.png]] -O resultado é semelhante ao \#pragma omp ordered \ No newline at end of file +O resultado é semelhante ao ''\#pragma omp for'', sendo que colocar ''ordered'' obriga a ordenação das threads conforme a forma sequencial de código. + + +## Ex 4 +### 4.1