Low Level Router and the 'C' Layer

BAP Online Manuals : Bap Language Tutorial : BAP Communication Layers : Low Level Router and the 'C' Layer
Previous: Communicating Sequential Processes (CSP)
Next: The PROLOG Process Layer

2.4.2. Low Level Router and the 'C' Layer

Defines:

Process Pool
Host Server

Available services:

Host server I/O

Description:

The lowest system layer. It consists of the Network Boot Services, the message routing system and a 'C' library to access the host server. Most of these routines are hidden to the user due to their complexity. An extra manual will explain this 'C' interface to those users who need to link their own 'C' programs into the BAP system.

Most services of the 'C' layer work transparently in the background of the BAP system. The low level router passes messages through the Transputer network. Processes can be created, killed and addressed by the router.

For the PROLOG programmer the most important service of the 'C' layer is the runtime linking system. This service allows code modules ('.LKD' files) to be loaded and linked into the system at runtime. This service is accessed by the load()

predicate, defined in the system library . This routine loads a code module from the default host server and inserts all of its EXPORT and IMPORT predicates into the link table Every predicate call across module boundaries is lead through this link table. If a predicate is called, that was somewhere declared as 'IMPORT' and whose module is not present yet, the call is suspended , the code module is loaded and linked transparently and the call is continued.

Related topics:

PROLOG Process Layer , Client-Server Layer , Object Layer

Module

Is a code block with a certain format that allow the system to link them into the system at runtime. A module is generated from PROLOG source code by the compiler .

Related topics:

load , load_all , load , MODULE Keyword

Process Pool

To provide easy access to the Transputer communication infrastructure, the BAP message passing system transparently connects all processes in a network and forms an (unstructured) 'pool' of processes, independent on the actual network topology.

Each process is identified by an ID, consisting of its Transputer Id 'TID' (a unique number for each Transputer in the network) and its process id 'PID' (a unique number for each process on a certain Transputer). This ID is used by all message passing routines to identify the sender and the destination of a message.

The Host Server

The Host Server is the program that runs on the host computer of the Transputer Network. It services can be accessed by built-in predicates. Most of these are definded in the WINLIB and IOLIB .

The Link Table

Is the list of all 'public' predicates on a certain processor. If a predicate in a Symbol Table is called while the related module is not currently available, the module is loaded and linked transparently at runtime.

Transputer Id (TID)

Within BAP every transputer in the network is identified by an integer, called Transptuter Id (TID). The TID forms together with the Process Id (PID) the id for each process in the network: msg(Tid,Pid). For example the process 4 on transputer 1 is called: msg(4,1).

NOTE:

This naming scheme may change in future versions of BAP. The set_id() predicate is provided to ensure consistency.

Process Id (PID)

Within BAP every process on a transputer is identified by an integer, called Process Id (PID). The PID forms together with the Transputer Id (TID) the id for each process in the network: msg(Tid,Pid). For example the process 4 on transputer 1 is called: msg(4,1).

NOTE:

This naming scheme may change in future versions of BAP. The set_id() predicate is provided to ensure consistency.


BAP Online Manuals : Bap Language Tutorial : BAP Communication Layers : Low Level Router and the 'C' Layer
Previous: Communicating Sequential Processes (CSP)
Next: The PROLOG Process Layer