Skip to content

Conversation

@eusuntcarol
Copy link

Fix #176

Prerequisite Checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Updated relevant documentation (if needed).

Description of changes

@eusuntcarol eusuntcarol requested a review from teodutu October 10, 2025 20:27
Copy link

@teodutu teodutu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are good. Now replace references to chapters/compute/.../drills/tasks/.../ to references to the archive and add a lab6.md file that tells students to download the archive from the lab-archives branch. Follow the model from this PR #169.

@eusuntcarol eusuntcarol force-pushed the fix/lab6 branch 2 times, most recently from fe69558 to 83c31f6 Compare October 11, 2025 19:39
Fix cs-pub-ro#176

Signed-off-by: Mihai-Carol Bazga <[email protected]>
Comment on lines -19 to -24
The GIL also makes it so that individual Python instructions are atomic.
Run the code in `chapters/compute/synchronization/drills/tasks/race-condition/support/python/race_condition.py`.
Every time, `var` will be 0 because the GIL doesn't allow the two threads to run in parallel and reach the critical section at the same time.
This means that the instructions `var += 1` and `var -= 1` become atomic.
After implementing them, run each version using 1, 2, 4, and 8 workers for both threads and processes and compare their execution times.

If you're having difficulties solving this exercise, go through [this](../../../guides/sum-array-threads.md) reading material.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part has been removed because it referenced an exercise from Lab 8. Keeping the lab materials separate will be less chaotic for students.

@eusuntcarol eusuntcarol requested a review from teodutu October 11, 2025 19:56
Copy link

@teodutu teodutu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@teodutu teodutu merged commit eefad25 into cs-pub-ro:main Oct 19, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

labs/lab6: Verify lab

2 participants