Log onto a computer science server making sure to change the port number.
Follow these instructions to get your files ready to start lab.
wget to download the file at http://cs.longwood.edu/courses/cmsc442/f18/files/lab1.tgz
- Uncompress the lab1.tgz file by using
tar -xvzf lab1.tgz
You are the owner of an underwater recovery company. After finding a sunken treasure of gold coins, you hire divers to recover the treasure to your vault. You know the total number of coins in the treasure and will need to track the number of coins collected by each diver.
You are to simulate this operation using c++ threads and shared variables. There will be NO synchronization. When you are done writing your simulation you will use it to expolore some questions.
- What is the total of the coins collected by divers?
- How does the total compare to the amount in the vault?
- How does the total compare to the starting treasure amount?
- What happens as you increase or decrease the number of divers?
- Do divers collect the same number of coins?
- Do all divers collect at least one coin?
- What happens as you increase or decrease the amount of treasure?
When you are done you need to hand in your lab. The easiest way is to type
If you have changed file names or directory names you will need to change to the
directory which contains the directory you wish to hand in. We will use
handin cmsc442 assignment directory command.
In this case you will type:
handin cmsc442 lab1 lab1
You lab is due at 11:59pm Sept. 14th 2018.