Safe Locking for Multi-threaded Java
|
|
|
- Rachel Franklin
- 10 years ago
- Views:
Transcription
1 Safe Locking for Multi-threaded Java Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen University of Oslo, Norway NWPT November, 2010
2 Motivation Concurrency control mechanisms for high-level programming languages, such as Java lexical scope: synchronized-methods/blocks non-lexical scope: lock and unlock operators to acquire and release a lock in non-lexical scope. Runtime errors and unwanted behaviors. Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 2
3 Lock Handling in Java: not release the lock after finishing import j a v a. u t i l. c o n c u r r e n t. l o c k s ; p u b l i c c l a s s C o n d i t i o n T e s t { p r i v a t e f i n a l Thread producer, consumer ; p r i v a t e f i n a l R e e n t r a n t L ock l ; c l a s s Consumer implements Runnable {... } c l a s s Producer implements Runnable { p u b l i c void put ( I n t e g e r key, Boolean v a l u e ) { l. l o c k ( ) ; l. l o c k ( ) ; // 2 time l o c k t r y { c o l l e c t i o n. put ( key, v a l u e ) ; } f i n a l l y { l. u n l o c k ( ) ; } // 1 t i m e s u n l o c k... } Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 3
4 Lock Handling in Java Consumer is hanging P roducer : a d d i n g 1 to c o l l e c t i o n. Consumer : w a i t i n g 10 s e c o n d s f o r 2345 to a r r i v e... P roducer : a d d i n g 4 to c o l l e c t i o n. P roducer : a d d i n g 66 to c o l l e c t i o n. P roducer : a d d i n g 9 to c o l l e c t i o n. P roducer : a d d i n g 2435 to c o l l e c t i o n. P roducer : e x i t i n g. Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 4
5 Lock Handling in Java: release a free lock import j a v a. u t i l. c o n c u r r e n t. l o c k s ; p u b l i c c l a s s C o n d i t i o n T e s t { p r i v a t e f i n a l Thread producer, consumer ; p r i v a t e f i n a l R e e n t r a n t L ock l ; c l a s s Consumer implements Runnable {... } c l a s s Producer implements Runnable { p u b l i c void put ( I n t e g e r key, Boolean v a l u e ) { } l. l o c k ( ) ; // 1 time l o c k t r y { c o l l e c t i o n. put ( key, v a l u e ) ; } f i n a l l y { l. u n l o c k ( ) ; l. u n l o c k ( ) ; } // 2 t i m e s u n l o c k... Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 5
6 Lock Handling in Java: Report of lock errors at run-time P roducer : a d d i n g 1 to c o l l e c t i o n E x c e p t i o n i n... j a v a. l a n g. I l l e g a l M o n i t o r S t a t e E x c e p t i o n a t... R e e n t r a n t L o c k S y n c. t r y R e l e a s e ( R e e n t r a n t L o c k. j a v a : ) a t... r e l e a s e ( A b s t r a c t Q u e u e d S y n c h r o n i z e r. j a v a : ) a t... R e e n t r a n t L o c k. u n l o c k ( R e e n t r a n t L o c k. j a v a : ) a t... C o n d i t i o n T e s t P r o d u c e r. put ( C o n d i t i o n T e s t. j a v a : ) a t j a v a. l a n g. Thread. run ( Thread. j a v a : ) Consumer : e x i t i n g. Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 6
7 Goals of our work Semantics for lock handling as in Java. Static type and effect system for safe usage of re-entrant locks. Soundness proof Details and proofs: See our technical report[johnsen et al., 2010] Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 7
8 Challenges Dynamic creation of objects, threads, and especially locks. Identities of locks are available at user-level Locks are re-entrant Aliasing Passing locks between threads Multi-threading/concurrency Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 8
9 A Concurrent Calculus D Classes ::= class C( f : T ){ f : T ; M} M Methods ::= m( x: T ){t} : T t ThreadSeq ::= stop error v let x:t = e in t e Exp ::= t if v then e else e v.f v.f := v v.m( v) new C( v) spawn t new L v. lock v. unlock if v. trylock then e else e v Value ::= r x () x, y Var S, T Type ::= C B Unit L Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 9
10 Semantics (locks): Global level σ Heap ::= σ, o : C( v) σ, l : 0 σ, l : p(n) Global configuration: σ P, so global step: σ P σ P. (1) where P ::= 0 P P p t σ(l) = p (n) p p R-Error 1 σ p let x : T = l. unlock in t σ p error σ(l) = 0 R-Error 2 σ p let x : T = l. unlock in t σ p error Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 10
11 Type and effect system At the local level, the judgment of the expression e σ; Γ; 1 e : T :: 2 (2) Under the environment Γ the expression e has the type T Executing e leads to the effect changing from 1 to 2 σ; Γ v : L v T-Lock σ; Γ; v. lock: L :: + v σ; Γ v : L v : n + 1 σ; Γ; v. unlock: L :: v T-Unlock Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 11
12 Type and effect system σ Heap ::= σ, o : C( v) σ, l : 0 σ, l : p(n) Γ TypeEnv ::= Γ, x : T LockEnv ::=, l : n, x : n Definition (Projection) Assume a heap σ with σ : ok and a thread p. The projection of σ onto p (σ p ) inductively defined: p = (σ, l:0) p = σ p, l:0 (σ, l:p(n)) p = σ p, l:n (σ, l:p (n)) p = σ p, l:0 if p p (σ, o:c( v)) p = σ p. Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 12
13 Type rules (T-Call) At the global level, the judgment of the form: σ P : ok σ; Γ v : T σ; Γ v : C C.m : T T :: 1 2 C.m = λ x.t 1 1 [ v/ x] 2 = 1 + ( 2 1 )[ v/ x] T-Call σ; Γ; 1 v.m( v) : T :: 2 Definition (Operators on lock environments) 1 Let = 1 + 2, then l : n 1 + n 2 if 1 l : n 1 2 l : n 2. l : n 1 if 1 l : n 1 2 l (and symmetrically) if dom( 1 ) dom( 2 ) l dom( 2 ): n 1 n 2, where ( 1 l : n 1 ) ( 2 l : n 2 ) for 1 2, analogously. Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 13
14 An illustration of T-Call Two methods m and n operating on a single lock: m(){l.lock; l.lock x.n();... } where n(){l.unlock; l.unlock; l.lock} balance balance t t balance t Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 14
15 An illustration of T-Call Two methods m and n operating on a single lock: m(){l.lock; l.lock x.n();... } where n(){l.unlock; l.unlock; l.lock} balance balance t t balance t Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 15
16 Examples of Aliasing Method with 2 formal parameters m(x 1 : L, x 2 : L ) { x 1. u n l o c k ; x 2. u n l o c k } 1 = x 1 :1, x 2 :1 (2) o.m(l 1, l 2 ) : 1 = 1 [l 1 /x 1 ][l 2 /x 2 ] = l 1 :1, l 2 :1 (3) o.m(l, l) : 1 = 1 [l/x 1 ][l/x 2 ] = l:(1 + 1) (4) Definition (Substitution for lock environments: [l/x]) Given = v 1 :n 1,..., v k :n k, = [l/x]. 1 =, l:(n l + n x ) If =, l:n l, x:n x 2 =, l:n x If =, x:n x l / dom( ) 3 =, otherwise. Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 16
17 Examples of Aliasing Listing 1: Method call, no aliasing f 1 := new L ; f 2 := new L ; // f 1 and f 2 : no a l i a s e s f 1. l o c k ; f 2. l o c k ; o.m(f 1,f 2 ) ; Nothing is wrong here! Listing 2: Method call, aliasing f 1 := new L ; f 2 := f 1 ; // f 1 and f 2 : a l i a s e s f 1. l o c k ; f 2. l o c k ; o.m(f 1,f 2 ) ; Again, there is no run-time error! Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 17
18 Examples of Aliasing Listing 3: Method call, no aliasing f 1 := new L ; f 2 := new L ; // f 1 and f 2 : no a l i a s e s f 1. l o c k ; f 2. l o c k ; o.m(f 1,f 2 ) ; Nothing is wrong here! Listing 4: Method call, aliasing f 1 := new L ; f 2 := f 1 ; // f 1 and f 2 : a l i a s e s f 1. l o c k ; f 2. l o c k ; o.m(f 1,f 2 ) ; Again, there is no run-time error! Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 18
19 Examples of Aliasing Listing 5: Method call, no aliasing f 1 := new L ; f 2 := new L ; // f 1 and f 2 : no a l i a s e s f 1. l o c k ; f 2. l o c k ; o.m(f 1,f 2 ) ; Nothing is wrong here! Listing 6: Method call, aliasing f 1 := new L ; f 2 := f 1 ; // f 1 and f 2 : a l i a s e s f 1. l o c k ; f 2. l o c k ; o.m(f 1,f 2 ) ; Again, there is no run-time error! Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 19
20 Examples of Aliasing Listing 7: Method call, no aliasing f 1 := new L ; f 2 := new L ; // f 1 and f 2 : no a l i a s e s f 1. l o c k ; f 2. l o c k ; o.m(f 1,f 2 ) ; Nothing is wrong here! Listing 8: Method call, aliasing f 1 := new L ; f 2 := f 1 ; // f 1 and f 2 : a l i a s e s f 1. l o c k ; f 2. l o c k ; o.m(f 1,f 2 ) ; Again, there is no run-time error! Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 20
21 Illustration of aliasing and non-aliasing locks balance balance t t balance t Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 21
22 Examples of Aliasing Listing 9: Method call, midway assignment f 1 := new L ; f 2 := new L ; / f 1. l o c k ; f 2. l o c k ; f 2 := f 1 ; // f 1 and f 2 a r e now a l i a s e s o.m(f 1,f 2 ) ; Obviously, the code leads to a lock-error! σ; Γ v 1 : C C.f i : T i σ; Γ v 2 : T i T i L σ; Γ; v 1.f i := v 2 : T i :: T-Assign Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 22
23 Examples of Aliasing Listing 10: Method call, midway assignment f 1 := new L ; f 2 := new L ; / f 1. l o c k ; f 2. l o c k ; f 2 := f 1 ; // f 1 and f 2 a r e now a l i a s e s o.m(f 1,f 2 ) ; Obviously, the code leads to a lock-error! σ; Γ v 1 : C C.f i : T i σ; Γ v 2 : T i T i L σ; Γ; v 1.f i := v 2 : T i :: T-Assign Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 23
24 Examples of Aliasing Listing 11: Method call, midway assignment f 1 := new L ; f 2 := new L ; / f 1. l o c k ; f 2. l o c k ; f 2 := f 1 ; // f 1 and f 2 a r e now a l i a s e s o.m(f 1,f 2 ) ; Obviously, the code leads to a lock-error! σ; Γ v 1 : C C.f i : T i σ; Γ v 2 : T i T i L σ; Γ; v 1.f i := v 2 : T i :: T-Assign Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 24
25 Two core observations Aliasing does not hurt in our setting. locking assures interference-freedom Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 25
26 Type rules 1 = σ p σ; ; 1 t : T :: 2 t error 2 free σ p t :ok T-Thread σ P 1 : ok σ P 1 P 2 : ok σ P 2 : ok T-Par Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 26
27 Soundness: proof by subject reduction Definition (Hanging lock) A configuration σ P has a hanging lock if P = P p stop where σ(l) = p(n) with n 1. Theorem (Well-typed programs have no hanging locks) Given an initial configuration σ 0 P 0 : ok. Then it s not the case that σ 0 P 0 σ P, where σ P has a hanging lock. Theorem (Well-typed programs are lock-error free) Given an initial configuration σ 0 P 0 : ok. Then it s not the case that σ 0 P 0 σ P p error. Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 27
28 Related work [Igarashi and Kobayashi, 2005]: the resource usage analysis problem. The language, however, is sequential. [Gerakios et al., 2010]: a uniform treatment of region-based management and locks [Bigliardi and Laneve, 2000][Laneve, 2003]: a type system for statically assuring proper lock handling for the JVM, structured locking. [Iwama and Kobayashi, 2002]: a type system for multi-threaded Java program for JVM in non-lexical locking. Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 28
29 Summary, current and future work Summary: A calculus supporting lock handling as in Java with operational semantics Usage of locks in non-lexical scope can be typed checked Type and effect system Soundness proof: subject reduction Aliasing, passing locks between threads, dynamic creation of objects, threads and especially locks. Current and future work: Implementing a type checker. Adding exceptions (under work) More details on the technical report [Johnsen et al., 2010]( msteffen) Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 29
30 [Bigliardi and Laneve, 2000] Bigliardi, G. and Laneve, C. (2000). A type system for JVM threads. In In Proceedings of 3rd ACM SIGPLAN Workshop on Types in Compilation (TIC2000, page [Gerakios et al., 2010] Gerakios, P., Papaspyrou, N., and Sagonas, K. (2010). A concurrent language with a uniform treatment of regions and locks. In Programming Language Approaches to Concurrency and Communication-eCentric Software EPTCS 17, pages [Igarashi and Kobayashi, 2005] Igarashi, A. and Kobayashi, N. (2005). Resource usage analysis. ACM Transactions on Programming Languages and Systems, 27(2): [Iwama and Kobayashi, 2002] Iwama, F. and Kobayashi, N. (2002). A new type system for JVM lock primitives. In ASIA-PEPM 02: Proceedings of the ASIAN symposium on Partial evaluation and semantics-based program manipulation, pages 71 82, New York, NY, USA. ACM. [Johnsen et al., 2010] Johnsen, E. B., Mai Thuong Tran, T., Owe, O., and Steffen, M. (2010). Safe locking for multi-threaded Java. Technical Report 402, University of Oslo, Dept. of Computer Science. A shorter version (extended abstract) has been presented at the NWPT 10. [Laneve, 2003] Laneve, C. (2003). A type system for JVM threads. Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 30
31 Theoretical Computer Science, 290(1): Einar Broch Johnsen, Thi Mai Thuong Tran, Olaf Owe, Martin Steffen 31
Resource-Aware Applications for the Cloud
Resource-Aware Applications for the Cloud Reiner Hähnle 1 and Einar Broch Johnsen 2 1 Technical University of Darmstadt, Germany [email protected] 2 University of Oslo, Norway [email protected]
Java Memory Model: Content
Java Memory Model: Content Memory Models Double Checked Locking Problem Java Memory Model: Happens Before Relation Volatile: in depth 16 March 2012 1 Java Memory Model JMM specifies guarantees given by
Run-Time Assertion Checking and Monitoring Java Programs
Run-Time Assertion Checking and Monitoring Java Programs Envisage Bertinoro Summer School June 2014 June 19, 2014 Your Lecturers Today Frank en Stijn What This Talk Is All About Formal Methods in Practice:
How To Write A Multi Threaded Software On A Single Core (Or Multi Threaded) System
Multicore Systems Challenges for the Real-Time Software Developer Dr. Fridtjof Siebert aicas GmbH Haid-und-Neu-Str. 18 76131 Karlsruhe, Germany [email protected] Abstract Multicore systems have become
Facing the Challenges for Real-Time Software Development on Multi-Cores
Facing the Challenges for Real-Time Software Development on Multi-Cores Dr. Fridtjof Siebert aicas GmbH Haid-und-Neu-Str. 18 76131 Karlsruhe, Germany [email protected] Abstract Multicore systems introduce
Language Based Virtual Machines... or why speed matters. by Lars Bak, Google Inc
Language Based Virtual Machines... or why speed matters by Lars Bak, Google Inc Agenda Motivation for virtual machines HotSpot V8 Dart What I ve learned Background 25+ years optimizing implementations
Multi-core Programming System Overview
Multi-core Programming System Overview Based on slides from Intel Software College and Multi-Core Programming increasing performance through software multi-threading by Shameem Akhter and Jason Roberts,
Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture
Last Class: OS and Computer Architecture System bus Network card CPU, memory, I/O devices, network card, system bus Lecture 3, page 1 Last Class: OS and Computer Architecture OS Service Protection Interrupts
Types, Polymorphism, and Type Reconstruction
Types, Polymorphism, and Type Reconstruction Sources This material is based on the following sources: Pierce, B.C., Types and Programming Languages. MIT Press, 2002. Kanellakis, P.C., Mairson, H.G. and
CSCI E 98: Managed Environments for the Execution of Programs
CSCI E 98: Managed Environments for the Execution of Programs Draft Syllabus Instructor Phil McGachey, PhD Class Time: Mondays beginning Sept. 8, 5:30-7:30 pm Location: 1 Story Street, Room 304. Office
language 1 (source) compiler language 2 (target) Figure 1: Compiling a program
CS 2112 Lecture 27 Interpreters, compilers, and the Java Virtual Machine 1 May 2012 Lecturer: Andrew Myers 1 Interpreters vs. compilers There are two strategies for obtaining runnable code from a program
Overview. CMSC 330: Organization of Programming Languages. Synchronization Example (Java 1.5) Lock Interface (Java 1.5) ReentrantLock Class (Java 1.
CMSC 330: Organization of Programming Languages Java 1.5, Ruby, and MapReduce Overview Java 1.5 ReentrantLock class Condition interface - await( ), signalall( ) Ruby multithreading Concurrent programming
Using Protothreads for Sensor Node Programming
Using Protothreads for Sensor Node Programming Adam Dunkels Swedish Institute of Computer Science [email protected] Oliver Schmidt [email protected] Thiemo Voigt Swedish Institute of Computer Science
Configuring Apache Derby for Performance and Durability Olav Sandstå
Configuring Apache Derby for Performance and Durability Olav Sandstå Database Technology Group Sun Microsystems Trondheim, Norway Overview Background > Transactions, Failure Classes, Derby Architecture
Understanding Hardware Transactional Memory
Understanding Hardware Transactional Memory Gil Tene, CTO & co-founder, Azul Systems @giltene 2015 Azul Systems, Inc. Agenda Brief introduction What is Hardware Transactional Memory (HTM)? Cache coherence
Last Class: Semaphores
Last Class: Semaphores A semaphore S supports two atomic operations: S Wait(): get a semaphore, wait if busy semaphore S is available. S Signal(): release the semaphore, wake up a process if one is waiting
Pluggable Type Systems. Gilad Bracha
Pluggable Type Systems Gilad Bracha The Paradox of Type Systems Type systems help reliability and security by mechanically proving program properties Type systems hurt reliability and security by making
Computer Programming I
Computer Programming I COP 2210 Syllabus Spring Semester 2012 Instructor: Greg Shaw Office: ECS 313 (Engineering and Computer Science Bldg) Office Hours: Tuesday: 2:50 4:50, 7:45 8:30 Thursday: 2:50 4:50,
Replication on Virtual Machines
Replication on Virtual Machines Siggi Cherem CS 717 November 23rd, 2004 Outline 1 Introduction The Java Virtual Machine 2 Napper, Alvisi, Vin - DSN 2003 Introduction JVM as state machine Addressing non-determinism
Change Impact Analysis
Change Impact Analysis Martin Ward Reader in Software Engineering [email protected] Software Technology Research Lab De Montfort University Change Impact Analysis Impact analysis is a process that predicts
Programming Language Pragmatics
Programming Language Pragmatics THIRD EDITION Michael L. Scott Department of Computer Science University of Rochester ^ШШШШШ AMSTERDAM BOSTON HEIDELBERG LONDON, '-*i» ЩЛ< ^ ' m H NEW YORK «OXFORD «PARIS»SAN
Crash Course in Java
Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J. Johns also: Java in a Nutshell Java Network Programming and Distributed Computing Netprog 2002 Java Intro 1 What is
Certifying the Security of Android Applications with Cassandra
1 15 th International School on Foundations of Software Security and Design August 31 st, 2015, Bertinoro Certifying the Security of Android Applications with Cassandra Steffen Lortz, Heiko Mantel, David
A Hoare Logic for Monitors in Java
INSTITUT FÜR INFORMATIK UND PRAKTISCHE MATHEMATIK EHRSTUH FÜR SOFTWARETECHNOOIE A Hoare ogic for Monitors in Java Erika Ábrahám Frank S. de Boer Willem-Paul de Roever Martin Steffen Bericht Nr. TR-ST-03-1
Japan Communication India Skill Development Center
Japan Communication India Skill Development Center Java Application System Developer Course Detail Track 2a Java Application Software Developer: Phase1 SQL Overview 70 Introduction Database, DB Server
Shared Address Space Computing: Programming
Shared Address Space Computing: Programming Alistair Rendell See Chapter 6 or Lin and Synder, Chapter 7 of Grama, Gupta, Karypis and Kumar, and Chapter 8 of Wilkinson and Allen Fork/Join Programming Model
Reducing Transfer Delay Using Java Class File Splitting and Prefetching
Reducing Transfer Delay Using Java Class File Splitting and Prefetching Chandra Krintz Brad Calder Urs Hölzle Department of Computer Science and Engineering University of California, San Diego ckrintz,calder
Tools Page 1 of 13 ON PROGRAM TRANSLATION. A priori, we have two translation mechanisms available:
Tools Page 1 of 13 ON PROGRAM TRANSLATION A priori, we have two translation mechanisms available: Interpretation Compilation On interpretation: Statements are translated one at a time and executed immediately.
Monitoring Hadoop with Akka. Clint Combs Senior Software Engineer at Collective
Monitoring Hadoop with Akka Clint Combs Senior Software Engineer at Collective Collective - The Audience Engine Ad Technology Company Heavy Investment in Hadoop and Other Scalable Infrastructure Need to
RE-TRUST Design Alternatives on JVM
RE-TRUST Design Alternatives on JVM ( - Italy) [email protected] http://softeng.polito.it/falcarin Trento, December, 19 th 2006 Tamper-Detection Tamper-detection goals Detect malicious modifications
Tutorial: Getting Started
9 Tutorial: Getting Started INFRASTRUCTURE A MAKEFILE PLAIN HELLO WORLD APERIODIC HELLO WORLD PERIODIC HELLO WORLD WATCH THOSE REAL-TIME PRIORITIES THEY ARE SERIOUS SUMMARY Getting started with a new platform
15-150 Lecture 11: Tail Recursion; Continuations
15-150 Lecture 11: Tail Recursion; Continuations Lecture by Dan Licata February 21, 2011 In this lecture we will discuss space usage: analyzing the memory it takes your program to run tail calls and tail
Improvement of Scheduling Granularity for Deadline Scheduler
Improvement of Scheduling Granularity for Deadline Scheduler Yoshitake Kobayashi Advanced Software Technology Group Corporate Software Engineering Center TOSHIBA CORPORATION Copyright 2012, Toshiba Corporation.
Built-in Concurrency Primitives in Java Programming Language. by Yourii Martiak and Mahir Atmis
Built-in Concurrency Primitives in Java Programming Language by Yourii Martiak and Mahir Atmis Overview One of the many strengths of Java is the built into the programming language support for concurrency
Resource Aware Scheduler for Storm. Software Design Document. <[email protected]> Date: 09/18/2015
Resource Aware Scheduler for Storm Software Design Document Author: Boyang Jerry Peng Date: 09/18/2015 Table of Contents 1. INTRODUCTION 3 1.1. USING
ODROID Multithreading in Android
Multithreading in Android 1 Index Android Overview Android Stack Android Development Tools Main Building Blocks(Activity Life Cycle) Threading in Android Multithreading via AsyncTask Class Multithreading
Lecture 6: Semaphores and Monitors
HW 2 Due Tuesday 10/18 Lecture 6: Semaphores and Monitors CSE 120: Principles of Operating Systems Alex C. Snoeren Higher-Level Synchronization We looked at using locks to provide mutual exclusion Locks
Zing Vision. Answering your toughest production Java performance questions
Zing Vision Answering your toughest production Java performance questions Outline What is Zing Vision? Where does Zing Vision fit in your Java environment? Key features How it works Using ZVRobot Q & A
Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6)
Semantic Analysis Scoping (Readings 7.1,7.4,7.6) Static Dynamic Parameter passing methods (7.5) Building symbol tables (7.6) How to use them to find multiply-declared and undeclared variables Type checking
CS11 Java. Fall 2014-2015 Lecture 7
CS11 Java Fall 2014-2015 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
To Java SE 8, and Beyond (Plan B)
11-12-13 To Java SE 8, and Beyond (Plan B) Francisco Morero Peyrona EMEA Java Community Leader 8 9...2012 2020? Priorities for the Java Platforms Grow Developer Base Grow Adoption
PC Based Escape Analysis in the Java Virtual Machine
PC Based Escape Analysis in the Java Virtual Machine Manfred Jendrosch, Gerhard W. Dueck, Charlie Gracie, and AndréHinkenjann Abstract Current computer architectures are multi-threaded and make use of
Operating System Support for Java Virtual Machine: A New Methodology of Boosting Java Runtime Performance
Operating System Support for Java Virtual Machine: A New Methodology of Boosting Java Runtime Performance Shui Fu Hainan Telcom Corp. Hainan, China Steve Zhang Korea University Seoul, South Korea Abstract
SSC - Concurrency and Multi-threading Java multithreading programming - Synchronisation (I)
SSC - Concurrency and Multi-threading Java multithreading programming - Synchronisation (I) Shan He School for Computational Science University of Birmingham Module 06-19321: SSC Outline Outline of Topics
Using Eclipse CDT/PTP for Static Analysis
PTP User-Developer Workshop Sept 18-20, 2012 Using Eclipse CDT/PTP for Static Analysis Beth R. Tibbitts IBM STG [email protected] "This material is based upon work supported by the Defense Advanced Research
Enterprise Integration: operational models of business processes and workflow systems *
Enterprise Integration: operational models of business processes and workflow systems. 1 Enterprise Integration: operational models of business processes and workflow systems * G.Bruno 1, C.Reyneri 2 and
Code Generation for High-Assurance Java Card Applets
Code Generation for High-Assurance Java Card Applets Alessandro Coglio Kestrel Institute 3260 Hillview Avenue, Palo Alto, CA 94304, USA Ph. +1-650-493-6871 Fax +1-650-424-1807 http://www.kestrel.edu/ coglio
Implementing AUTOSAR Scheduling and Resource Management on an Embedded SMT Processor
Implementing AUTOSAR Scheduling and Resource Management on an Embedded SMT Processor Florian Kluge, Chenglong Yu, Jörg Mische, Sascha Uhrig, Theo Ungerer Department of Compute Science University of Augsburg
Japan Communication India Skill Development Center
Japan Communication India Skill Development Center Java Application System Developer Course Detail Track 1B Java Application Software Developer: Phase1 DBMS Concept 20 Entities Relationships Attributes
The ConTract Model. Helmut Wächter, Andreas Reuter. November 9, 1999
The ConTract Model Helmut Wächter, Andreas Reuter November 9, 1999 Overview In Ahmed K. Elmagarmid: Database Transaction Models for Advanced Applications First in Andreas Reuter: ConTracts: A Means for
A FRAMEWORK FOR MANAGING RUNTIME ENVIRONMENT OF JAVA APPLICATIONS
A FRAMEWORK FOR MANAGING RUNTIME ENVIRONMENT OF JAVA APPLICATIONS Abstract T.VENGATTARAMAN * Department of Computer Science, Pondicherry University, Puducherry, India. A.RAMALINGAM Department of MCA, Sri
Existential Types for Imperative Languages
Existential Types for Imperative Languages Dan Grossman [email protected] Cornell University Abstract. We integrate existential types into a strongly typed C-like language. In particular, we show
Best Practices for Multi-Tenant Environments
Best Practices for Multi-Tenant Environments How to Configure Service Manager 7 for Multi-Tenant Implementations. HP Software Service Management Introduction... 2 Techniques used in Multi-Tenant implementations...
Rigorous Software Development CSCI-GA 3033-009
Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 5 Disclaimer. These notes are derived from notes originally developed by Joseph Kiniry, Gary Leavens, Erik Poll,
The Advantages of Using an Inliner
Under consideration for publication in Math. Struct. in Comp. Science Security Monitor Inlining and Certification for Multithreaded Java M A D S D A M 1, B A R T J A C O B S 2, A N D R E A S L U N D B
Compiling Object Oriented Languages. What is an Object-Oriented Programming Language? Implementation: Dynamic Binding
Compiling Object Oriented Languages What is an Object-Oriented Programming Language? Last time Dynamic compilation Today Introduction to compiling object oriented languages What are the issues? Objects
OBJECT ORIENTED PROGRAMMING LANGUAGE
UNIT-6 (MULTI THREADING) Multi Threading: Java Language Classes The java.lang package contains the collection of base types (language types) that are always imported into any given compilation unit. This
Java VM monitoring and the Health Center API. William Smith [email protected]
Java VM monitoring and the Health Center API William Smith [email protected] Health Center overview What problem am I solving? What is my JVM doing? Is everything OK? Why is my application running
Code Aware Resource Scheduling
Code Aware Resource Scheduling Marco Faella Fiat Slug with: Luca de Alfaro, UCSC Rupak Majumdar, UCLA Vishwanath Raman, UCSC Fridericus Dei Gratia Romanorum Imperator Semper Augustus 1 The problem mutex_lock(a)
Monitors, Java, Threads and Processes
Monitors, Java, Threads and Processes 185 An object-oriented view of shared memory A semaphore can be seen as a shared object accessible through two methods: wait and signal. The idea behind the concept
Functional Programming. Functional Programming Languages. Chapter 14. Introduction
Functional Programming Languages Chapter 14 Introduction Functional programming paradigm History Features and concepts Examples: Lisp ML 1 2 Functional Programming Functional Programming Languages The
JVM Tool Interface. Michal Pokorný
JVM Tool Interface Michal Pokorný JVM TI Inspect & control execution on JVM (profiling, debugging, monitoring, thread analysis, coverage, ) Higher-level interface: Java Platform Debugger Architecture JVM
A Generic Type-and-Effect System
A Generic Type-and-Effect System Daniel Marino Todd Millstein Computer Science Department University of California, Los Angeles dlmarino,todd}@cs.ucla.edu Abstract Type-and-effect systems are a natural
Benchmark Study on Distributed XML Filtering Using Hadoop Distribution Environment. Sanjay Kulhari, Jian Wen UC Riverside
Benchmark Study on Distributed XML Filtering Using Hadoop Distribution Environment Sanjay Kulhari, Jian Wen UC Riverside Team Sanjay Kulhari M.S. student, CS U C Riverside Jian Wen Ph.D. student, CS U
The end. Carl Nettelblad 2015-06-04
The end Carl Nettelblad 2015-06-04 The exam and end of the course Don t forget the course evaluation! Closing tomorrow, Friday Project upload deadline tonight Book presentation appointments with Kalyan
Outline of this lecture G52CON: Concepts of Concurrency
Outline of this lecture G52CON: Concepts of Concurrency Lecture 10 Synchronisation in Java Natasha Alechina School of Computer Science [email protected] mutual exclusion in Java condition synchronisation
Japan Communication India Skill Development Center
Japan Communication India Skill Development Center Java Application System Developer Course Detail Track 2b Java Application Software Developer: Phase1 SQL Overview 70 Introduction Database, DB Server
Programming Languages
Programming Languages In the beginning To use a computer, you needed to know how to program it. Today People no longer need to know how to program in order to use the computer. To see how this was accomplished,
Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program
Free Java textbook available online "Thinking in Java" by Bruce Eckel, 4th edition, 2006, ISBN 0131872486, Pearson Education Introduction to the Java programming language CS 4354 Summer II 2015 The third
INTERCALL ONLINE Administrator Invoices User Guide
INTERCALL ONLINE Administrator Invoices User Guide Access your invoices online, set up new billing accounts and view or edit existing billing accounts. With InterCall Online, also monitor and analyze your
Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program
Free Java textbook available online "Thinking in Java" by Bruce Eckel, 4th edition, 2006, ISBN 0131872486, Pearson Education Introduction to the Java programming language CS 4354 Summer II 2014 Jill Seaman
Validating Java for Safety-Critical Applications
Validating Java for Safety-Critical Applications Jean-Marie Dautelle * Raytheon Company, Marlborough, MA, 01752 With the real-time extensions, Java can now be used for safety critical systems. It is therefore
Japan Communication India Skill Development Center
Japan Communication India Skill Development Center Java Application System Developer Course Detail Track 3 Java Application Software Developer: Phase1 SQL Overview 70 Querying & Updating Data (Review)
Tachyon: a Meta-circular Optimizing JavaScript Virtual Machine
Tachyon: a Meta-circular Optimizing JavaScript Virtual Machine Maxime Chevalier-Boisvert Erick Lavoie Marc Feeley Bruno Dufour {chevalma, lavoeric, feeley, dufour}@iro.umontreal.ca DIRO - Université de
HybriDroid: Analysis Framework for Android Hybrid Applications
HybriDroid: Analysis Framework for Android Hybrid Applications Sungho Lee, Julian Dolby, Sukyoung Ryu Programming Language Research Group KAIST June 13, 2015 Sungho Lee, Julian Dolby, Sukyoung Ryu HybriDroid:
Thesis Proposal: Improving the Performance of Synchronization in Concurrent Haskell
Thesis Proposal: Improving the Performance of Synchronization in Concurrent Haskell Ryan Yates 5-5-2014 1/21 Introduction Outline Thesis Why Haskell? Preliminary work Hybrid TM for GHC Obstacles to Performance
Optimizing Generation of Object Graphs in Java PathFinder
Optimizing Generation of Object Graphs in Java PathFinder Milos Gligoric, Tihomir Gvero, Steven Lauterburg, Darko Marinov, Sarfraz Khurshid JPF Workshop 1.5.8 Bugs Six Decades Ago 1947: Harvard Mark II
How To Use Java On An Ipa 2.2.2 (Jspa) With A Microsoft Powerbook (Jempa) With An Ipad 2.3.2 And A Microos 2.5 (Microos)
Java Monitoring and Diagnostic Tooling Iris Baron IBM Java JIT on System Z [email protected] Session ID: 16182 Insert Custom Session QR if Desired. Java Road Map Java 7.0 Language Updates Java 6.0 SE 5.0
Model Checking: An Introduction
Announcements Model Checking: An Introduction Meeting 2 Office hours M 1:30pm-2:30pm W 5:30pm-6:30pm (after class) and by appointment ECOT 621 Moodle problems? Fundamentals of Programming Languages CSCI
Development of Java ME
Y39PDA Development of Java ME application České vysoké učení technické v Praze Fakulta Elektrotechnická Content What is Java ME Low Level a High Level API What is JSR LBS Java ME app. life-cycle 2/29 Is
CS4410 - Fall 2008 Homework 2 Solution Due September 23, 11:59PM
CS4410 - Fall 2008 Homework 2 Solution Due September 23, 11:59PM Q1. Explain what goes wrong in the following version of Dekker s Algorithm: CSEnter(int i) inside[i] = true; while(inside[j]) inside[i]
Platform-wide Deadlock Immunity for Mobile Phones
Platform-wide Deadlock Immunity for Mobile Phones Horatiu Jula, Thomas Rensch, George Candea School of Computer and Communication Sciences École Polytechnique Fédérale de Lausanne (EPFL), Switzerland Abstract
Cloud Computing. Up until now
Cloud Computing Lecture 11 Virtualization 2011-2012 Up until now Introduction. Definition of Cloud Computing Grid Computing Content Distribution Networks Map Reduce Cycle-Sharing 1 Process Virtual Machines
POLYTYPIC PROGRAMMING OR: Programming Language Theory is Helpful
POLYTYPIC PROGRAMMING OR: Programming Language Theory is Helpful RALF HINZE Institute of Information and Computing Sciences Utrecht University Email: [email protected] Homepage: http://www.cs.uu.nl/~ralf/
Binary Multiplication
Binary Multiplication Q: How do we multiply two numbers? eg. 12, 345 6, 789 111105 987600 8641500 + 74070000 83, 810, 205 10111 10101 10111 00000 1011100 0000000 + 101110000 111100011 Pad, multiply and
