Project Loom Ron Pressler, Alan Bateman June 2018
|
|
- Lilian Lester
- 5 years ago
- Views:
Transcription
1 Project Loom Ron Pressler, Alan Bateman June 2018 Copyright 2018, Oracle and/or its affiliates. All rights reserved.!1
2 Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle. Copyright 2018, Oracle and/or its affiliates. All rights reserved.!2
3 Project Loom Continuations Fibers Tail-calls Copyright 2018, Oracle and/or its affiliates. All rights reserved.!3
4 Why Fibers Today, developers are forced to choose between Connections App Connections App simple (blocking / synchronous), but less scalable code (with threads) and complex, non-legacy-interoperable, but scalable code (asynchronous) Copyright 2018, Oracle and/or its affiliates. All rights reserved.!4
5 Why Fibers With fibers, devs have both: simple, familiar, maintainable, interoperable code, that is also scalable Connections App Fibers make even existing server applications consume fewer machines (by increasing utilization), significantly reducing costs Copyright 2018, Oracle and/or its affiliates. All rights reserved.!5
6 Continuations: The User Perspective Copyright 2018, Oracle and/or its affiliates. All rights reserved.!6
7 What A continuation (precisely: delimited continuation) is a program object representing a computation that may be suspended and resumed (also, possibly, cloned or even serialized). Copyright 2018, Oracle and/or its affiliates. All rights reserved.!7
8 Continuations: User Perspective package java.lang; public class Continuation implements Runnable { public Continuation(ContinuationScope scope, Runnable body); public final void run(); public static void yield(continuationscope scope); public boolean isdone(); } protected void onpinned(reason reason) { throw new IllegalStateException("Pinned: " + reason); } Copyright 2018, Oracle and/or its affiliates. All rights reserved.!8
9 Continuations: User Perspective Continuation cont = new Continuation(SCOPE, () -> { while (true) { System.out.println("before"); Continuation.yield(SCOPE); System.out.println("after"); } }); while (!cont.isdone()) { cont.run(); } Copyright 2018, Oracle and/or its affiliates. All rights reserved.!9
10 Fibers Copyright 2018, Oracle and/or its affiliates. All rights reserved.!10
11 What is a fiber? A light weight or user mode thread, scheduled by the Java virtual machine, not the operating system Fibers are low footprint and have negilgible taskswitching overhead. You can have millions of them! Copyright 2018, Oracle and/or its affiliates. All rights reserved.!11
12 Why fibers? The runtime is well positioned to manage and schedule application threads, esp. if they interleave computation and I/O and interact very often (exactly how server threads behave) Make concurrency simple again Copyright 2018, Oracle and/or its affiliates. All rights reserved.!12
13 fiber = continuation + scheduler Copyright 2018, Oracle and/or its affiliates. All rights reserved.!13
14 fiber = continuation + scheduler A fiber wraps a task in a continuation The continuation yields when the task needs to block The continuation is continued when the task is ready to continue Scheduler executes tasks on a pool of carrier threads java.util.concurrent.executor in the current prototype Default/built-in scheduler is a ForkJoinPool Copyright 2018, Oracle and/or its affiliates. All rights reserved.!14
15 User facing API Current focus is on the control flow and concepts, not the API Minimal java.lang.fiber in current prototype that supports 1. Starting a fiber to execute a task 2. Parking/unparking 3. Waiting for a fiber to terminate Copyright 2018, Oracle and/or its affiliates. All rights reserved.!15
16 Implementing Fibers Copyright 2018, Oracle and/or its affiliates. All rights reserved.!16
17 A fiber wraps a user s task in a continuation The fiber task is submited to the scheduler to start or continue the continuation, essentially: mount(); try { cont.run(); } finally { unmount(); } Copyright 2018, Oracle and/or its affiliates. All rights reserved.!17
18 Copyright 2018, Oracle and/or its affiliates. All rights reserved.!18
19 ForkJoinWorkerThread.run Carrier thread waiting for work ForkJoinPool.runWorker LockSupport.park Unsafe.park Copyright 2017, Oracle and/or its affiliates. All rights reserved.!19
20 A fiber is scheduled on the carrier thread. The fiber task runs. ForkJoinWorkerThread.run : ForkJoinTask$RunnableExecuteAction.exec Fiber.runContinuation Copyright 2017, Oracle and/or its affiliates. All rights reserved.!20
21 ForkJoinWorkerThread.run : ForkJoinTask$RunnableExecuteAction.exec The fiber runs the continuation to run the user s task. Fiber.runContinuation Continuation.run Continuation.enter Continuation.enter0 Main.lambda$main$0 Copyright 2017, Oracle and/or its affiliates. All rights reserved.!21
22 ForkJoinWorkerThread.run : ForkJoinTask$RunnableExecuteAction.exec The task attempts acquire a lock which leads to the continuation yielding Fiber.runContinuation Continuation.run Continuation.enter Continuation.enter0 Main.lambda$main$0 java.util.concurrent.reentrantlock.lock : java.util.concurrent.locksupport.park Fiber.park Contuation.yield Copyright 2017, Oracle and/or its affiliates. All rights reserved.!22
23 ForkJoinWorkerThread.run The continuation stack is saved and control returns to the fiber s task at the instruction following the call to Continuation.run : ForkJoinTask$RunnableExecuteAction.exec Fiber.runContinuation Copyright 2017, Oracle and/or its affiliates. All rights reserved.!23
24 The fiber task terminates. The carrier thread goes back to waiting for work. ForkJoinWorkerThread.run ForkJoinPool.runWorker LockSupport.park Unsafe.park Copyright 2017, Oracle and/or its affiliates. All rights reserved.!24
25 The owner of the lock releases it. This unparks the Fiber waiting to acquire the lock by scheduling its task to run again. ReentrantLock.unlock LockSupport.unpark Fiber.unpark ForkJoinPool.execute Copyright 2017, Oracle and/or its affiliates. All rights reserved.!25
26 The fiber task runs again, maybe on a different carrier thread ForkJoinWorkerThread.run : ForkJoinTask$RunnableExecuteAction.exec Fiber.runContinuation Copyright 2017, Oracle and/or its affiliates. All rights reserved.!26
27 ForkJoinWorkerThread.run The fiber task invokes Continuation run (again) to continue it : ForkJoinTask$RunnableExecuteAction.exec Fiber.runContinuation Continuation.run Copyright 2017, Oracle and/or its affiliates. All rights reserved.!27
28 ForkJoinWorkerThread.run : ForkJoinTask$RunnableExecuteAction.exec Fiber.runContinuation Continuation.run Continuation.enter Continuation.enter0 Main.lambda$main$0 java.util.concurrent.reentrantlock.lock The stack is restored and control continues at the instruction following the call to Continuation.yield : java.util.concurrent.locksupport.park Fiber.park Copyright 2017, Oracle and/or its affiliates. All rights reserved.!28
29 ForkJoinWorkerThread.run : ForkJoinTask$RunnableExecuteAction.exec Fiber.runContinuation Continuation.run Continuation.enter The user s task continues. Continuation.enter0 Main.lambda$main$0 Copyright 2017, Oracle and/or its affiliates. All rights reserved.!29
30 ForkJoinWorkerThread.run : ForkJoinTask$RunnableExecuteAction.exec Fiber.runContinuation The user s task completes and the continuation terminates. Control returns to the fiber s task at the instruction following the call to Continuation.run Copyright 2017, Oracle and/or its affiliates. All rights reserved.!30
31 How much existing code can fibers run? A big question, lots of trade-offs Do we completely re-imagine threads? Do we attempt to allow all existing code to run in the context of a fiber? Likely to wrestle with this topic for a long time Current prototype can run existing code but with some limitations, as we will see Copyright 2018, Oracle and/or its affiliates. All rights reserved.!31
32 Example using existing code/libraries Example uses Jetty and Jersey Copyright 2018, Oracle and/or its affiliates. All rights reserved.!32
33 Example with existing code/libraries Assume servlet or REST service that spends a long time waiting assume this takes 100ms Copyright 2018, Oracle and/or its affiliates. All rights reserved.!33
34 Default configuration (maxthreads = 200), load = 5000 HTTP request/s Copyright 2018, Oracle and/or its affiliates. All rights reserved.!34
35 maxthreads = 400, load = 5000 HTTP request/s Copyright 2018, Oracle and/or its affiliates. All rights reserved.!35
36 fiber per request, load = 5000 HTTP request/s Copyright 2018, Oracle and/or its affiliates. All rights reserved.!36
37 Limitations Can t yield with native frames on continuation stack may park/yield native method Copyright 2018, Oracle and/or its affiliates. All rights reserved.!37
38 Limitations Can t yield while holding or waiting for a monitor may park carrier thread may park carrier thread Copyright 2018, Oracle and/or its affiliates. All rights reserved.!38
39 Limitations Current limitations Can t yield with native frames on continuation stack Can t yield while holding or waiting for a monitor In both cases, parking may pin the carrier thread What about the existing Thread API and Thread.currentThread()? Copyright 2018, Oracle and/or its affiliates. All rights reserved.!39
40 Relationship between Fiber and Thread in current prototype Strand Thread Fiber Copyright 2018, Oracle and/or its affiliates. All rights reserved.!40
41 Thread.currentThread() and Thread API in current prototype Current prototype First use of Thread.currentThread() in a fiber creates a shadow Thread unstarted Thread from perspective of VM, no VM meta data Shadow Thread implements Thread API except for stop, suspend, resume, and uncaught exception handlers Thread locals become fiber local (for now) ThreadLocal and the baggage that is InheritableThreadLocal, context ClassLoader,.. Special case ThreadLocal for now to avoid needing Thread object Copyright 2018, Oracle and/or its affiliates. All rights reserved.!41
42 Thread Locals Spectrum of uses Container managed cache of connection or credentials context Approximating processor/core local in lower level libraries Significant topic for later Copyright 2018, Oracle and/or its affiliates. All rights reserved.!42
43 Footprint Thread Typically 1MB reserved for stack + 16KB of kernel data structures ~2300 bytes per started Thread, includes VM meta data Fiber Continuation stack: hundreds of bytes to KBs bytes per fiber in current prototype Copyright 2018, Oracle and/or its affiliates. All rights reserved.!43
44 APIs that potentially park Thread sleep, join java.util.concurrent and LockSupport.park I/O Networking I/O: socket read/write/connect/accept File I/O Pipe I/O Copyright 2018, Oracle and/or its affiliates. All rights reserved.!44
45 Communication between fibers Current prototype executes tasks as Runnable. Easy to use CompletableFuture too. j.u.concurrent just works so can share objects or share by communicating Not an explicit goal at this time to introduce new concurrency APIs but new APIs may emerge Copyright 2018, Oracle and/or its affiliates. All rights reserved.!45
46 Implementing Continuations Copyright 2018, Oracle and/or its affiliates. All rights reserved.!46
47 We need: Millions of continuations (=> low RAM overhead) Fast task-switching (=> no stack copying) Copyright 2018, Oracle and/or its affiliates. All rights reserved.!47
48 Native Stack Continuation run stack refstack Copyright 2018, Oracle and/or its affiliates. All rights reserved.!48
49 Native Stack Continuation run stack refstack Entry enter Copyright 2018, Oracle and/or its affiliates. All rights reserved.!49
50 Native Stack Continuation run stack refstack Entry enter A B C Yield yield Copyright 2018, Oracle and/or its affiliates. All rights reserved.!50
51 Native Stack Continuation run stack refstack Entry enter A B C Yield yield freeze Copyright 2018, Oracle and/or its affiliates. All rights reserved.!51
52 Native Stack Continuation run stack refstack Entry enter A B C yield Yield yield freeze Copyright 2018, Oracle and/or its affiliates. All rights reserved.!52
53 Native Stack Continuation run stack refstack Entry enter A B C Examine the frame for pinning yield Yield yield freeze Copyright 2018, Oracle and/or its affiliates. All rights reserved.!53
54 Native Stack Continuation run stack refstack Entry enter A B C Raw copy C yield Yield yield freeze Copyright 2018, Oracle and/or its affiliates. All rights reserved.!54
55 Native Stack Continuation run stack refstack Entry enter A B C Extract oops C yield Yield yield freeze Copyright 2018, Oracle and/or its affiliates. All rights reserved.!55
56 Native Stack Continuation run stack refstack Entry Yield enter A B C yield freeze A B C yield Copyright 2018, Oracle and/or its affiliates. All rights reserved.!56
57 Native Stack Continuation run stack A B C yield refstack Copyright 2018, Oracle and/or its affiliates. All rights reserved.!57
58 Native Stack Continuation run stack refstack Entry enter docontinue A B C yield Copyright 2018, Oracle and/or its affiliates. All rights reserved.!58
59 Native Stack Continuation run stack refstack Entry enter A B C yield thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!59
60 Native Stack Continuation run stack refstack Entry enter Raw copy A A B C yield thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!60
61 Native Stack Continuation run stack refstack Entry enter Restore oops A A B C yield thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!61
62 Native Stack Continuation run stack refstack Entry enter A Patch A B C yield thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!62
63 Native Stack Continuation run stack refstack Entry Yield enter A B C yield thaw A B C yield Copyright 2018, Oracle and/or its affiliates. All rights reserved.!63
64 Native Stack Continuation run stack refstack Entry enter A B C Yield yield Copyright 2018, Oracle and/or its affiliates. All rights reserved.!64
65 Native Stack Continuation run stack refstack Entry enter A Lazy copy B C yield Copyright 2018, Oracle and/or its affiliates. All rights reserved.!65
66 Native Stack Continuation run stack refstack Entry enter docontinue A B C yield Copyright 2018, Oracle and/or its affiliates. All rights reserved.!66
67 Native Stack Continuation run stack refstack Entry enter A B C yield thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!67
68 Native Stack Continuation run stack refstack Entry enter C yield A B C yield thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!68
69 Native Stack Continuation run stack refstack Entry enter C yield A B thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!69
70 Native Stack Continuation run stack refstack Entry enter C yield Install return barrier (if there are more frozen frames) A B thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!70
71 Native Stack Continuation run stack refstack Entry Yield enter C yield A B Copyright 2018, Oracle and/or its affiliates. All rights reserved.!71
72 Native Stack Continuation run stack refstack Entry enter C A B Copyright 2018, Oracle and/or its affiliates. All rights reserved.!72
73 Native Stack Continuation run stack refstack Entry enter A B thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!73
74 Native Stack Continuation run stack refstack Entry enter B A B thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!74
75 Native Stack Continuation run stack refstack Entry enter B A thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!75
76 Native Stack Continuation run stack refstack Entry enter B Install return barrier A thaw Copyright 2018, Oracle and/or its affiliates. All rights reserved.!76
77 Native Stack Continuation run stack refstack Entry Yield enter B D yield A Copyright 2018, Oracle and/or its affiliates. All rights reserved.!77
78 Native Stack Continuation run stack refstack Entry Yield enter B D yield freeze A B D yield Copyright 2018, Oracle and/or its affiliates. All rights reserved.!78
79 Native Stack Continuation run stack A B D yield refstack Copyright 2018, Oracle and/or its affiliates. All rights reserved.!79
80 Epilogue Copyright 2018, Oracle and/or its affiliates. All rights reserved.!80
81 Features not in current prototype Serialization and cloning JVM TI and debugging support for fibers Tail calls Copyright 2018, Oracle and/or its affiliates. All rights reserved.!81
82 Next Steps Design behavior and API Add missing features Improve performance Copyright 2018, Oracle and/or its affiliates. All rights reserved.!82
83 More information Project Loom page: Mailing list: Repo: Copyright 2018, Oracle and/or its affiliates. All rights reserved.!83
84
Alan Bateman Java Platform Group, Oracle November Copyright 2018, Oracle and/or its affiliates. All rights reserved.!1
Alan Bateman Java Platform Group, Oracle November 2018 Copyright 2018, Oracle and/or its affiliates. All rights reserved.!1 Project Loom Continuations Fibers Tail-calls Copyright 2018, Oracle and/or its
More informationChapter 4: Threads. Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads
Chapter 4: Threads Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads Chapter 4: Threads Objectives To introduce the notion of a
More informationWelcome to the session...
Welcome to the session... Copyright 2013, Oracle and/or its affiliates. All rights reserved. 02/22/2013 1 The following is intended to outline our general product direction. It is intended for information
More informationThreads Questions Important Questions
Threads Questions Important Questions https://dzone.com/articles/threads-top-80-interview https://www.journaldev.com/1162/java-multithreading-concurrency-interviewquestions-answers https://www.javatpoint.com/java-multithreading-interview-questions
More informationHighlights from Java 10, 11 and 12 and Future of Java Javaland by Vadym Kazulkin, ip.labs GmbH
Highlights from Java 10, 11 and 12 and Future of Java Javaland 19.03.2019 by Vadym Kazulkin, ip.labs GmbH Contact Vadym Kazulkin, ip.labs GmbH v.kazulkin@gmail.com https://www.linkedin.com/in/vadymkazulkin
More informationOverview of Java Threads (Part 2)
Overview of Java Threads (Part 2) Douglas C. Schmidt d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee, USA Learning
More informationAhead of Time (AOT) Compilation
Ahead of Time (AOT) Compilation Vaibhav Choudhary (@vaibhav_c) Java Platforms Team https://blogs.oracle.com/vaibhav Copyright 2018, Oracle and/or its affiliates. All rights reserved. Safe Harbor Statement
More informationChapter 4: Threads. Operating System Concepts. Silberschatz, Galvin and Gagne
Chapter 4: Threads Silberschatz, Galvin and Gagne Chapter 4: Threads Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Linux Threads 4.2 Silberschatz, Galvin and
More informationMultiThreading. Object Orientated Programming in Java. Benjamin Kenwright
MultiThreading Object Orientated Programming in Java Benjamin Kenwright Outline Review Essential Java Multithreading Examples Today s Practical Review/Discussion Question Does the following code compile?
More informationMultitasking. Multitasking allows several activities to occur concurrently on the computer Levels of multitasking: Process based multitasking
Java Thread Multitasking Multitasking allows several activities to occur concurrently on the computer Levels of multitasking: Process based multitasking Allows programs (processes) to run concurrently
More informationJava ME Directions. JCP F2F - Austin. Florian Tournier - Oracle May 9, Copyright 2017, Oracle and/or its affiliates. All rights reserved.
Java ME Directions JCP F2F - Austin Florian Tournier - Oracle May 9, 2017 Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes
More informationOPERATING SYSTEM. Chapter 4: Threads
OPERATING SYSTEM Chapter 4: Threads Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Operating System Examples Objectives To
More informationCapriccio : Scalable Threads for Internet Services
Capriccio : Scalable Threads for Internet Services - Ron von Behren &et al - University of California, Berkeley. Presented By: Rajesh Subbiah Background Each incoming request is dispatched to a separate
More informationChair of Software Engineering. Java and C# in depth. Carlo A. Furia, Marco Piccioni, Bertrand Meyer. Java: concurrency
Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer Java: concurrency Outline Java threads thread implementation sleep, interrupt, and join threads that return values Thread synchronization
More informationMark Falco Oracle Coherence Development
Achieving the performance benefits of Infiniband in Java Mark Falco Oracle Coherence Development 1 Copyright 2011, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy
More informationCS 351 Design of Large Programs Threads and Concurrency
CS 351 Design of Large Programs Threads and Concurrency Brooke Chenoweth University of New Mexico Spring 2018 Concurrency in Java Java has basic concurrency support built into the language. Also has high-level
More informationOperating Systems 2 nd semester 2016/2017. Chapter 4: Threads
Operating Systems 2 nd semester 2016/2017 Chapter 4: Threads Mohamed B. Abubaker Palestine Technical College Deir El-Balah Note: Adapted from the resources of textbox Operating System Concepts, 9 th edition
More informationChapter 4: Threads. Chapter 4: Threads. Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues
Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues 4.2 Silberschatz, Galvin
More informationCS 450 Operating System Week 4 Lecture Notes
CS 450 Operating System Week 4 Lecture Notes Reading: Operating System Concepts (7 th Edition) - Silberschatz, Galvin, Gagne Chapter 5 - Pages 129 147 Objectives: 1. Explain the main Objective of Threads
More informationThe New Java Technology Memory Model
The New Java Technology Memory Model java.sun.com/javaone/sf Jeremy Manson and William Pugh http://www.cs.umd.edu/~pugh 1 Audience Assume you are familiar with basics of Java technology-based threads (
More informationProgrammazione Avanzata e Paradigmi Ingegneria e Scienze Informatiche - UNIBO a.a 2013/2014 Lecturer: Alessandro Ricci
v1.0 20130323 Programmazione Avanzata e Paradigmi Ingegneria e Scienze Informatiche - UNIBO a.a 2013/2014 Lecturer: Alessandro Ricci [module lab 2.1] CONCURRENT PROGRAMMING IN JAVA: INTRODUCTION 1 CONCURRENT
More informationCS455: Introduction to Distributed Systems [Spring 2019] Dept. Of Computer Science, Colorado State University
CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [THREADS] The House of Heap and Stacks Stacks clean up after themselves But over deep recursions they fret The cheerful heap has nary a care Harboring memory
More informationChapter 4: Threads. Chapter 4: Threads
Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Operating System Examples
More informationSafe Harbor Statement
Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment
More informationWhat is a thread anyway?
Concurrency in Java What is a thread anyway? Smallest sequence of instructions that can be managed independently by a scheduler There can be multiple threads within a process Threads can execute concurrently
More informationChapter 4: Threads. Operating System Concepts 9 th Edit9on
Chapter 4: Threads Operating System Concepts 9 th Edit9on Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads 1. Overview 2. Multicore Programming 3. Multithreading Models 4. Thread Libraries 5. Implicit
More informationJDK 9, 变化与未来. Xuelei Fan
2016-4-21 JDK 9, 变化与未来 Xuelei Fan Java 20-Year Topics JDK 9 OpenJDK Community JDK 9 Schedule 2016/05/26 Feature Complete 2016/08/11 All Tests Run 2016/09/01 Rampdown Start 2016/10/20 Zero Bug Bounce 2016/12/01
More informationCS420: Operating Systems
Threads James Moscola Department of Physical Sciences York College of Pennsylvania Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne Threads A thread is a basic unit of processing
More informationWhat every DBA needs to know about JDBC connection pools Bridging the language barrier between DBA and Middleware Administrators
Presented at What every DBA needs to know about JDBC connection pools Bridging the language barrier between DBA and Middleware Administrators Jacco H. Landlust Platform Architect Director Oracle Consulting
More informationINF 212 ANALYSIS OF PROG. LANGS CONCURRENCY. Instructors: Crista Lopes Copyright Instructors.
INF 212 ANALYSIS OF PROG. LANGS CONCURRENCY Instructors: Crista Lopes Copyright Instructors. Basics Concurrent Programming More than one thing at a time Examples: Network server handling hundreds of clients
More informationCopyright 2012, Oracle and/or its affiliates. All rights reserved.
1 ! 2 Oracle VM Introduction Adam Hawley, Senior Director Virtualization, Oracle January 15, 2013 Safe Harbor Statement The following is intended to outline our general product direction. It is intended
More information<Insert Picture Here> Future<JavaEE>
Future Jerome Dochez, GlassFish Architect The following/preceding is intended to outline our general product direction. It is intended for information purposes only, and may
More informationInnoDB: What s new in 8.0
InnoDB: What s new in 8.0 Sunny Bains Director Software Development Copyright 2017, Oracle and/or its its affiliates. All All rights reserved. Safe Harbor Statement The following is intended to outline
More informationUsing Java CompletionStage in Asynchronous Programming
Using Java CompletionStage in Asynchronous Programming DEV4798 Douglas Surber Oracle Database JDBC Architect Database Server Technologies October 25, 2018 Safe Harbor Statement The following is intended
More informationNative POSIX Thread Library (NPTL) CSE 506 Don Porter
Native POSIX Thread Library (NPTL) CSE 506 Don Porter Logical Diagram Binary Memory Threads Formats Allocators Today s Lecture Scheduling System Calls threads RCU File System Networking Sync User Kernel
More informationEnd-to-End Java Security Performance Enhancements for Oracle SPARC Servers Performance engineering for a revenue product
End-to-End Java Security Performance Enhancements for Oracle SPARC Servers Performance engineering for a revenue product Luyang Wang, Pallab Bhattacharya, Yao-Min Chen, Shrinivas Joshi and James Cheng
More informationCS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [THREADS] Frequently asked questions from the previous class survey
CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [THREADS] Shrideep Pallickara Computer Science Colorado State University L6.1 Frequently asked questions from the previous class survey L6.2 SLIDES CREATED BY:
More informationAP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS
AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this
More informationTransformation-free Data Pipelines by combining the Power of Apache Kafka and the Flexibility of the ESB's
Building Agile and Resilient Schema Transformations using Apache Kafka and ESB's Transformation-free Data Pipelines by combining the Power of Apache Kafka and the Flexibility of the ESB's Ricardo Ferreira
More informationNOSQL DATABASE CLOUD SERVICE. Flexible Data Models. Zero Administration. Automatic Scaling.
NOSQL DATABASE CLOUD SERVICE Flexible Data Models. Zero Administration. Automatic Scaling. Application development with no hassle... Oracle NoSQL Cloud Service is a fully managed NoSQL database cloud service
More informationLecture 03: Thread API (continue)
Lecture 03: Thread API (continue) SSC2 Behzad Bordbar School of Computer Science, University of Birmingham, UK Lecture 03 1 Recap Extending Thread or implementing Runnable Thread terminology Stopping Threads
More informationCMSC 433 Programming Language Technologies and Paradigms. Concurrency
CMSC 433 Programming Language Technologies and Paradigms Concurrency What is Concurrency? Simple definition Sequential programs have one thread of control Concurrent programs have many Concurrency vs.
More informationTruffle A language implementation framework
Truffle A language implementation framework Boris Spasojević Senior Researcher VM Research Group, Oracle Labs Slides based on previous talks given by Christian Wimmer, Christian Humer and Matthias Grimmer.
More informationThreads and Java Memory Model
Threads and Java Memory Model Oleg Šelajev @shelajev oleg@zeroturnaround.com October 6, 2014 Agenda Threads Basic synchronization Java Memory Model Concurrency Concurrency - several computations are executing
More informationCopyright 2014 Oracle and/or its affiliates. All rights reserved.
Copyright 2014 Oracle and/or its affiliates. All rights reserved. On the Quest Towards Fastest (Java) Virtual Machine on the Planet! @JaroslavTulach Oracle Labs Copyright 2015 Oracle and/or its affiliates.
More informationMotivation. Threads. Multithreaded Server Architecture. Thread of execution. Chapter 4
Motivation Threads Chapter 4 Most modern applications are multithreaded Threads run within application Multiple tasks with the application can be implemented by separate Update display Fetch data Spell
More informationTHREADS AND CONCURRENCY
THREADS AND CONCURRENCY Lecture 22 CS2110 Spring 2013 Graphs summary 2 Dijkstra: given a vertex v, finds shortest path from v to x for each vertex x in the graph Key idea: maintain a 5-part invariant on
More informationContents. G53SRP: Java Threads. Definition. Why we need it. A Simple Embedded System. Why we need it. Java Threads 24/09/2009 G53SRP 1 ADC
Contents G53SRP: Java Threads Chris Greenhalgh School of Computer Science 1 Definition Motivations Threads Java threads Example embedded process Java Thread API & issues Exercises Book: Wellings 1.1 &
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 informationChapter 4: Multithreaded
Chapter 4: Multithreaded Programming Chapter 4: Multithreaded Programming Overview Multithreading Models Thread Libraries Threading Issues Operating-System Examples 2009/10/19 2 4.1 Overview A thread is
More informationChapter 4: Threads. Operating System Concepts 9 th Edition
Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Operating System Examples
More informationChapter 4: Threads. Chapter 4: Threads
Chapter 4: Threads Silberschatz, Galvin and Gagne 2009 Chapter 4: Threads Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads 4.2
More informationOracle Solaris Virtualization: From DevOps to Enterprise
Oracle Solaris Virtualization: From DevOps to Enterprise Duncan Hardie Principal Product Manager Oracle Solaris 17 th November 2015 Oracle Confidential Internal/Restricted/Highly Restricted Safe Harbor
More informationToday s Topics. u Thread implementation. l Non-preemptive versus preemptive threads. l Kernel vs. user threads
Today s Topics COS 318: Operating Systems Implementing Threads u Thread implementation l Non-preemptive versus preemptive threads l Kernel vs. user threads Jaswinder Pal Singh and a Fabulous Course Staff
More informationProcesses and Threads
COS 318: Operating Systems Processes and Threads Kai Li and Andy Bavier Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall13/cos318 Today s Topics u Concurrency
More informationAsynchronous API with CompletableFuture
Asynchronous API with CompletableFuture Performance Tips and Tricks Sergey Kuksenko Java Platform Group, Oracle November, 2017 Safe Harbor Statement The following is intended to outline our general product
More informationChapter 4: Multithreaded Programming
Chapter 4: Multithreaded Programming Silberschatz, Galvin and Gagne 2013 Chapter 4: Multithreaded Programming Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading
More informationIntroduction to Asynchronous Programming Fall 2014
CS168 Computer Networks Fonseca Introduction to Asynchronous Programming Fall 2014 Contents 1 Introduction 1 2 The Models 1 3 The Motivation 3 4 Event-Driven Programming 4 5 select() to the rescue 5 1
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 informationIntel Threading Tools
Intel Threading Tools Paul Petersen, Intel -1- INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS,
More informationJava Threads. COMP 585 Noteset #2 1
Java Threads The topic of threads overlaps the boundary between software development and operation systems. Words like process, task, and thread may mean different things depending on the author and the
More informationMaking The Future Java
Making The Future Java Dalibor Topić (@robilad) Principal Product Manager October 18th, 2013 - HrOUG, Rovinj 1 The following is intended to outline our general product direction. It is intended for information
More informationThe Z Garbage Collector Scalable Low-Latency GC in JDK 11
The Z Garbage Collector Scalable Low-Latency GC in JDK 11 Per Lidén (@perliden) Consulting Member of Technical Staff Java Platform Group, Oracle October 24, 2018 Safe Harbor Statement The following is
More informationAsynchronous API with CompletableFuture
Asynchronous API with CompletableFuture Performance Tips and Tricks Sergey Kuksenko Java Platform Group, Oracle October, 2017 Safe Harbor Statement The following is intended to outline our general product
More informationECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017
ECE 550D Fundamentals of Computer Systems and Engineering Fall 2017 The Operating System (OS) Prof. John Board Duke University Slides are derived from work by Profs. Tyler Bletsch and Andrew Hilton (Duke)
More informationCSE 4/521 Introduction to Operating Systems
CSE 4/521 Introduction to Operating Systems Lecture 5 Threads (Overview, Multicore Programming, Multithreading Models, Thread Libraries, Implicit Threading, Operating- System Examples) Summer 2018 Overview
More informationTHREADS & CONCURRENCY
27/04/2018 Sorry for the delay in getting slides for today 2 Another reason for the delay: Yesterday: 63 posts on the course Piazza yesterday. A7: If you received 100 for correctness (perhaps minus a late
More informationChapter 4: Threads. Operating System Concepts 9 th Edition
Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Operating System Examples
More informationInteroperation of tasks
Operating systems (vimia219) Interoperation of tasks Tamás Kovácsházy, PhD 4 th topic, Implementation of tasks, processes and threads Budapest University of Technology and Economics Department of Measurement
More informationKeep Learning with Oracle University
Keep Learning with Oracle University Classroom Training Learning Subscription Live Virtual Class Training On Demand Cloud Technology Applications Industries education.oracle.com 3 Session Surveys Help
More informationJava in a World of Containers
Java in a World of Containers mikael.vidstedt@oracle.com Not-coder, JVM @MikaelVidstedt matthew.gilliard@oracle.com Coder, not-jvm @MaximumGilliard Copyright 2017, Oracle and/or its affiliates. All rights
More informationWhat s New in MySQL 5.7 Geir Høydalsvik, Sr. Director, MySQL Engineering. Copyright 2015, Oracle and/or its affiliates. All rights reserved.
What s New in MySQL 5.7 Geir Høydalsvik, Sr. Director, MySQL Engineering Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes
More informationLast class: Today: Thread Background. Thread Systems
1 Last class: Thread Background Today: Thread Systems 2 Threading Systems 3 What kind of problems would you solve with threads? Imagine you are building a web server You could allocate a pool of threads,
More informationOutline. Threads. Single and Multithreaded Processes. Benefits of Threads. Eike Ritter 1. Modified: October 16, 2012
Eike Ritter 1 Modified: October 16, 2012 Lecture 8: Operating Systems with C/C++ School of Computer Science, University of Birmingham, UK 1 Based on material by Matt Smart and Nick Blundell Outline 1 Concurrent
More informationProcess Description and Control
Process Description and Control 1 Process:the concept Process = a program in execution Example processes: OS kernel OS shell Program executing after compilation www-browser Process management by OS : Allocate
More informationSEDA: An Architecture for Well-Conditioned, Scalable Internet Services
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of California, Berkeley Operating Systems Principles
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 informationThe Z Garbage Collector Low Latency GC for OpenJDK
The Z Garbage Collector Low Latency GC for OpenJDK Per Lidén & Stefan Karlsson HotSpot Garbage Collection Team Jfokus VM Tech Summit 2018 Safe Harbor Statement The following is intended to outline our
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 informationExecutive Summary. It is important for a Java Programmer to understand the power and limitations of concurrent programming in Java using threads.
Executive Summary. It is important for a Java Programmer to understand the power and limitations of concurrent programming in Java using threads. Poor co-ordination that exists in threads on JVM is bottleneck
More informationModern and Fast: A New Wave of Database and Java in the Cloud. Joost Pronk Van Hoogeveen Lead Product Manager, Oracle
Modern and Fast: A New Wave of Database and Java in the Cloud Joost Pronk Van Hoogeveen Lead Product Manager, Oracle Scott Lynn Director of Product Management, Oracle Linux and Oracle Solaris, Oracle October
More informationSeptember 15th, Finagle + Java. A love story (
September 15th, 2016 Finagle + Java A love story ( ) @mnnakamura hi, I m Moses Nakamura Twitter lives on the JVM When Twitter realized we couldn t stay on a Rails monolith and continue to scale at the
More information<Insert Picture Here> Get on the Grid. JVM Language Summit Getting Started Guide. Cameron Purdy, VP of Development, Oracle
Get on the Grid JVM Language Summit Getting Started Guide Cameron Purdy, VP of Development, Oracle The following is intended to outline our general product direction. It is intended
More informationElastic Data. Harvey Raja Principal Member Technical Staff Oracle Coherence
Elastic Data Harvey Raja Principal Member Technical Staff Oracle Coherence The following is intended to outline our general product direction. It is intended for information purposes only, and may not
More informationA Quick Tour p. 1 Getting Started p. 1 Variables p. 3 Comments in Code p. 6 Named Constants p. 6 Unicode Characters p. 8 Flow of Control p.
A Quick Tour p. 1 Getting Started p. 1 Variables p. 3 Comments in Code p. 6 Named Constants p. 6 Unicode Characters p. 8 Flow of Control p. 9 Classes and Objects p. 11 Creating Objects p. 12 Static or
More informationChapter 4: Multi-Threaded Programming
Chapter 4: Multi-Threaded Programming Chapter 4: Threads 4.1 Overview 4.2 Multicore Programming 4.3 Multithreading Models 4.4 Thread Libraries Pthreads Win32 Threads Java Threads 4.5 Implicit Threading
More informationOracle Application Container Cloud
Oracle Application Container Cloud Matthew Baldwin Principal Product Manager Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes
More informationApplication Container Cloud
APPLICATION CONTAINER CLOUD Application Container Cloud with Java SE and Node The Best Java SE and Node Cloud. Get the choice of either Oracle Java SE Advanced, including Flight Recorder for production
More informationMission Possible - Near zero overhead profiling. Klara Ward Principal Software Developer Java Mission Control team, Oracle February 6, 2018
Mission Possible - Near zero overhead profiling Klara Ward Principal Software Developer Java Mission Control team, Oracle February 6, 2018 Hummingbird image by Yutaka Seki is licensed under CC BY 2.0 Copyright
More informationThe Z Garbage Collector An Introduction
The Z Garbage Collector An Introduction Per Lidén & Stefan Karlsson HotSpot Garbage Collection Team FOSDEM 2018 Safe Harbor Statement The following is intended to outline our general product direction.
More informationConsolidate and Prepare for Cloud Efficiencies Oracle Database 12c Oracle Multitenant Option
Consolidate and Prepare for Cloud Efficiencies Oracle Database 12c Oracle Multitenant Option Eric Rudie Master Principal Sales Consultant Oracle Public Sector 27 September 2016 Safe Harbor Statement The
More informationOperating System Performance and Large Servers 1
Operating System Performance and Large Servers 1 Hyuck Yoo and Keng-Tai Ko Sun Microsystems, Inc. Mountain View, CA 94043 Abstract Servers are an essential part of today's computing environments. High
More informationAn Oracle Technical White Paper September Oracle VM Templates for PeopleSoft
An Oracle Technical White Paper September 2010 Oracle VM Templates for PeopleSoft 1 Disclaimer The following is intended to outline our general product direction. It is intended for information purposes
More information<Insert Picture Here> Multi-language JDI? You're Joking, Right?
Multi-language JDI? You're Joking, Right? Jim Laskey Multi-language Lead Java Language and Tools Group The following is intended to outline our general product direction. It is intended
More informationThreads. CS-3013 Operating Systems Hugh C. Lauer. CS-3013, C-Term 2012 Threads 1
Threads CS-3013 Operating Systems Hugh C. Lauer (Slides include materials from Slides include materials from Modern Operating Systems, 3 rd ed., by Andrew Tanenbaum and from Operating System Concepts,
More informationUsing the MySQL Document Store
Using the MySQL Document Store Alfredo Kojima, Sr. Software Dev. Manager, MySQL Mike Zinner, Sr. Software Dev. Director, MySQL Safe Harbor Statement The following is intended to outline our general product
More informationOpenJDK Adoption Group
OpenJDK Adoption Group Dalibor Topić OpenJDK Adoption Group Lead Principal Product Manager Java Platform Group @ Oracle June 13th, 2017 @ JCP EC Safe Harbor Statement The following is intended to outline
More informationCMSC 132: Object-Oriented Programming II. Threads in Java
CMSC 132: Object-Oriented Programming II Threads in Java 1 Problem Multiple tasks for computer Draw & display images on screen Check keyboard & mouse input Send & receive data on network Read & write files
More informationChapter 4 Multithreaded Programming
Chapter 4 Multithreaded Programming Da-Wei Chang CSIE.NCKU Source: Abraham Silberschatz, Peter B. Galvin, and Greg Gagne, "Operating System Concepts", 9th Edition, Wiley. 1 1 Outline Overview Multithreading
More informationJava Enterprise Edition
Java Enterprise Edition The Big Problem Enterprise Architecture: Critical, large-scale systems Performance Millions of requests per day Concurrency Thousands of users Transactions Large amounts of data
More information