previous | start | next

Pm's glo.h header

The "glo.h" file in the pm's directory defines a pointer to the slot in the process table (the pm's table) for the current process; i.e., the user process that has sent a message to the pm process.

struct mproc * mp;
   

The header file also declares several important global pm variables that are filled in for each message that is received:

message m_in;
int who_e;
int who_p;
int call_nr;

The process manager repeatedly tries to receive a message from any (user) process by calling a function: get_work.

This function calls receive, which will block until some message is sent to the process manager.

Once a message is received, the get_work function extracts information from the message about the sender and assigns values to:

The get_work function makes a check that the process table entry at index who_p is still being used by the user who sent the message.



previous | start | next