<!-- Call the assignment `CS450_aXXX_nhn33.pdf` where `XXX` is the assignment number --> :::info **CS 450** Noah Nuebling ::: # Assignment 1 ## Question 1 Possible program outputs: ``` Starting1 Exiting1 Starting2 Exiting2 ``` ``` Starting2 Exiting2 Starting1 Exiting1 ``` ``` Starting1 Starting2 Exiting1 Exiting2 ``` ## Question 2 Possible program outputs: ``` 5 12 ``` ``` 12 5 ``` ## Question 3 Possible program outputs: ``` Sum: 5 ``` ``` Sum: 3 ``` ``` Sum: 8 ``` ## Question 4 Possible program outputs: ``` 2 5 ``` ``` 3 5 ``` ## Question 5 Possible program outputs: ``` 2 5 ``` ``` 3 5 ``` ``` 3 2 ``` ``` 2 3 ``` The following cases might occur if `sum` is overriden by thread `B` (race condition) before thread `A` can print `sum`:  ``` 3 3 ``` ``` 2 2 ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up