Skip to content

Commit

Permalink
add submit.md and update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyatgithub committed Nov 21, 2022
1 parent ab8f8e7 commit a7f9d4d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,4 +422,17 @@ Compiling and running: interestingly, in C, if you want to compile and run with

![thread-guideline](./thread-api-guidelines.png)

### Chapter 28 -
### Chapter 28 - Locks

Coarse-grained vs. fine-grained:

- coarse-grained lock = one big lock that is used any time any critical section is accessed.
- fine-grained lock = protect different data and data structures with different locks, allowing more threads to be in locked code at once.

> Crux: How can we build an efficient lock? Efficient locks provide mutual exclusion at low cost, and also might attain a few other properties we discuss below (). What hardware support is needed? What OS support?
Lock evaluation criteria:

1. does it work? i.e. provides mutual exclusion
2. fairness - does each thread contending for the lock get a fair shot at acquiring it once it is free.
3. performance, specifically the time overheads added by using the lock.
Binary file modified Textbook/chap28-threads-locks.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions submit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/tobyatgithub/cs5600_computerSystem_fall2022

0 comments on commit a7f9d4d

Please sign in to comment.