PPT-CS 140 Lecture Notes: Concurrency

Author : danika-pritchard | Published Date : 2015-11-05

Slide 1 Too Much Milk With Locks Both threads struct lock l l ockacquire ampl if milk 0 buymilk lockrelease amp l CS 140 Lecture Notes Locks

Presentation Embed Code

Download Presentation

Download Presentation The PPT/PDF document "CS 140 Lecture Notes: Concurrency" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

CS 140 Lecture Notes: Concurrency: Transcript


Slide 1 Too Much Milk With Locks Both threads struct lock l l ockacquire ampl if milk 0 buymilk lockrelease amp l CS 140 Lecture Notes Locks. ŒŽ‘ŒŽ‘Œ’Ž\fŒŽ\f\f’‡“\f”\f\b\fƒŒ Slide . 1. Too Much Milk With Locks. Both threads:. struct. lock l;. .... l. ock_acquire. (&l);. if (milk == 0) . {. . . buyMilk. ();. }. lock_release. (&. l);. CS 140 Lecture Notes: Locks.  \n‹ \t\t Œ\t€Œ\r\t€\tŽ\n\t\t Œ\t€Œ\r\t€‘ \t’“ Slide . 1. Technology Changes. Mid-1980’s. 2012. Change. CPU speed. 15 MHz. 2.5 GHz. 167x. Memory size. 8 MB. 4 GB. 500x. Disk capacity. 30 MB. 500 GB. 16667x. Disk transfer rate. 2 MB/s. 100 MB/s. †€€€ŒŒŒŒ \r\f\t \r\f\f \r\f\r \r  Prof. O. Nierstrasz. Selected material © Magee and Kramer. © Oscar Nierstrasz. 2. Roadmap. Modelling Concurrency. Finite State Processes . Labelled Transition Systems. Java Threads. Thread creation. Œ]ŒvŒŒ]Œ]&Œ    Œ’ˆŒŒ“”\fŒ•‹‹‰‹––•–‰–“ Concurrency Topics. 1. Sequential programming notation. 2. Expressing concurrency with . co. and . process. . 3. States and hardware. 4. Atomic actions. 5. Inter-leavings and histories. 6. The finite progress assumption. Database Concurrency Control. 1 Purpose of Concurrency Control. To enforce Isolation (through mutual exclusion) among conflicting transactions. . To preserve database consistency through consistency preserving execution of transactions.. Software & the Concurrency Revolution by Sutter & Larus ACM Queue Magazine, Sept. 2005 For CMPS 5433 - Halverson 1 In a Nutshell “The concurrency revolution is primarily a software revolution Slide . 1. Too Much Milk With Locks. Both threads:. struct. lock l;. .... l. ock_acquire. (&l);. if (milk == 0) . {. . . buyMilk. ();. }. lock_release. (&. l);. CS 140 Lecture Notes: Locks. 3:00. Arrive home: no milk. 3:05. Leave for store. 3:10. Arrive at store. 3:15. Leave store. 3:20. Arrive home, put milk away. 3:25. 3:30. CS 140 Lecture Notes: Concurrency. Slide . 1. Too Much Milk. Slide . 1. free. File Allocation Table. A: 6. B: 1. .... 6. 4. 3. 0. 1. File A:. File B:. Directory (5). 2. end. 2. 3. end. 3. 4. 5. end. 4. 6. 7. free. …. 1. 2. Disk Scheduling. CS 140 Lecture Notes: Disk Scheduling.

Download Document

Here is the link to download the presentation.
"CS 140 Lecture Notes: Concurrency"The content belongs to its owner. You may download and print it for personal use, without modification, and keep all copyright notices. By downloading, you agree to these terms.

Related Documents