• Home
  • Textbooks
  • A little Smalltalk
  • Processes

A little Smalltalk

Timothy Budd

Chapter 10

Processes - all with Video Answers

Educators


Chapter Questions

00:43

Problem 1

Explain why the method for place: in Figure 10.7 could not be written as follows:
place: anitem counter signal.
mutex critical: [ items addLast: anltem ]

Christopher Stanley
Christopher Stanley
Numerade Educator

Problem 2

Explain why the method for retrieve in Figure 10.7 could not be written as follows:
retrieve
counter wait.
mutex critical: [ $\uparrow$ items removeLast ]

Check back soon!

Problem 3

Write a solution to the Dining Philosophers problem in which each philosopher is allowed to pick up his chopsticks only if both of them are available. Note that the easiest way to do this would be to introduce a monitor for the chopsticks semaphores, and modify the values of the chopsticks array only in a critical section.

Check back soon!

Problem 4

How might processes be used to provide an alternative method for doing simulations, such as those described in Chapter 7? Produce a simulation for the Ice Cream store of Chapter 7 using processes.

Check back soon!