Exercise 4 has been graded and posted on the Moodle system. The grading criteria and scheme are as follows:
Base Points: (1pt for each)
- mutex and barrier initialization
- read input
- thread creation
- enc() implementation
- protection of critical region by mutex (sandwiched by lock/unlock)
- barrier (to wait for worker threads to finish)
- print_output implementation
Advanced Points (2pts for each)
- check if stridx < length after lock acquisition
- mutex locking only for copying and incrementing stridx (excludes other operations of enc())