Flaco Lock Service. RESTful Distributed Locking Over HTTP. Jose Falcon Bryon Jacob
|
|
- Darcy Tucker
- 5 years ago
- Views:
Transcription
1 Flaco Lock Service RESTful Distributed Locking Over HTTP Jose Falcon Bryon Jacob 1
2 About Me Jose Falcon Graduate University of Texas Expected graduahon: May 2010 Research interests: Programming languages ArHficial intelligence 2
3 Outline What is synchronizahon? Locks to the rescue! Why Flaco? Flaco Lock Server Flaco Locks Reliability With Unreliability Demo using curl Flaco Lock Client FiTng HomeAway Conclusion QuesHons 3
4 What is synchronizahon? 4
5 SynchronizaHon A problem typically found in mulh threaded (concurrent) environments EssenHally a problem of coordinahon May appear in many different forms 5
6 Too Much Milk 6
7 What s the Problem? Bought too much milk; overworking! CollecHon of workers, all capable of execuhng the same task, work without coordinahon Single task executed once by some worker 7
8 Address 123 Main St. null Aus0n, TX Telephone # Telephone # null null Address null Lost Data LisHng Address Telephone # Address 123 Main St. null Aus0n, TX Telephone # Telephone # null null (800) Telephone # null (800)
9 What s the Problem? Accessing shared object without considering changes made by other users The data is inconsistent and out of date! Prevent users from accessing stale data 9
10 Locks to the rescue! 10
11 Not Too Much Milk went for milk 11
12 Address 123 Main St. null Aus0n, TX Telephone # Telephone # null null Address 123 Main St. Aus0n, TX Persistent Data LisHng Address Telephone # Address null 123 Main St. Aus0n, TX Telephone # Telephone # null null (800) Telephone # (800) null 12
13 Locks One soluhon to the synchronizahon problem Simple and intuihve Requires: Atomic lock/unlock operahons Extreme reliability CooperaHon All users must respect the lock! 13
14 Why Flaco? 14
15 Current SoluHon At HomeAway locks are created, on demand, in a database Problems: Burden to create Requires database connechon Overhead for simple applicahons which don t rely on a DB 15
16 What We Want RESTful service for easily creahng / sharing locks across mulhple applicahons Usable in any applicahon No dependency on: Database Any specific language AddiHonally: Java client library for easily using Flaco 16
17 Flaco Lock Server 17
18 Flaco Lock Server Centralized service for manipulahng logical named locks Simplifies the creahon of locks All possible locks logically exist Stores locks in RAM, no need for a database Convenient access through REST API Any program/language supporhng HTTP requests can synchronize using Flaco 18
19 Flaco Lock Service ApplicaHons hmp request hmp request hmp request Flaco Lock Server hmp request 19
20 Asynchronous Basic operahons: inquire acquire renew release wait signal signalall Flaco Server Details 20
21 Inquire Returns informahon regarding the current state of the lock Current owner Current waiters on the ready queue Current waiters on condihon queues 21
22 Acquire Two types of acquisihon: Poll Callback Poll Simply awards the lock if it is available Callback Timed acquisihon with a callback server 22
23 Callback Acquire If the lock is available, award ownership Else queue the requester in the ready queue The server will nohfy the requester when she is eligible for acquisihon at the given callback release( foo ) ( foo, newpid) ( foo, pid) You now own the lock on foo! failed acquisihon, enqueued acquire( foo, 9000, 5) 23
24 Renew Limited Hme ownership Must renew lease prior to lease Hmeout Failure to renew results in auto release Ensures liveliness of owner 24
25 Release Removes current owner Awards ownership to next alive waiter Sends nohficahons to callback URLS 25
26 CondiHon Variables Implicit condihon All locks have an implicit condihon Explicit condihon Support arbitrary condihons on names Allow complex interachons between owners 26
27 Wait, Signal/All Wait Removes ownership of the lock Placed on condihon wait queue Signal/All Removes single/(all) waiter(s) from the condihon wait queue to the ready queue 27
28 REST API Base URL: hmp://flaco.homeaway.com/api/<lockname> GET Inquires about the state of the lock POST Mapped to various achons: acquire renew... 28
29 AcquisiHon Status Determine if a given PID is shll pending acquisihon Base URL: hmp://flaco.homeaway.com/api/status/<pid> 29
30 Flaco Locks 30
31 Flaco Lock Details Lock security Reentrancy PID may not mulh block Hierarchical locks 31
32 Lock Security Public/Private key paradigm PID/CredenHals Each enhty that acquires a lock must have a server unique PID ManipulaHons on a lock require lock credenhals 32
33 Reentrant Locks Requests for the same lock by the same PID increment a reentrancy depth Releasing a lock decrements this count Locks are released when the depth reaches zero 33
34 MulH Block Owners that are logically blocked cannot funchon as if they are not May not: Wait twice on the same lock Acquire/wait on another lock 34
35 trips Hierarchical locks trips/1234/ trips/1234/calendar trips/ trips/1235/ 1234 calendar
36 Fair! Locks are handed out according to when they were requested! Removes possibility of starvahon trips/1234/ trips/1234/calendar trips/ trips/1235/ 36
37 Reliability With Unreliability 37
38 Problem How do we maintain lock reliability with an inherently unreliable network connechon?! 38
39 Reliability Not unique to Flaco! All distributed locking systems using a network connechon will encounter this problem What if A client stops communicahng? Then she never renews her lease and the server will remove her as owner (at some point), guaranteed Ensures progress The server goes down? A backup server picks up where the other leu off 39
40 Demo using curl 40
41 Flaco Lock Client 41
42 What We Want Java library for interachng with Flaco AbstracHon of the REST API Replace local synchronizahon with distributed synchronizahon without significant code change 42
43 Lock Client Interface A lock client interacts with a lock server Single method: getlock(lockname) Returns a distributed lock object for easy manipulahon 43
44 Distributed Lock Interface Basic interface: lock() lockinterruphbly() trylock(hmeout) unlock() getnamedcondihon(condihonname) dosynchronized(callable) check() Standard Java Lock Interface 44
45 Java Client API Java implementahon handles all interachon with the Flaco Server Maintains an auto renew thread Manages internal callback server 45
46 getnamedcondihon Distributed version of Java s getnewcondihon by providing names to condihons Returns a distributed condihon object for the provided name Prevents busy waihng 46
47 dosynchronized Distributed version of synchronized keyword Executes some computahon within the scope of the lock lock.lock() lock.dosynchronized(new Callable<Void> { try { // perform some complicated achon return callable.run(); }); } finally { lock.unlock(); } 47
48 check Determines if the lock object shll holds the lock at the server 48
49 Code Snippet LockClient lc = new FlacoLockClient( flacoserver ); DistributedLock mydistrlock = lc.getlock( foobar ); mydistrlock.lock(); try { // set the phone number to (800) } finally { mydistrlock.unlock(); } Standard locking template in Java 49
50 InterrupHng Code ExecuHon Imagine a broken connechon with the server How can we interrupt the execuhng code?! Possible, though difficult Rely on throwing excephons on lock manipulahons to break execuhon All operahons on a lock or condihon variable may throw a LostLockExcep0on indicahng that the lock has been lost at the server 50
51 LockClient lc Example mydistrlock.lock(); try { distributedcount++; // do some complicated action here mydistrcond.signalall() } catch (LostLockException e) { // undo some complicated action here distributedcount ; } finally { mydistrlock.unlock(); } 51
52 FiTng HomeAway 52
53 Advantages of Flaco Extremely easy to use No database dependency No language dependency REST API Performance benefits (hypothesis) 53
54 HomeAway Core service Improve reliability of feed processing Expose synchronizahon to scripts Use in Mesa Distributed file system currently being built Outside of HomeAway Flaco will be open source 54
55 Thanks Bryon Jacob (mentor) Alex Victoria Raul Mireles The enhre services team HomeAway 55
56 Thank you!! QuesHons?? 56
ZooKeeper Atomic Broadcast (for Project 2) 10/27/2016
ZooKeeper Atomic Broadcast (for Project 2) 10/27/2016 Apache Hadoop 2002: Internet Archive search director Doug CuFng and UW grad student Mike Carafella set out to build a bemer open- source search engine.
More informationCMSC 330: Organization of Programming Languages. The Dining Philosophers Problem
CMSC 330: Organization of Programming Languages Threads Classic Concurrency Problems The Dining Philosophers Problem Philosophers either eat or think They must have two forks to eat Can only use forks
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Organization of Programming Languages Multithreading Multiprocessors Description Multiple processing units (multiprocessor) From single microprocessor to large compute clusters Can perform multiple
More informationCMSC 330: Organization of Programming Languages. Threads Classic Concurrency Problems
: Organization of Programming Languages Threads Classic Concurrency Problems The Dining Philosophers Problem Philosophers either eat or think They must have two forks to eat Can only use forks on either
More informationIntel So*ware Guard Extensions (Intel SGX) Support for Dynamic Memory Management Inside an Enclave
Intel So*ware Guard Extensions (Intel SGX) Support for Dynamic Memory Management Inside an Enclave Frank McKeen, Ilya Alexandrovich, IGai AnaH, Dror Caspi, Simon Johnson, Rebekah Leslie-Hurd, Carlos Rozas
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Organization of Programming Languages Threads Synchronization Refers to mechanisms allowing a programmer to control the execution order of some operations across different threads in a concurrent
More informationHow (Not) to Build Scalable Applications in ONOS. Jordan Halterman Member of Technical ONF
How (Not) to Build Scalable Applications in ONOS Jordan Halterman Member of Technical Staff @ ONF 1 Distributed Applications @Reference(cardinality = ReferenceCardinality.MANDATORY) private FlowRuleService
More informationThe Dining Philosophers Problem CMSC 330: Organization of Programming Languages
The Dining Philosophers Problem CMSC 0: Organization of Programming Languages Threads Classic Concurrency Problems Philosophers either eat or think They must have two forks to eat Can only use forks on
More informationIntroduction to Locks. Intrinsic Locks
CMSC 433 Programming Language Technologies and Paradigms Spring 2013 Introduction to Locks Intrinsic Locks Atomic-looking operations Resources created for sequential code make certain assumptions, a large
More informationCSE332: Data Abstractions Lecture 22: Shared-Memory Concurrency and Mutual Exclusion. Tyler Robison Summer 2010
CSE332: Data Abstractions Lecture 22: Shared-Memory Concurrency and Mutual Exclusion Tyler Robison Summer 2010 1 Toward sharing resources (memory) So far we ve looked at parallel algorithms using fork-join
More informationOnly one thread can own a specific monitor
Java 5 Notes Threads inherit their priority and daemon properties from their creating threads The method thread.join() blocks and waits until the thread completes running A thread can have a name for identification
More informationMultiThreading 07/01/2013. Session objectives. Introduction. Introduction. Advanced Java Programming Course
Advanced Java Programming Course MultiThreading By Võ Văn Hải Faculty of Information Technologies Industrial University of Ho Chi Minh City Session objectives Introduction Creating thread Thread class
More informationAdvanced Java Programming Course. MultiThreading. By Võ Văn Hải Faculty of Information Technologies Industrial University of Ho Chi Minh City
Advanced Java Programming Course MultiThreading By Võ Văn Hải Faculty of Information Technologies Industrial University of Ho Chi Minh City Session objectives Introduction Creating thread Thread class
More informationLoop Invariant Code Mo0on
COMP 512 Rice University Spring 2015 Loop Invariant Code Mo0on A Simple Classical Approach Copyright 2015, Keith D. Cooper & Linda Torczon, all rights reserved. Students enrolled in Comp 512 at Rice University
More informationMonitors; Software Transactional Memory
Monitors; Software Transactional Memory Parallel and Distributed Computing Department of Computer Science and Engineering (DEI) Instituto Superior Técnico October 18, 2012 CPD (DEI / IST) Parallel and
More informationMonitors; Software Transactional Memory
Monitors; Software Transactional Memory Parallel and Distributed Computing Department of Computer Science and Engineering (DEI) Instituto Superior Técnico March 17, 2016 CPD (DEI / IST) Parallel and Distributed
More informationProblem. Context. Hash table
Problem In many problems, it is natural to use Hash table as their data structures. How can the hash table be efficiently accessed among multiple units of execution (UEs)? Context Hash table is used when
More informationRecap. Contents. Reenterancy of synchronized. Explicit Locks: ReentrantLock. Reenterancy of synchronise (ctd) Advanced Thread programming.
Lecture 07: Advanced Thread programming Software System Components 2 Behzad Bordbar School of Computer Science, University of Birmingham, UK Recap How to deal with race condition in Java Using synchronised
More information2 5 A p r 12. Princeton University
EPFL 2 5 A p r 12 Princeton University So8ware-Defined Networking (SDN) Third-party program Enables new funchonality through programmability 2 at the risk of bugs 3 So8ware Faults Will make communicahon
More informationCOMP 346 WINTER Tutorial 2 SHARED DATA MANIPULATION AND SYNCHRONIZATION
COMP 346 WINTER 2018 1 Tutorial 2 SHARED DATA MANIPULATION AND SYNCHRONIZATION REVIEW - MULTITHREADING MODELS 2 Some operating system provide a combined user level thread and Kernel level thread facility.
More informationMultithreaded Programming Part II. CSE 219 Stony Brook University, Department of Computer Science
Multithreaded Programming Part II CSE 219 Stony Brook University, Thread Scheduling In a Java application, main is a thread on its own Once multiple threads are made Runnable the thread scheduler of the
More informationCS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University
CS 333 Introduction to Operating Systems Class 3 Threads & Concurrency Jonathan Walpole Computer Science Portland State University 1 Process creation in UNIX All processes have a unique process id getpid(),
More informationThreads and Locks, Part 2. CSCI 5828: Foundations of Software Engineering Lecture 08 09/18/2014
Threads and Locks, Part 2 CSCI 5828: Foundations of Software Engineering Lecture 08 09/18/2014 1 Goals Cover the material presented in Chapter 2 of our concurrency textbook In particular, selected material
More informationPrinciples of Software Construction: Concurrency, Part 2
Principles of Software Construction: Concurrency, Part 2 Josh Bloch Charlie Garrod School of Computer Science 1 Administrivia Homework 5a due now Homework 5 framework goals: Functionally correct Well documented
More informationJava Monitors. Parallel and Distributed Computing. Department of Computer Science and Engineering (DEI) Instituto Superior Técnico.
Java Monitors Parallel and Distributed Computing Department of Computer Science and Engineering (DEI) Instituto Superior Técnico October 19, 2010 Monteiro, Costa (DEI / IST) Parallel and Distributed Computing
More informationMore Synchronization; Concurrency in Java. CS 475, Spring 2018 Concurrent & Distributed Systems
More Synchronization; Concurrency in Java CS 475, Spring 2018 Concurrent & Distributed Systems Review: Semaphores Synchronization tool that provides more sophisticated ways (than Mutex locks) for process
More informationCSCI 201L Final Written Spring % of course grade
Name SOLUTION Final Score ID Extra Credit Section (circle one): MW 8:30-9:50 TTh 9:30-10:50 TTh 11:00-12:20 12% of course grade 1. Servlets Explain the difference between a GET and POST form submission.
More informationCondition Variables CS 241. Prof. Brighten Godfrey. March 16, University of Illinois
Condition Variables CS 241 Prof. Brighten Godfrey March 16, 2012 University of Illinois 1 Synchronization primitives Mutex locks Used for exclusive access to a shared resource (critical section) Operations:
More informationLecture 24: Java Threads,Java synchronized statement
COMP 322: Fundamentals of Parallel Programming Lecture 24: Java Threads,Java synchronized statement Zoran Budimlić and Mack Joyner {zoran, mjoyner@rice.edu http://comp322.rice.edu COMP 322 Lecture 24 9
More information[ ANATOMY OF A PROCESS IN ORACLE SOA SUTE] July 20, 2011
The document is aimed at giving an inside view of business processes as they are executed in the SOA Suite runtime. It is but obvious that synchronous and asynchronous processes are implemented differently
More informationCS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 8: Semaphores, Monitors, & Condition Variables
CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2004 Lecture 8: Semaphores, Monitors, & Condition Variables 8.0 Main Points: Definition of semaphores Example of use
More informationSynchronization II: EventBarrier, Monitor, and a Semaphore. COMPSCI210 Recitation 4th Mar 2013 Vamsi Thummala
Synchronization II: EventBarrier, Monitor, and a Semaphore COMPSCI210 Recitation 4th Mar 2013 Vamsi Thummala Check point: Mission in progress Master synchronization techniques Develop best practices for
More informationLast Class: CPU Scheduling! Adjusting Priorities in MLFQ!
Last Class: CPU Scheduling! Scheduling Algorithms: FCFS Round Robin SJF Multilevel Feedback Queues Lottery Scheduling Review questions: How does each work? Advantages? Disadvantages? Lecture 7, page 1
More informationCS11 Java. Fall Lecture 7
CS11 Java Fall 2006-2007 Lecture 7 Today s Topics All about Java Threads Some Lab 7 tips Java Threading Recap A program can use multiple threads to do several things at once A thread can have local (non-shared)
More informationBusiness Intelligence Technologies
Business Intelligence Technologies Anna Monreale Università di Pisa General Informa5on Anna Monreale Email: anna.monreale@unipi.it Assistant: Riccardo Guido; riccardo.guido;@di.unipi.it Website: h@p://didawiki.di.unipi.it/doku.php/bdd-infuma/bi-mains
More informationRWLocks in Erlang/OTP
RWLocks in Erlang/OTP Rickard Green rickard@erlang.org What is an RWLock? Read/Write Lock Write locked Exclusive access for one thread Read locked Multiple reader threads No writer threads RWLocks Used
More informationExam 2 Review. Fall 2011
Exam 2 Review Fall 2011 Question 1 What is a drawback of the token ring election algorithm? Bad question! Token ring mutex vs. Ring election! Ring election: multiple concurrent elections message size grows
More informationG52CON: Concepts of Concurrency
G52CON: Concepts of Concurrency Lecture 11 Synchronisation in Java II Natasha Alechina School of Computer Science nza@cs.nott.ac.uk Outline of this lecture Mutual exclusion in Java continued (next lecture:
More informationCS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University
CS 333 Introduction to Operating Systems Class 3 Threads & Concurrency Jonathan Walpole Computer Science Portland State University 1 The Process Concept 2 The Process Concept Process a program in execution
More informationThreads and Synchronization. Kevin Webb Swarthmore College February 15, 2018
Threads and Synchronization Kevin Webb Swarthmore College February 15, 2018 Today s Goals Extend processes to allow for multiple execution contexts (threads) Benefits and challenges of concurrency Race
More information27/04/2012. We re going to build Multithreading Application. Objectives. MultiThreading. Multithreading Applications. What are Threads?
Objectives MultiThreading What are Threads? Interrupting threads Thread properties By Võ Văn Hải Faculty of Information Technologies Summer 2012 Threads priorities Synchronization Callables and Futures
More informationToday: Synchronization. Recap: Synchronization
Today: Synchronization Synchronization Mutual exclusion Critical sections Example: Too Much Milk Locks Synchronization primitives are required to ensure that only one thread executes in a critical section
More informationModels of concurrency & synchronization algorithms
Models of concurrency & synchronization algorithms Lecture 3 of TDA383/DIT390 (Concurrent Programming) Carlo A. Furia Chalmers University of Technology University of Gothenburg SP3 2016/2017 Today s menu
More informationTemplates and the STL. Bryce Boe 2012/09/10 CS32, Summer 2012 B
Templates and the STL Bryce Boe 2012/09/10 CS32, Summer 2012 B Overview Variable Types and Storage Review Templates STL Final InformaHon AlternaHve Final Review Where is all the data stored? int a1[5];
More informationData Management in Application Servers. Dean Jacobs BEA Systems
Data Management in Application Servers Dean Jacobs BEA Systems Outline Clustered Application Servers Adding Web Services Java 2 Enterprise Edition (J2EE) The Application Server platform for Java Java Servlets
More informationWelcome to COMP 512. COMP 512 Rice University Spring 2015
COMP 512 Rice University Spring 2015 Welcome to COMP 512 Copyright 2015, Keith D. Cooper & Linda Torczon, all rights reserved. Students enrolled in Comp 512 at Rice University have explicit permission
More informationPost-HEMP Data Evacua/on through Satellite Networks
Post-HEMP Data Evacua/on through Satellite Networks PI: Biswanath Mukherjee Dis$nguished Professor Prepared by: Rafael Lourenço PhD Student Department of Computer Science University of California, Davis
More informationCS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002
CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002 Lecture 6: Synchronization 6.0 Main points More concurrency examples Synchronization primitives 6.1 A Larger Concurrent
More informationConcurrency User Guide
Concurrency User Guide Release 1.0 Dylan Hackers January 26, 2019 CONTENTS 1 Basic Abstractions 3 1.1 Executors................................................. 3 1.2 Queues..................................................
More informationFunc%ons in C++ Part 2 CS 16: Solving Problems with Computers I Lecture #5
Func%ons in C++ Part 2 CS 16: Solving Problems with Computers I Lecture #5 Ziad Matni Dept. of Computer Science, UCSB NO more adds for this class Announcements If you want to switch labs, switch with SOMEONE
More informationG Programming Languages Spring 2010 Lecture 13. Robert Grimm, New York University
G22.2110-001 Programming Languages Spring 2010 Lecture 13 Robert Grimm, New York University 1 Review Last week Exceptions 2 Outline Concurrency Discussion of Final Sources for today s lecture: PLP, 12
More informationComputation Abstractions. Processes vs. Threads. So, What Is a Thread? CMSC 433 Programming Language Technologies and Paradigms Spring 2007
CMSC 433 Programming Language Technologies and Paradigms Spring 2007 Threads and Synchronization May 8, 2007 Computation Abstractions t1 t1 t4 t2 t1 t2 t5 t3 p1 p2 p3 p4 CPU 1 CPU 2 A computer Processes
More informationTidyFS: A Simple and Small Distributed Filesystem
TidyFS: A Simple and Small Distributed Filesystem Dennis Fe6erly 1, Maya Haridasan 1, Michael Isard 1, and Swaminathan Sundararaman 2 1 MicrosoA Research, Silicon Valley 2 University of Wisconsin, Madison
More informationDDT Debugging Techniques
DDT Debugging Techniques Carlos Rosales carlos@tacc.utexas.edu Scaling to Petascale 2010 July 7, 2010 Debugging Parallel Programs Usual problems Memory access issues Special cases not accounted for in
More informationPADS: Policy Architecture for Distributed Storage Systems
PADS: Policy Architecture for Distributed Storage Systems Nalini Belaramani, Jiandan Zheng, Amol Nayate, Robert Soulé, Mike Dahlin and Robert Grimm. University of Texas at AusHn, Amazon Inc., IBM T.J.
More informationBlackBerry Java Development Environment (JDE)
1 BlackBerry Java Applications for Accessing SAP Applications BlackBerry Java Development Environment The BlackBerry Java Development Environment (JDE) is a fully integrated development and simulation
More informationCS 10: Problem solving via Object Oriented Programming Winter 2017
CS 10: Problem solving via Object Oriented Programming Winter 2017 Tim Pierson 260 (255) Sudikoff Day 13 PrioriHzing Agenda 1. Priority queues 2. Java s priority queue 3. Reading from a file 4. ArrayList
More informationImplementing Mutual Exclusion. Sarah Diesburg Operating Systems CS 3430
Implementing Mutual Exclusion Sarah Diesburg Operating Systems CS 3430 From the Previous Lecture The too much milk example shows that writing concurrent programs directly with load and store instructions
More informationIT 540 Operating Systems ECE519 Advanced Operating Systems
IT 540 Operating Systems ECE519 Advanced Operating Systems Prof. Dr. Hasan Hüseyin BALIK (5 th Week) (Advanced) Operating Systems 5. Concurrency: Mutual Exclusion and Synchronization 5. Outline Principles
More informationFinal Score Name SOLUTION ID Extra Credit. 15% of course grade
Final Score Name SOLUTION ID Extra Credit Section (circle one): TTh 8:00-9:20 TTh 9:30-10:50 TTh 11:00-12:20 15% of course grade 1. Inheritance When Java was developed, it was scrutinized since it only
More informationRaspberry Pi ($40 on Amazon)
7/28/15 CS 61C: Great Ideas in Computer Architecture CS61C so far C Programs #include Instructor: Sagar Karandikar sagark@eecs.berkeley.edu hfp://inst.eecs.berkeley.edu/~cs61c Project 2 int
More informationCMSC 433 Programming Language Technologies and Paradigms Fall Locks & Conditions
CMSC 433 Programming Language Technologies and Paradigms Fall 2011 Locks & Conditions Intrinsic Lock Example public class RWDictionaryIntrinsicLock { Map m = new TreeMap();
More informationTopics. File Buffer Cache for Performance. What to Cache? COS 318: Operating Systems. File Performance and Reliability
Topics COS 318: Operating Systems File Performance and Reliability File buffer cache Disk failure and recovery tools Consistent updates Transactions and logging 2 File Buffer Cache for Performance What
More informationQuarterly Product Update December 2014
Quarterly Product Update December 2014 What We ll Cover Today What s New in LeanKit What s Ahead Q & A Since our last update ReporHng & analyhcs overhaul prep Ongoing integrahons work Work connechons
More informationCIS Operating Systems Application of Semaphores. Professor Qiang Zeng Spring 2018
CIS 3207 - Operating Systems Application of Semaphores Professor Qiang Zeng Spring 2018 Big picture of synchronization primitives Busy-waiting Software solutions (Dekker, Bakery, etc.) Hardware-assisted
More informationWhat's wrong with Semaphores?
Next: Monitors and Condition Variables What is wrong with semaphores? Monitors What are they? How do we implement monitors? Two types of monitors: Mesa and Hoare Compare semaphore and monitors Lecture
More informationSynchronization problems with semaphores
Synchronization problems with semaphores Lecture 4 of TDA384/DIT391 (Principles of Concurrent Programming) Carlo A. Furia Chalmers University of Technology University of Gothenburg SP3 2017/2018 Today
More informationCOS 326 David Walker Princeton University
F# COS 326 David Walker Princeton University Slide credits: Material drawn from: hbps://fsharpforfunandprofit.com/posts/computahon-expressions-intro/ hbps://fsharpforfunandprofit.com/posts/concurrency-async-and-parallel/
More informationLecture #7: Implementing Mutual Exclusion
Lecture #7: Implementing Mutual Exclusion Review -- 1 min Solution #3 to too much milk works, but it is really unsatisfactory: 1) Really complicated even for this simple example, hard to convince yourself
More informationStuart
Clojure Time Stuart Halloway stu@clojure.com @stuarthalloway Copyright 2007-2010 Relevance, Inc. This presentation is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United
More informationOperating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst
Operating Systems CMPSCI 377 Spring 2017 Mark Corner University of Massachusetts Amherst What is a Monitor? Ties data and the synchronization operations together Monitors guarantee mutual exclusion, i.e.,
More informationProcesses. Process Concept
Processes These slides are created by Dr. Huang of George Mason University. Students registered in Dr. Huang s courses at GMU can make a single machine readable copy and print a single copy of each slide
More informationName Jim Nolan Title Owner Company Name James Nolan Law Office. 65 Broadway, Suite 707, New York, NY 10006, (212)
Name Jim Nolan Title Owner Company Name James Nolan Law Office 65 Broadway, Suite 707, New York, NY 10006, (212) 402 7840 jnolan@jnolanlaw.com Business Immigration law Japanese & German clients Fixed fee
More informationModule 6: Process Synchronization. Operating System Concepts with Java 8 th Edition
Module 6: Process Synchronization 6.1 Silberschatz, Galvin and Gagne 2009 Module 6: Process Synchronization Background The Critical-Section Problem Peterson s Solution Synchronization Hardware Semaphores
More informationStrategic Cyber Ac.ons and How They Could Affect Your Company
SESSION ID: CXO-F01 Strategic Cyber Ac.ons and How They Could Affect Your Company 2018 Scott Borg Sco1 Borg Director (CEO) and Chief Economist U.S. Cyber Consequences Unit Strategic Cyber AcHons (SCA s)
More informationJS Event Loop, Promises, Async Await etc. Slava Kim
JS Event Loop, Promises, Async Await etc Slava Kim Synchronous Happens consecutively, one after another Asynchronous Happens later at some point in time Parallelism vs Concurrency What are those????
More informationMultithreading and Interactive Programs
Multithreading and Interactive Programs CS160: User Interfaces John Canny. This time Multithreading for interactivity need and risks Some design patterns for multithreaded programs Debugging multithreaded
More informationOverview Of Op*miza*on, 2
OMP 512 Rice University Spring 2015 Overview Of Op*miza*on, 2 Superlocal Value Numbering, SE opyright 2015, Keith D. ooper & Linda Torczon, all rights reserved. Students enrolled in omp 512 at Rice University
More informationFeatherweight Monitors with Bacon Bits
Featherweight Monitors with Bacon Bits David F. Bacon IBM T.J. Watson Research Center Contributors Chet Murthy Tamiya Onodera Mauricio Serrano Mark Wegman Rob Strom Kevin Stoodley Introduction It s the
More informationCS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2004
CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2004 Lecture 9: Readers-Writers and Language Support for Synchronization 9.1.2 Constraints 1. Readers can access database
More information1 /10 2 /15 3 /20 4 /15 total /60. CSE 120 Fall 2007 Midterm Examination. Name. Student ID
CSE 10 Fall 007 Midterm Examination Name Student ID This midterm has four questions and is worth 60 points. Please answer all questions. 1 /10 /15 /0 4 /15 total /60 1 (10 points) Some very short questions,
More information5 System architecture
5 System architecture This chapter provides an overview of the system architecture. The first section presents a superficial explanation of the entire systems architecture. In section two, architectural
More informationBatches and Commands. Overview CHAPTER
CHAPTER 4 This chapter provides an overview of batches and the commands contained in the batch. This chapter has the following sections: Overview, page 4-1 Batch Rules, page 4-2 Identifying a Batch, page
More informationLecture 29: Java s synchronized statement
COMP 322: Fundamentals of Parallel Programming Lecture 29: Java s synchronized statement Vivek Sarkar Department of Computer Science, Rice University vsarkar@rice.edu https://wiki.rice.edu/confluence/display/parprog/comp322
More informationFoundational Design Patterns for Moving Beyond One Loop
Foundational Design Patterns for Moving Beyond One Loop Raja Pillai Technical Consultant Agenda Why move beyond one loop? What is a design pattern? Why learn communication mechanisms? Functional global
More informationConcurrent Processes Rab Nawaz Jadoon
Concurrent Processes Rab Nawaz Jadoon DCS COMSATS Institute of Information Technology Assistant Professor COMSATS Lahore Pakistan Operating System Concepts Concurrent Processes If more than one threads
More information2/9/2013 LAB OUTLINE INTRODUCTION TO VCS WHY VERSION CONTROL SYSTEM(VCS)? II SENG 371 SOFTWARE EVOLUTION VERSION CONTROL SYSTEMS
SENG 371 SOFTWARE EVOLUTION LAB OUTLINE Introduction to Version Control Systems VERSION CONTROL SYSTEMS Subversion Git and Github 1 Prepared by Pratik Jain 2 INTRODUCTION TO VCS A version control system
More informationA short tutorial on Git. Servesh Muralidharan 4 March 2014
A short tutorial on Git Servesh Muralidharan 4 March 2014 This Tutorial What is Source Control Distributed source control with Git Git in Assignment 5 Using Gitlab Using git in Eclipse More about Assignment
More informationComputation Abstractions. CMSC 330: Organization of Programming Languages. So, What Is a Thread? Processes vs. Threads. A computer.
CMSC 330: Organization of Programming Languages Threads Computation Abstractions t1 t2 t1 t3 t2 t1 p1 p2 p3 p4 CPU 1 CPU 2 A computer t4 t5 Processes (e.g., JVM s) Threads CMSC 330 2 Processes vs. Threads
More informationSynchronization via Transactions
Synchronization via Transactions 1 Concurrency Quiz If two threads execute this program concurrently, how many different final values of X are there? Initially, X == 0. Thread 1 Thread 2 void increment()
More informationCS 10: Problem solving via Object Oriented Programming Winter 2017
CS 10: Problem solving via Object Oriented Programming Winter 2017 Tim Pierson 260 (255) Sudikoff Day 14 PrioriHzing 2 Agenda 1. Heaps 2. Heap sort 2 Heaps based on Binary Trees Tree data structure Root
More informationthe gamedesigninitiative at cornell university Lecture 12 Architecture Design
Lecture 12 Take Away for Today What should lead programmer do? How do CRC cards aid software design? What goes on each card? How do you lay m out? What properties should y have? How do activity diagrams
More informationre-exam Concurrent Programming tda383/dit390 Date: Time: 14:00 18:00 Place: Maskinhuset (M)
re-exam Concurrent Programming tda383/dit390 Date: 2016-08-22 Time: 14:00 18:00 Place: Maskinhuset (M) Responsible Michał Pałka 031 772 10 79 Result Available no later than 2016-09-12 Aids Max 2 books
More informationProblem Set 2. CS347: Operating Systems
CS347: Operating Systems Problem Set 2 1. Consider a clinic with one doctor and a very large waiting room (of infinite capacity). Any patient entering the clinic will wait in the waiting room until the
More informationOverview. Processes vs. Threads. Computation Abstractions. CMSC 433, Fall Michael Hicks 1
CMSC 433 Programming Language Technologies and Paradigms Spring 2003 Threads and Synchronization April 1, 2003 Overview What are threads? Thread scheduling, data races, and synchronization Thread mechanisms
More informationChapter 5 Asynchronous Concurrent Execution
Chapter 5 Asynchronous Concurrent Execution Outline 5.1 Introduction 5.2 Mutual Exclusion 5.2.1 Java Multithreading Case Study 5.2.2 Critical Sections 5.2.3 Mutual Exclusion Primitives 5.3 Implementing
More informationFinal Score ID Extra Credit. 15% of course grade
Name Final Score ID Extra Credit Section (circle one): TTh 8:00-9:20 TTh 9:30-10:50 TTh 11:00-12:20 15% of course grade 1. Inheritance When Java was developed, it was scrutinized since it only has single
More informationCSci 4061 Introduction to Operating Systems. Synchronization Basics: Locks
CSci 4061 Introduction to Operating Systems Synchronization Basics: Locks Synchronization Outline Basics Locks Condition Variables Semaphores Basics Race condition: threads + shared data Outcome (data
More informationPage 1. Goals for Today" Atomic Read-Modify-Write instructions" Examples of Read-Modify-Write "
Goals for Today" CS162 Operating Systems and Systems Programming Lecture 5 Semaphores, Conditional Variables" Atomic instruction sequence Continue with Synchronization Abstractions Semaphores, Monitors
More informationConcurrency COMS W4115. Prof. Stephen A. Edwards Spring 2002 Columbia University Department of Computer Science
Concurrency COMS W4115 Prof. Stephen A. Edwards Spring 2002 Columbia University Department of Computer Science Concurrency Multiple, simultaneous execution contexts. Want to walk and chew gum at the same
More information