PPT-CS 140 Lecture Notes: Lock Implementation

Author : pamella-moone | Published Date : 2016-05-25

Slide 1 Uniprocessor Locks void lockacquire struct lock l intrdisable if lgtlocked lgtlocked 1 else queueadd amplgtq

Presentation Embed Code

Download Presentation

Download Presentation The PPT/PDF document "CS 140 Lecture Notes: Lock Implementatio..." 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: Lock Implementation: Transcript


Slide 1 Uniprocessor Locks void lockacquire struct lock l intrdisable if lgtlocked lgtlocked 1 else queueadd amplgtq . Slide . 1. Too Much Milk. . Roommate . A. 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. CS 140 Lecture Notes: Concurrency. Slide . 1. <p> Sample <b>bold</b> display</p>. P. B. #text. #text. nextSibling. prevSibling. nextSibling. prevSibling. firstChild. lastChild. parentNode. parentNode. parentNode. Slide . 1. <. p>Sample . <b>bold</b> display</p>. P. B. #text. #text. nextSibling. prevSibling. nextSibling. prevSibling. firstChild. lastChild. parentNode. parentNode. parentNode. IME 20051164 Junghee Pyeon. IME 20051206 Wootaek Hwang. IME. . 20051214 Joonhyung Ahn. CONTENTS. Company & Product Overview. Company Overview. Product Overview. Business Analysis. 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  ŸŒ\n’Ÿ\rŒŸ\r•˜—\b\rŒ\n\b›Œ™’\n\nŸŒ\b\n™\rŸŽ\n…Œ™\rŒ‘&# Slide . 1. <. p>Sample . <b>bold</b> display</p>. P. B. #text. #text. nextSibling. prevSibling. nextSibling. prevSibling. firstChild. lastChild. parentNode. parentNode. parentNode. Slide . 1. Access Matrix. File A. File B. File C. Printer 1. Alice. RW. RW. RW. OK. Bob. R. R. RW. OK. Carol. RW. David. RW. OK. Faculty. RW. RW. OK. CS 140 Lecture Notes: Protection. Slide . 2. Access Matrix. Slide . 1. Memory Layout for Process. Code. 0. ∞. Data. Stack. CS 140 Lecture Notes: Linkers. Slide . 2. Creating a Process. Code. 0. ∞. Data. Stack. 101010101010101010101010101010101010101010101010. Lecture 10 Locks Scheduling Control: Mutex /Lock Basic pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock (&lock); x = x + 1; // or whatever your critical section is A Guide To Lock Selection How To Select A Lock Answer the questions below to find out if you are ready to select and purchase the correct lock for your project. Circle the answers that best match your situation. Slide . 1. Too Much Milk. . Roomate. A. 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. CS 140 Lecture Notes: Concurrency. class Lock {. Lock() {}. int locked = 0;. . ThreadQueue. q;. };. void Lock::lock() {. . intrDisable. ();. if (!locked) {. locked = 1;. } else {. . q.add. (. currentThread.

Download Document

Here is the link to download the presentation.
"CS 140 Lecture Notes: Lock Implementation"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