Slide 32 of 53
Notes:
As an example of where shared variables are useful, the stack_of_integer package in this and the next slide uses a shared variable in two procedures used to maintain a stack. The designer is responsible for ensuring that no two processes call these two procedures at any one time.
The package declarative region is shown here declaring two procedures, push and pop.