CST 334 - Week 5

 This week's module focused on concurrency. The initial readings focused on threads and why there are being used at all. Per the reading, the two major reasons are parallelism and to avoid blocking program progress due to slow I/O. While one may use multiple process rather than threads, threads can share an address space, making it easier to share data. Despite it's functionality, some issues may arise when multiple threads executing code result in a race condition. This race condition, or data race, may in turn lead to indeterminate programs with unexpected outputs. One way to solve this issue is the use of locks, to ensure the shared resource being accessed by these threads execute as if it were a single atomic instruction. The readings go on to discuss the ways in which locks are implemented in data structures, including linked lists, queues, and hash tables.  

Comments

Popular Posts