02.03.2014 Views

Tornado

Tornado

Tornado

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.

5<br />

Shell<br />

Table 5-17<br />

Interpreting: dir = opendir ("/myDev/myFile")<br />

<strong>Tornado</strong> Shell<br />

(on host)<br />

Parse the string<br />

"/myDev/myFile".<br />

Target Server & Symbol Table<br />

(on host)<br />

Agent<br />

(on target)<br />

Allocate memory for the<br />

string; return address A.<br />

5<br />

Write "/myDev/myFile";<br />

return address A.<br />

Parse the name<br />

opendir.<br />

Look up opendir;<br />

return address B.<br />

Parse the function call<br />

B(A); wait for the result.<br />

Spawn a task to run opendir( )<br />

and signal result C when done.<br />

Receive C from target agent<br />

and pass it to host shell.<br />

Parse the symbol dir.<br />

Look up dir (fails).<br />

Request a new symbol<br />

table entry dir.<br />

Define dir; return symbol D.<br />

Parse the assignment<br />

D=C.<br />

Allocate agent-pool memory<br />

for the value of dir.<br />

Write the value of dir.<br />

(notably opendir( )in this case) have access to it. There is a pool of target memory<br />

reserved for host interactions. Because this pool is reserved, it can be managed<br />

from the host system. The server allocates the required memory, and informs the<br />

203

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

Saved successfully!

Ooh no, something went wrong!