Exercises


  • 12.1 Define a process that models a timed single-slot buffer. The buffer should both wait to accept input and wait to produce output. The buffer requires a minimum of T time units to transfer an item from its input to its output.

  • 12.2 Using the process defined in exercise 12.1, define a two-slot timed buffer and explore its properties. Determine the timing consistency relationship between the delays for the two buffers. Explore the effect of applying maximal progress by making tick low priority.

  • 12.3 Implement the timed buffer process of exercise 12.1 as a timed object and explore the runtime behavior of a system composed of these objects with producer and consumer timed objects. (Note: Waiting to produce an output is implemented in timed systems by balking rather than throwing a time-stop. By balking, we mean that the method performing the output returns a boolean indicating whether or not the output was possible. If it fails, it is retried on the next clock cycle.)

  • 12.4 An electric window in a car is controlled by two press-button switches: up and down. When the up button is pressed, then the window starts closing. If the up button is pressed for less than T seconds then the window closes completely. If the up button is pressed for more than T seconds then when the button is released, the window stops closing. The down button works in exactly the same way, except that the window opens rather than closes. A mechanical interlock prevents both buttons being pressed at the same time.

  • The window is moved by a motor that responds to the commands start_close, stop_close, start_open and stop_open. Two sensor switches, closed and opened, detect, respectively, when the window is fully closed and when it is fully open. The window takes R units of time to move from the completely open position to the completely closed position or vice versa.

  • Define a timed model for the electric window system in FSP. Specify safety properties that assert that the motor is not active when the window is fully closed or fully opened.

  • 12.5 Translate the model of the electric window system into a Java implementation using timed objects.




Concurrency(c) State Models & Java Programs
Concurrency: State Models and Java Programs
ISBN: 0470093552
EAN: 2147483647
Year: 2004
Pages: 162

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net