Skip to content

Conversation

@qimcis
Copy link
Collaborator

@qimcis qimcis commented Jan 18, 2026

Description

Add CS 350 Fall 2013 Midterm exam and solution to the repository.

Changes

  • Add exam directory /home/qi/system-intelligence-benchmark/benchmarks/courseexam_bench/data/raw/cs350_fall_2013_midterm
  • Add exam files including solutions file F13-midterm-sol.pdf
  • Add exam metadata with title "CS 350 Fall 2013 Midterm" and exam id cs350_fall_2013_midterm; no reference files included

Testing

Ran python3 courseexam/prepare.py to prepare the exam data.

Checklist

  • Tests pass locally
  • Code follows project style guidelines
  • Documentation updated (if needed)


## Question 1b [2 point(s)]

How does asyscalldiffer from a normal function call? Identify two distinct differences.
Copy link
Collaborator

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.
Copy link
Collaborator

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.
Copy link
Collaborator

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?

```

---

Copy link
Collaborator

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.
Copy link
Collaborator

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)]
Copy link
Collaborator

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.
Copy link
Collaborator

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)]
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants