24.01.2013 Views

Download - Freiwald Software

Download - Freiwald Software

Download - Freiwald Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

206<br />

Diagram 142: Critical Sections<br />

The most usual application of critical sections is to protect opposing trains from deadlocking<br />

each other. If the Dispatcher encounters during reservation of the next blocks<br />

ahead, that a certain block is marked as critical section, it will continue reserving further<br />

blocks, until a block is reached, that is not marked as a critical section.<br />

If in the diagram displayed above block “Main Line East” is reserved for a train that is<br />

about to leave a block in “Hidden Yard”, then the Dispatcher continues with reservation<br />

of a block in “Southtown”, too. If it is not possible in this moment, to reserve a<br />

block in “Southtown”, because both blocks in “Southtown” are already reserved by<br />

other trains, then the Dispatcher will not even reserve “Main Line East” and the train<br />

does not get the permission to leave “Hidden Yard”.<br />

A train may enter a critical section only if it is sure that it can leave the critical<br />

section on the other side.<br />

If a critical section contains more than one block, then either all blocks of this section<br />

plus the first block behind this section are reserved in one step or no block is reserved at<br />

all and the train must not proceed.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!