-
Notifications
You must be signed in to change notification settings - Fork 9
add cs350 winter 2019 midterm #89
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
777lefty
left a comment
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 and missing issue, besides, the structure of this exam and the problem-metadata mapping is not clear
| "llm_judge_instructions": "Award 2 points for stating that (ii) is faster and giving a correct reason (e.g., fewer syscalls or less I/O overhead). Award 0 points 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.
Correct me if I am wrong: isn't --- supposed to be used for separating problems (that started with ## Question x)?
@tareknaser
| } | ||
| ``` | ||
| --- | ||
| b. (2 marks) Concurrency |
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.
If we are regarding each subproblem as an individual question with metadata here, perhaps we should use ## Question x to indicate
|
|
||
| ```json | ||
| { | ||
| "problem_id": "4", |
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.
from here on the problem_id in metadata can't match Question x
| "answer": "Actions not prevented by either condition include voluntary thread exit (threadexit), explicit yield (threadyield), and thread blocking/sleep.", | ||
| "llm_judge_instructions": "Award 2 points for listing the three items (thread exit, thread yield, thread block/sleep) or equivalent. Award 1 point for listing two correct items. Award 0 points 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.
Chaotic metadata-subproblem mapping here
| --- | ||
| ## Question 4 [10 marks] | ||
|
|
||
| The following pseudocode makes use of a semaphore. Replace the semaphore-based implementation with a condition-variable-based implementation that performs the same task. You may only add up to three additional variables. Your cv may not be used with a loop. |
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.
pseudocode not provided
| Lock = CLOSED; | ||
| CriticalSection(); | ||
| Lock = OPEN; | ||
| } |
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 block here better
| while (Last == 2){;} | ||
| CriticalSection(); | ||
| Last = 2; | ||
| } |
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 block here better
| ``` | ||
| --- | ||
| b. (2 marks) | ||
|
|
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 description and instruction missed here
| CriticalSection(); | ||
| T2 = !WANT_IN; | ||
| } | ||
|
|
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.
same issue as above
| Last = 2; | ||
| T2 = !WANT_IN; | ||
| } | ||
|
|
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.
same issue as above
55ff1ea to
6fc810d
Compare
6fc810d to
7beee15
Compare
Description
Add the CS 350 Winter 2019 Midterm exam dataset and associated solution to the repository.
Changes
Testing
Prepared the dataset and validated processing by running: python3 courseexam/prepare.py without errors.
Checklist