SCOOP

SCOOP implementation

tags:

The implementation of SCOOP within EiffelStudio varies from the definition as it has been presented in publications during the model's evolution.

Some of the differences stem from the reality that SCOOP systems could be optimized for performance, including maximizing concurrency. For example, even though the SCOOP rules state that a separate call to a query is synchronous, i.

SCOOP practical matters

tags:

Introduction

SCOOP practical matters is a collection of advice for using SCOOP effectively. Here you will find practical information that supplements the rules and definitions of the basic SCOOP model, or that is unique to the implementation of SCOOP in EiffelStudio.

SCOOP project settings

SCOOP adds only a single keyword to the Eiffel programming language: separate.

Observer pattern

tags:

Description

The Observer pattern example should be considered a work in progress. During the development of SCOOP for EiffelStudio, Eiffel Software engineers began to think in terms of the impact that SCOOP might have on our own software. One area that emerged was the parsing of Eiffel software text during compilation. You know that Eiffel systems are composed of modules called classes. In a non-concurrent compilation process, the classes are parsed one after another. However, there is no reason why parsing could not take place on multiple, concurrently executing SCOOP processors.

Counter

tags:

Description

Unlike many of the other examples, this one is not really a problem to be solved. Rather, the Counter example uses multiple instances of the simple class COUNTER to explore various concurrent scenarios. Each instance of COUNTER has a unique identifier, a current value, and a speed. A counter's speed is that time that it takes to perform a single increment. You will see that some of the tests start multiple counters at different speeds.

Faneuil Hall

tags:

Description

The Faneuil Hall example is one of several examples that comes to us from Allen Downey's book The Little Book of Semaphores. Downey credits Grant Hutchins as the originator of the example. Faneuil Hall itself is an historic building in Boston which dates from 1742 an has served as a public meeting and market place.

Quicksort

tags:

Description

The quicksort example is a concurrent implementation of the well-known quicksort sorting algorithm developed by computer scientist C. A. R. Hoare. Quicksort uses a "divide and conquer" strategy to sort a structure. It applies a basic algorithm to the structure which leads to a division of the elements into to two substructures. Then it applies the same algorithm to each of the substructures, and so on, until the whole structure is sorted.

Senate bus

tags:

Description

According to Allen Downey in his text The Little Book of Semaphores, the Senate bus example was inspired by the Senate Bus at Wellesley College. Passengers come to a bus stop to catch the Senate bus. The bus can hold 50 passengers. When the bus stops at the bus stop, the waiting passengers board. If the bus fills up, then any passengers who cannot board, must wait until the bus shows up again.

Search-insert-delete

tags:

Description

The Search-insert-delete example involves a shared data structure that is being accessed concurrently by three types of independent actors. Searchers access the list without changing it. So, any number of concurrent searchers can be accessing the structure safely. Inserters have the ability to add new elements to the end of the structure. Only one inserter can access the structure at any given time, but can work concurrently with any number of searchers. Lastly, Deleters can remove items from any position in the structure.

Barbershop

tags:

Description

The barbershop, sometimes called the sleeping barber, models a barbershop with one barber, one barber's chair, and a waiting room with several chairs. The alternative name of the problem comes from the fact that if there is no one waiting for a haircut, the barber flops in his chair and falls asleep.

Also involved are a number of shaggy-haired customers. A customer entering the barbershop looks around and assesses the situation.

Dining savages

tags:

Description

The problem of the dining savages (an allusion to the classic dining philosophers) is based on the arguably tasteless analogy of a number of members of a primitive culture, hereinafter called the "savages", sharing a meal from a single pot. The primary abstractions are the savages themselves, a cook, and the pot. The pot contains a certain number of servings of savage sustenance (the nature of which will be left to your imagination). Each of the savages can freely remove a serving from the pot so long as the pot is not empty.

Syndicate content