Suppose a thread holds a mutex lock and gets preempted, what does it do with the lock?
Instructor solution
You may exit out of this review and return later without penalty.
Concurrency & Logic Programming
What are mutexes?
What is the role of a scheduler?
Suppose a thread holds a mutex lock and gets preempted, what does it do with the lock?
Suppose we create two mutex locks, L1
and L2
, and they are grabbed by threads T1
and T2
respectively. Now imagine T1
calls wait on L2
and T2
calls wait on L1
, what happens?
What is the relationship between wait
and signal
?
Following the class example with characters in The Iliad, write a rule that could prove that Telemachus is a prince, given the knowledge that his father is a king.
What are some similarities and differences between lists in SML, Prolog, and Racket?
How can we define named constants in Prolog?
In what way is a declarative Prolog rule more powerful than the usual imperative function?
How do we assign arithmetic results in Prolog?
Suppose a thread holds a mutex lock and gets preempted, what does it do with the lock?
You may exit out of this review and return later without penalty.
OpenClass is on a mission to improve & democratize education. Through our platform, educators can share assignments privately or with our entire community to improve accessibility of the best learning resources around the world.
Our assignments guide students through research-backed study sessions to reinforce learning. If this review is relevant to your teachings, feel free to add it to one of your classes!
Our format is simple and engaging: students are asked a retrieval question, then shown corrective feedback and a multiple-choice mastery question to assess their understanding of the material. Assignments adapt to unique student needs and continue to draw questions until a student has demonstrated mastery.