When we started talking about threading, we focused primarily on the kinds of problems where threads didn’t need to communicate much with each other. Of course, threads need to talk to each other in as much as processes do in as much as any concurrent actor needs to talk to someone else: we have both communication that may need to happen, but also managing access to limited resources.
Think about this as cooks in a kitchen at a restaurant. They all have jobs to do that are fairly similar: they all have access to the same resources (food, ovens, fryers, etc) and they all have to coordinate with one another to access those resources.
We’re going to look at this from two perspectives: from the programmer’s perspective (how do I use this API?) and from the OS’s perspective (how does an OS implement this API?).
- Compare and contrast methods for building locks. (Chapter 28, video)
- Evaluate implementations of locks. (Chapter 28, video)
- Use condition variables in a program. (Chapter 30)
- Identify concurrency bugs in a program (both non-deadlock and deadlock). (Chapter 32, lecture)
- Describe how to change code to prevent deadlock from happening. (Chapter 32, lecture)
Chapters to read:
- Chapter 28 Locks (Sections 28.10, 28.15, and 28.16 are optional, video summary will be posted)
- Chapter 30 Condition variables (Note: Not on test, but will be assessed in A3).
- Chapter 32 Common concurrency bugs
Recommended lab activities:
本网站支持 Alipay WeChatPay PayPal等支付方式
E-mail: firstname.lastname@example.org 微信号:vipnxx