IN[59]570 Exercise Session 3
ssh
, Oblig 1 and beyond.
Joachim Tilsted Kristensen
joachkr@ifi.uio.no
University of Oslo, February 16, 2023
Did anyone solve last weeks challenge?
ssh
.
- Go to https://overthewire.org/wargames/bandit/
- Solve exercises 1-7.
- You are welcome to solve more exercises (getting familiar with a shell is a great skill).
Oblig 1.
Discuss the oblig with the student on your right.
- Have you installed
ssh
? - How do you start up several Emerald nodes at once?
- How do you start an Emerald node on planet lab?
- How do you move an object from one node to another.
- Can you run the Kilroy program on the 4 planet-lab nodes.
- What should the Kilroy program do?
- What is a cyclic barrier?
I will come around and talk to you as well.
Echo
Write an Emerald program that echo's the received on stdin to all active nodes. Let the program end, if it has received the keyword “exit” on stdin.
Hint: You might appreciate the following auxiliary functions, provided by Oleks from the Emerald organization on GitHub.
function stripLast [ i : String ] -> [ o : String ]
o <- i.getSlice[ 0, i.length - 1 ]
end stripLast
function readline -> [ o : String ]
o <- self.stripLast [ stdin.getstring ]
end readline
Watchdog
In the language report, figure out what the unavailable
keyword does.
Write a program that loops through the active nodes every second or two, and
reports (by writing to stdout
), when a node is down.
Pro tip of the day.
The -R
flag connects an emerald node to another node.
So
emx -R<host-identifier>:<host-port> [program.x]
Connects the runtime of an emerald node to the runtime of another.