-
Notifications
You must be signed in to change notification settings - Fork 9
add cs350 fall 2013 midterm #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| ## Question 1b [2 point(s)] | ||
|
|
||
| How does asyscalldiffer from a normal function call? Identify two distinct differences. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format issue here, missing spaces
|
|
||
| ## Question 2a [1 point(s)] | ||
|
|
||
| Which of the following outputs could possibly be generated by the concurrent program shown above? YES if it could, NO otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Background information for all the subproblems in problem 2 is missed
|
|
||
| ## Question 3 [8 point(s)] | ||
|
|
||
| For the program shown below, fill in the table at the bottom of the page to show the output that would be printed by both the parent and child processes. Briefly explain how you arrived at your solution. Assume that all function, library and system calls are successful. If you need to make additional assumptions be sure to clearly state them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a table at the bottom of the page?
| ``` | ||
|
|
||
| --- | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem 4 is skipped but drawing a stack seems to be feasible?
| yoursem | ||
| create()calls show the intial semaphore value for each newly createdsemaphore. | ||
| Do not use any synchronization primitives or techniques other than sempahores. Keep your solution as simple | ||
| as possible - unnecessarily complex solutions may be penalized. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format issue here
|
|
||
| --- | ||
|
|
||
| ## Question 5a [3 point(s)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
background information for all subproblems in problem 6 (question 5 here) is missed
|
|
||
| ## Question 6a [8 point(s)] | ||
|
|
||
| Assume that each of the functions below (FuncA, FuncB, and FuncC) are being executed by different threads using the OS/161 kernel thread library. Assume that reader/writer locks have been implemented as described in the course notes and in class. Add calls to rwlock_acquire(rwlock *lk, READ_MODE) or rwlock_acquire(rwlock *lk, WRITE_MODE), and rwlock_release(rwlock *lk), and only those calls to ensure that FuncA, FuncB, and FuncC are atomic. The locks have already been declared and initialized and xlock, ylock, and zlock must be used to protect the variables x, y, and z, respectively. Additionally, your locks must not use WRITE MODE unnecessarily, AND you must ensure that deadlock can not occur. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code snippet is not provided
|
|
||
| --- | ||
|
|
||
| ## Question 7a [2 point(s)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
background information for all subproblems in problem 8 (question 7 here) is missed
Description
Add CS 350 Fall 2013 Midterm exam and solution to the repository.
Changes
Testing
Ran python3 courseexam/prepare.py to prepare the exam data.
Checklist