Operating Systems 2015F Lecture 10: Difference between revisions
Created page with "==Video== The video from the lecture given on October 9, 2015 [http://homeostasis.scs.carleton.ca/~soma/os-2015f/lectures/comp3000-2015f-lec10-09Oct2015.mp4 is now available]." |
|||
| Line 2: | Line 2: | ||
The video from the lecture given on October 9, 2015 [http://homeostasis.scs.carleton.ca/~soma/os-2015f/lectures/comp3000-2015f-lec10-09Oct2015.mp4 is now available]. | The video from the lecture given on October 9, 2015 [http://homeostasis.scs.carleton.ca/~soma/os-2015f/lectures/comp3000-2015f-lec10-09Oct2015.mp4 is now available]. | ||
==Notes== | |||
<pre> | |||
Lecture 10 | |||
---------- | |||
What's in your final report? | |||
- The idea (intro) | |||
- Design/high level implementation | |||
- implementation (problems encountered) | |||
- Evaluation (does it work and how do you know) | |||
- Conclusion | |||
- contributions | |||
- limitations | |||
- future work | |||
- appendix: code (potentially in patch form) | |||
I suggest you use LaTeX, at least for the code listing | |||
(may want to look at pandoc and markdown) | |||
Concurrency | |||
- race conditions | |||
- producer/consumer | |||
- locks | |||
- protecting data structures | |||
- rendezvous | |||
- filesystem locks | |||
- in-memory locks | |||
Processes and threads | |||
- a process is | |||
- a CPU context (virtual CPU) | |||
- plus a private address space | |||
- a thread is | |||
- a CPU context (virtual CPU) | |||
- in a shared address space | |||
- with threads, all threads see the same memory (within a single process) | |||
Why have threads? | |||
- because we have multiple CPUs | |||
Why are threads bad? | |||
- race conditions! | |||
- memory concurrency! | |||
- corrupted data! | |||
- now you need locks in memory! | |||
</pre> | |||
Revision as of 19:15, 9 October 2015
Video
The video from the lecture given on October 9, 2015 is now available.
Notes
Lecture 10
----------
What's in your final report?
- The idea (intro)
- Design/high level implementation
- implementation (problems encountered)
- Evaluation (does it work and how do you know)
- Conclusion
- contributions
- limitations
- future work
- appendix: code (potentially in patch form)
I suggest you use LaTeX, at least for the code listing
(may want to look at pandoc and markdown)
Concurrency
- race conditions
- producer/consumer
- locks
- protecting data structures
- rendezvous
- filesystem locks
- in-memory locks
Processes and threads
- a process is
- a CPU context (virtual CPU)
- plus a private address space
- a thread is
- a CPU context (virtual CPU)
- in a shared address space
- with threads, all threads see the same memory (within a single process)
Why have threads?
- because we have multiple CPUs
Why are threads bad?
- race conditions!
- memory concurrency!
- corrupted data!
- now you need locks in memory!