Tuesday, April 4, 2023

Operating Systems: Journal 5

My learning this week focused on multi-threaded programming, where a program with multiple threads can be viewed as having multiple processes that share the same address space and data. I also learned that indeterminate results can occur when different threads access the same shared variables. Because of this, mutual exclusion is important to prevent data races, which can be achieved using locks. Locks must provide fairness, performance, and mutual exclusion.

I also learned that concurrency through multiple threads is referred to as multithreading. When a CPU is assigned a unique thread, the program being executed can run faster. Additionally, the advantage of multithreading is that memory maps do not need to be updated when switching between threads.

This week, I gained hands-on experience with lab number 5, which allowed me to see in real-time how threads are created and joined. I also worked on implementing a bug fix that was found within lab 5.

Overall, this week's topics helped me understand the importance of mutual exclusion and concurrency in developing efficient and effective multi-threaded programs.

No comments:

Post a Comment