This week in CST334 we learned about concurrency and the challenges that can come with using threads. In this weeks lab, I saw firsthand how threads can run independently but on the other hand how things can go wrong when they share data. In the first program the threads didn't always get the correct values because they were sharing the same variables which would lead to inconsistent results. After fixing the program by giving each thread its own isolated copy of the data everything would work as expected. This showed how important it is to manage shared resources properly and plan ahead when working with multithreaded programs. It was a great way to understand how to handle concurrency better.
This week I focused a lot on understanding time complexity and recursive analysis. It was challenging at first to figure out how to break down recursive functions and write the correct recurrence relations. Applying the Master Theorem was especially tough because I had to carefully identify each part of the formula and decide which case applied. I also spent time reviewing the difference between Big O, Big Omega, and Big Theta, which helped me better understand how to describe the efficiency of an algorithm. These concepts took time to click but working through examples really helped.
Comments
Post a Comment