Think you've got it?
Concurrency & Logic Programming
1.What are mutexes?
2.What is the role of a scheduler?
3.Suppose a thread holds a mutex lock and gets preempted, what does it do with the lock?
4.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?
5.What is the relationship between wait and signal?
6.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.
7.What are some similarities and differences between lists in SML, Prolog, and Racket?
8.How can we define named constants in Prolog?
9.In what way is a declarative Prolog rule more powerful than the usual imperative function?
10.How do we assign arithmetic results in Prolog?