Java TM & Real-Time Advantages, Limitations, & RTSJ
|
|
|
- Tiffany Glenn
- 10 years ago
- Views:
Transcription
1 Java TM & Real-Time Advantages, Limitations, & Verimag ( Grenoble, France École IN2P3 d informatique: Temps Réel 29 May 2003 p.1/56
2 Java is a language with lots of merits We will examine: Its advantages for Real-Time programming; Its disadvantages for Real-Time programming; and, The proposal. École IN2P3 d informatique: Temps Réel 29 May 2003 p.2/56
3 Java is: Object-Oriented; Type-Safe; Portable; Library-Rich; and, has automatic Garbage Collection. École IN2P3 d informatique: Temps Réel 29 May 2003 p.3/56
4 Java versus C/C++ O-O helps with structuring code and decreasing code dependencies. Increased type-safety, bound-checks and lack of pointer-arithmetic increase overall safety and allow for aggressive compiler optimisations. Built-in exceptions, threads & synchronisation means that the compiler knows how to do The Right Thing. Built-in GC means no more dangling pointers & a lot fewer memory leaks. Fixed size and byte order of basic types helps with porting your software. École IN2P3 d informatique: Temps Réel 29 May 2003 p.4/56
5 Structures now become Classes and have associated Methods. Easier to tell what functions can have access to a structure. No need to check the kind of structure another function passed you - the O-O internal mechanisms do this automatically. O-O: How to let your compiler write your switches... École IN2P3 d informatique: Temps Réel 29 May 2003 p.5/56
6 - II Controlling access to methods, fields & classes themselves: public private protected packages (only one class can be public in a package) Other modifiers: abstract / static / final / strictfp synchronized (equivalent to a synchronized(this)) École IN2P3 d informatique: Temps Réel 29 May 2003 p.6/56
7 - III unions & enums don t exist - use polymorphism (or compile time constants if it s not worth the abstraction) multiple inheritance - use interfaces or composition Reflection - getclass, getmethods, getpackage, isinstance École IN2P3 d informatique: Temps Réel 29 May 2003 p.7/56
8 - III unions & enums don t exist - use polymorphism (or compile time constants if it s not worth the abstraction) multiple inheritance - use interfaces or composition Reflection - getclass, getmethods, getpackage, isinstance Unlike C++, there are no object destructors! Cannot control when finalizers will be executed (if they ever are... ) École IN2P3 d informatique: Temps Réel 29 May 2003 p.7/56
9 Concurrent Programming with Java Java has: Threads (& Condition Variables) École IN2P3 d informatique: Temps Réel 29 May 2003 p.8/56
10 Threads in Java Threads implement the Runnable interface, i.e., provide a run method Threads have priorities: from MIN_PRIORITY to MAX_PRIORITY, default is NORM_PRIORITY Threads have lower priority than the GC (always) Resource allocation is not (necessarily) priority-based Stack size can be declared, but it can also be ignored... École IN2P3 d informatique: Temps Réel 29 May 2003 p.9/56
11 Threads in Java - II Dæmon threads (cannot keep an application running) Have methods: holdslock, interrupt, join, yield, sleep, destroy (not implemented) No longer have: resume, stop, suspend : Threads poll for interrupts with one of: wait, sleep, join, isinterrupted The target thread can poll whenever it wants École IN2P3 d informatique: Temps Réel 29 May 2003 p.10/56
12 Starting a Thread class ERR { static public void pr(string msg){ System.err.println(Thread. currentthread().tostring()+": "+msg) ;}} class MyThread extends Thread { Thread parent; public MyThread() {parent = Thread. currentthread();} public void run() { ERR.pr("Hello"); } } École IN2P3 d informatique: Temps Réel 29 May 2003 p.11/56
13 Starting a Thread - II class Main { public static void main(string[] argv) { MyThread athread = new MyThread(); ERR.pr("this is main"); athread.start(); // calls run() try {athread.join();} catch (InterruptedException ie){err.pr ("Un-joinable"+ie);} finally {ERR.pr("Bye");} } } École IN2P3 d informatique: Temps Réel 29 May 2003 p.12/56
14 Interrupting a Thread class MyThread extends Thread { // As before... public void run() { ERR.pr("Hello"); try {this.sleep(2);} catch ( InterruptedException ie) {} parent.interrupt(); } } École IN2P3 d informatique: Temps Réel 29 May 2003 p.13/56
15 Interrupting a Thread - II class Main { public static void main(string[] argv) throws InterruptedException { MyThread athread = new MyThread(Thread.currentThread()); ERR.pr("this is main"); athread.start(); // calls run() try { athread.join(); École IN2P3 d informatique: Temps Réel 29 May 2003 p.14/56
16 Interrupting a Thread - III } } if (Thread.currentThread(). isinterrupted()) { ERR.pr("Was interrupted"); throw new InterruptedException(" Suicide...");} } catch (InterruptedException ie) { ERR.pr("Un-joinable:" + ie); throw ie; } finally {ERR.pr("Bye");} ERR.pr("Never printed..."); École IN2P3 d informatique: Temps Réel 29 May 2003 p.15/56
17 Each Java object has its own semaphore and its own condition variable. We use the synchronized(object){} construct to denote a critical region block protected by a monitor on the semaphore of the object. Inside a monitor, we use wait() & notify() to wait on a condition & to flag it. Can also use wait(/*timeout*/) and notifyall(). A break, continue, return, throw inside a monitor will exit it after having unlocked the object. Are you sure you do so in C/C++? École IN2P3 d informatique: Temps Réel 29 May 2003 p.16/56
18 - II Entering a monitor is not priority-based. A timed wait can wait for more than the timeout specified. Choosing a thread to notify is not priority-based. No priority-sorted wait queues. No priority-inversion avoidance protocol. École IN2P3 d informatique: Temps Réel 29 May 2003 p.17/56
19 java.lang.timer & java.util.timertask One-time execution; Repeated execution. fixed-delay n th execution starts period milliseconds after the (n 1) th execution (delays are therefore additive) fixed-rate n th execution starts n period milliseconds after the first execution (try to keep a constant rate - may execute many times in rapid succession to catch up) École IN2P3 d informatique: Temps Réel 29 May 2003 p.18/56
20 - II No Real-Time guarantees! Using wait(/*timeout*/) If a timer task takes too long, it can delay future executions. Not a dæmon thread by default (can keep an application from terminating) When should I run if no delays? scheduledexecutiontime() A timer can be associated with many timer tasks A timer task can be associated with many timers cancel() a timer or a timer task École IN2P3 d informatique: Temps Réel 29 May 2003 p.19/56
21 Timer Example class MyTimerTask extends TimerTask { private int MAX_TARDINESS = 15; public void run() { ERR.pr(toString()+": Started"); if (System.currentTimeMillis() - scheduledexecutiontime() >= MAX_TARDINESS) return; // Too late ERR.pr(toString()+": " + System.currentTimeMillis()); } École IN2P3 d informatique: Temps Réel 29 May 2003 p.20/56
22 } Timer Example - II public static void main(string[] argv) { MyTimerTask atimertask = new MyTimerTask(); Timer atimer = new Timer(false); // Not a daemon timer // Start=10 ms, period=30 ms atimer.scheduleatfixedrate(atimertask, 10L, 20L); // atimer.cancel(); } École IN2P3 d informatique: Temps Réel 29 May 2003 p.21/56
23 Native Interface Example - Java class HelloWorld { private native void print(); static { System.loadLibrary("HelloWorld"); } public static void main(string[] args) { Thread.currentThread().setName("The Main from Java"); new HelloWorld().print(); } } École IN2P3 d informatique: Temps Réel 29 May 2003 p.22/56
24 Native Interface Declaring methods as native Loading them up at start-up using static blocks Finding out signatures using javap -s class École IN2P3 d informatique: Temps Réel 29 May 2003 p.23/56
25 Type Signatures void V boolean Z char C byte B short S int I long J float F double D Object of class X : LX; Array of type X : [X ret foo(args) : (args)ret String[] foo(thread[] arr, int i, long j):? École IN2P3 d informatique: Temps Réel 29 May 2003 p.24/56
26 Type Signatures void V boolean Z char C byte B short S int I long J float F double D Object of class X : LX; Array of type X : [X ret foo(args) : (args)ret String[] foo(thread[] arr, int i, long j): ([Ljava/lang/Thread;IJ)[Ljava/lang/String; École IN2P3 d informatique: Temps Réel 29 May 2003 p.24/56
27 Can do lock/unlock, new, etc. It s heavy - all queries use strings Cannot optimise code written with it Java threads are not necessarily system threads May have to use a finalizer It will be run before the memory is reused... École IN2P3 d informatique: Temps Réel 29 May 2003 p.25/56
28 Used with GCJ (front-end of GCC) Java classes are C++ classes (not vice versa) Faster & can be optimised A lot simpler to write code École IN2P3 d informatique: Temps Réel 29 May 2003 p.26/56
29 Java is slow; Java s memory model is convoluted (Under revision); The GC is unpredictable; is unpredictable; can suffer from priority-inversion; Notification is not priority-based; are not accurate; Design for portability Cannot use any special OS mechanisms École IN2P3 d informatique: Temps Réel 29 May 2003 p.27/56
30 It s not Java, it s the implementations; One can use a JIT or an AOT compiler; It s easier to optimise Java than C/C++ No (wild) casts, pointer-arithmetic, etc.. École IN2P3 d informatique: Temps Réel 29 May 2003 p.28/56
31 JIT: can do anything a JVM does; works on bytecodes; needs resources; cannot optimise much; is unpredictable. AOT: can do aggressive optimisations; no need for extra resources at the target system; is predictable; can always add a JVM for loading classes. École IN2P3 d informatique: Temps Réel 29 May 2003 p.29/56
32 Interruptible, low latency, s exist Usually meant for large or non-critical systems But there is also the memory region technique. École IN2P3 d informatique: Temps Réel 29 May 2003 p.30/56
33 Thread & Dispatching Management Physical Access & Resource Sharing Event Handling Transfer of Control Thread Termination École IN2P3 d informatique: Temps Réel 29 May 2003 p.31/56
34 Preemptive, Priority-based by default At least 28 different priorities RealtimeThread Can access the heap Lower priority than the GC NoHeapRealtimeThread No heap accesses Higher priority than the GC AsyncEventHandler Depends on the noheap arg Can be unbound or bound to a particular thread It can block (holding resources) École IN2P3 d informatique: Temps Réel 29 May 2003 p.32/56
35 - II Need to have a reference to a Scheduler obj. A Scheduler has params for priority, importance, memory, etc. PeriodicParameters, AperiodicParameters, SporadicParameters Processing group to treat non-periodic threads as a single periodic one Max. Execution time, Deadline & overrun handlers The execution overrun handler may be ignored & use the duration only as a hint to the feasibility algorithm. École IN2P3 d informatique: Temps Réel 29 May 2003 p.33/56
36 - III Scheduler.addToFeasibility(Schedulable) to add another task in the feasibility analysis performed by the scheduler. Scheduler.isFeasible() to find out if the current system can be indeed scheduled Changing the parameters of a task at run-time through the setiffeasible(schedulable, ReleaseParameters, Parameters) waitfornextperiod() for periodic tasks. École IN2P3 d informatique: Temps Réel 29 May 2003 p.34/56
37 Scedulable Objects setscheduler( Scheduler sched, Parameters sched_params, ReleaseParameters release_params, Parameters mem_params, ProcessingGroupParameters group) defines the PriorityScheduler, with two final int fields, MAX_PRIORITY and MIN_PRIORITY. École IN2P3 d informatique: Temps Réel 29 May 2003 p.35/56
38 Parameters defines two kinds of parameters: PriorityParameters(int priority) and an additional one for declaring the importance of the threads along with their priority ImportanceParameters(int priority, int importance) École IN2P3 d informatique: Temps Réel 29 May 2003 p.36/56
39 Release Parameters - Periodic PeriodicParameters( HighResolutionTime start, /* null = start when released */ RelativeTime period, RelativeTime cost, RelativeTime deadline, /* use period when null */ AsyncEventHandler overrunhandler, AsyncEventHandler misshandler) École IN2P3 d informatique: Temps Réel 29 May 2003 p.37/56
40 Release Parameters - Aperiodic AperiodicParameters( RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunhandler, AsyncEventHandler misshandler) École IN2P3 d informatique: Temps Réel 29 May 2003 p.38/56
41 Release Parameters - Sporadic SporadicParameters( RelativeTime mininterarrival, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunhandler, AsyncEventHandler misshandler) École IN2P3 d informatique: Temps Réel 29 May 2003 p.39/56
42 Parameters Parameters( long maxarea, // or Parameters.NO_MAX (units= bytes) long maximmortal, // or NO_MAX (units=bytes) long allocationrate) // or NO_MAX (units=bytes/sec) École IN2P3 d informatique: Temps Réel 29 May 2003 p.40/56
43 Thread Group ProcessingGroupParameters( HighResolutionTime start, RelativeTime period, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunhandler, AsyncEventHandler misshandler) École IN2P3 d informatique: Temps Réel 29 May 2003 p.41/56
44 Creating a R-T Thread Scheduler sched= new PriorityScheduler(); PeriodicParameters pp = new PeriodicParameters( new RelativeTime(0,0),//when released new RelativeTime(100, 10), // period new RelativeTime(30, 0), // cost new RelativeTime(60, 0), // deadline null, // no Overrun Handler null); // no Miss Period Handler ImportanceParameters prio = new ImportanceParameters(MAX_PRIORITY, 3); Area ma = new LT(1024, 1024); École IN2P3 d informatique: Temps Réel 29 May 2003 p.42/56
45 Creating a R-T Thread - II Parameters mp = new Parameters(Parameters. NO_MAX,Parameters.NO_MAX); ProcessingGroupParameters gp = null; RealtimeThread rt = new RealtimeThread(prio, pp, mp, ma, gp, new Runnable () {/*the run method...*/ }); rt.setscheduler(sched); if (!rt.getscheduler().isfeasible()) throw new Exception("Not feasible"); rt.start(); // Release the thread École IN2P3 d informatique: Temps Réel 29 May 2003 p.43/56
46 Finding a New Scheduler class SchedExample { public static Scheduler findsched(string policy) { String classname = System.getProperty(" javax.realtime.scheduler."+policy); Class clazz; try { if (null!= classname && null!= (clazz = Class.forName(className))) return (Scheduler) clazz.getmethod(" instance",null).invoke(null,null); } catch (/* lots of exceptions */) {} return null; } École IN2P3 d informatique: Temps Réel 29 May 2003 p.44/56
47 Finding a New Scheduler - II Scheduler sched = findsched("edf"); if (null!= sched) { RealtimeThread rt = new RealtimeThread( /*...*/); rt.setscheduler(sched); if (!rt.getscheduler().isfeasible()) throw new Exception("Not feasible"); rt.start(); // Release the thread } École IN2P3 d informatique: Temps Réel 29 May 2003 p.45/56
48 Management Execution Stack, Heap & Scopes Scopes give bounds to the lifetime of objects allocated within them Objects of a scope collected en masse after its Runnable exits A scope is collected before being reused (not when exited, so finalizers still a problem) Hierarchy of scopes - inner, outer (or unrelated) Immortal memory : top-most scope, collected when the JVM exits Objects surviving current scope need be allocated to the top-most scope which contains a reference to these objects École IN2P3 d informatique: Temps Réel 29 May 2003 p.46/56
49 Management - II LT versus VT Allocation in LT is linear with respect to object s size. A VT may be separately GC ed and may be augmented if it s not big enough Assignment Rules Refs Heap Immortal Scoped Heap Yes Yes No Immortal Yes Yes No Scoped Yes Yes Yes, if same or higher scope École IN2P3 d informatique: Temps Réel 29 May 2003 p.47/56
50 Management - III LTPhysical, VTPhysical, ImmortalPhysical SizeEstimator & reserve(class, instances) RawAccess - Accessing a region interpreted as byte, short, int, long or as an array of such RawFloatAccess - Same but for float & double Maximum preemption latency of a Real-Time thread due to the GC is given by: RealtimeSystem.currentGC(). getpreemptionlatency() (returns a RelativeTime) École IN2P3 d informatique: Temps Réel 29 May 2003 p.48/56
51 Priority inheritance protocol supported by default Given the GC it s impossible to implement PIP! 3 Wait-free queues for avoiding this. WaitFreeWriteQueue (non-blocking write), WaitFreeReadQueue (non-blocking read), WaitFreeDequeue (non-blocking write & read) Real-Time part of queue never blocks - no need for PIP. If action is not possible (e.g., queue is full) you decide (overwrite old value, ignore the new one) École IN2P3 d informatique: Temps Réel 29 May 2003 p.49/56
52 Events AsyncEvent, AsyncEventHandler, handleasyncevent() run() bindto(string), addhandler(), fire() Data-less events Can have multiple handlers per event, events per handler Behave like RealtimeThread, or like NoHeapRealtimeThread if given a scoped region Can block POSIXSignalHandler if OS supports POSIX École IN2P3 d informatique: Temps Réel 29 May 2003 p.50/56
53 Transfer of Control Java s longjmp A method must declare lyinterruptedexception, otherwise it is postponed Don t break code which doesn t expect to be interrupted Also postponed if in a synchronized block Don t leave shared objects in an inconsistent state Use happened() to find out if the AIE you got is the one you expected dointerruptible() if it is, propagate it if not École IN2P3 d informatique: Temps Réel 29 May 2003 p.51/56
54 ATC - II Class Timed for Real-Time timers (throws an AIE) Timer restarted after dointerruptible() resettime() to use another duration disable, enable, fire, propagate, isenabled, happened Blocking java.io.* classes must know of AIE (unblock, raise IOException, or complete normally... ) École IN2P3 d informatique: Temps Réel 29 May 2003 p.52/56
55 Asynch. Termination Allowing it everywhere, always is unsafe So we use ATC to do it An AIE is treated as a normal exception, but a catch( ALL ) doesn t catch it, unless we specifically test for the AIE with happened École IN2P3 d informatique: Temps Réel 29 May 2003 p.53/56
56 RTCE & HIP- from the J-Consortium.org Ravenscar-Java- from the Ada community JTRON- from Japan Java 2, Micro Edition (J2ME) - from SUN, for embedded systems École IN2P3 d informatique: Temps Réel 29 May 2003 p.54/56
57 Easier to write correct code (threads, monitors, exceptions) Many libraries Strongly typed No out-of-bound accesses, dangling pointers Automatic GC- no more leaks Easier to have it optimised It has all the buzzwords... École IN2P3 d informatique: Temps Réel 29 May 2003 p.55/56
58 Why Others are already using it Tools are getting better (and more) Using C/C++ is tedious, error-prone, difficult to maintain and to have it validated Embedded systems is a huge market Software is replacing hardware Too complex for todays tools and languages Java promises to help us Cannot fight a dream... So join it! École IN2P3 d informatique: Temps Réel 29 May 2003 p.56/56
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
Design Pattern for the Adaptive Scheduling of Real-Time Tasks with Multiple Versions in RTSJ
Design Pattern for the Adaptive Scheduling of Real-Time Tasks with Multiple Versions in RTSJ Rodrigo Gonçalves, Rômulo Silva de Oliveira, Carlos Montez LCMI Depto. de Automação e Sistemas Univ. Fed. de
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
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
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
The Design and Performance of Real-Time Java Middleware
IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 14, NO. 11, NOVEMBER 2003 1 The Design and Performance of Real-Time Java Middleware Angelo Corsaro, Student Member, IEEE, and Douglas C. Schmidt,
Scheduling of the Distributed Thread Abstraction with Timing Constraints using RTSJ
Scheduling of the Distributed Thread Abstraction with Timing Constraints using RTSJ Patricia Della Méa Plentz, Romulo Silva de Oliveira, Carlos Montez LCMI - Automation and Systems Dept Federal Univers.
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
PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions. Outline. Performance oriented design
PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions Slide 1 Outline Principles for performance oriented design Performance testing Performance tuning General
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
Real Time Programming: Concepts
Real Time Programming: Concepts Radek Pelánek Plan at first we will study basic concepts related to real time programming then we will have a look at specific programming languages and study how they realize
An Overview of Java. overview-1
An Overview of Java overview-1 Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2
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
Predictable response times in event-driven real-time systems
Predictable response times in event-driven real-time systems Automotive 2006 - Security and Reliability in Automotive Systems Stuttgart, October 2006. Presented by: Michael González Harbour [email protected]
First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science
First Java Programs V. Paúl Pauca Department of Computer Science Wake Forest University CSC 111D Fall, 2015 Hello World revisited / 8/23/15 The f i r s t o b l i g a t o r y Java program @author Paul Pauca
02 B The Java Virtual Machine
02 B The Java Virtual Machine CS1102S: Data Structures and Algorithms Martin Henz January 22, 2010 Generated on Friday 22 nd January, 2010, 09:46 CS1102S: Data Structures and Algorithms 02 B The Java Virtual
Tasks Schedule Analysis in RTAI/Linux-GPL
Tasks Schedule Analysis in RTAI/Linux-GPL Claudio Aciti and Nelson Acosta INTIA - Depto de Computación y Sistemas - Facultad de Ciencias Exactas Universidad Nacional del Centro de la Provincia de Buenos
Real-Time Java for Latency Critical Banking Applications. Bertrand Delsart JavaRTS Technical Leader Author of Sun's RTGC technology
Real-Time Java for Latency Critical Banking Applications Bertrand Delsart JavaRTS Technical Leader Author of Sun's RTGC technology R eal-time S ystem Agenda Background Benefits of a Real-Time Java Virtual
Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.
Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java
Object Oriented Software Design II
Object Oriented Software Design II Introduction to C++ Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa February 20, 2012 G. Lipari (Scuola Superiore Sant Anna) C++ Intro February
CPU Scheduling Outline
CPU Scheduling Outline What is scheduling in the OS? What are common scheduling criteria? How to evaluate scheduling algorithms? What are common scheduling algorithms? How is thread scheduling different
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
How to create/avoid memory leak in Java and.net? Venkat Subramaniam [email protected] http://www.durasoftcorp.com
How to create/avoid memory leak in Java and.net? Venkat Subramaniam [email protected] http://www.durasoftcorp.com Abstract Java and.net provide run time environment for managed code, and Automatic
General Introduction
Managed Runtime Technology: General Introduction Xiao-Feng Li ([email protected]) 2012-10-10 Agenda Virtual machines Managed runtime systems EE and MM (JIT and GC) Summary 10/10/2012 Managed Runtime
Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming
Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming Java has become enormously popular. Java s rapid rise and wide acceptance can be traced to its design
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
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
Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur
Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No. # 26 Real - Time POSIX. (Contd.) Ok Good morning, so let us get
Threads & Tasks: Executor Framework
Threads & Tasks: Executor Framework Introduction & Motivation WebServer Executor Framework Callable and Future 12 April 2012 1 Threads & Tasks Motivations for using threads Actor-based Goal: Create an
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
Threads 1. When writing games you need to do more than one thing at once.
Threads 1 Threads Slide 1 When writing games you need to do more than one thing at once. Threads offer a way of automatically allowing more than one thing to happen at the same time. Java has threads as
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
Java Interview Questions and Answers
1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java
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
picojava TM : A Hardware Implementation of the Java Virtual Machine
picojava TM : A Hardware Implementation of the Java Virtual Machine Marc Tremblay and Michael O Connor Sun Microelectronics Slide 1 The Java picojava Synergy Java s origins lie in improving the consumer
Scheduling recurring tasks in Java applications
Introducing a simple generalisation of the Java language's Timer class Skill Level: Intermediate Tom White Lead Java Developer Kizoom 04 Nov 2003 All manner of Java applications commonly need to schedule
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
Developing Embedded Software in Java Part 1: Technology and Architecture
Developing Embedded Software in Java Part 1: Technology and Architecture by Michael Barr Embedded Systems Conference Europe The Netherlands November 16-18, 1999 Course #300 Sun s introduction of the Java
Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas
CS 110B - Rule Storage Classes Page 18-1 Attributes are distinctive features of a variable. Data type, int or double for example, is an attribute. Storage class is another attribute. There are four storage
Jorix kernel: real-time scheduling
Jorix kernel: real-time scheduling Joris Huizer Kwie Min Wong May 16, 2007 1 Introduction As a specialized part of the kernel, we implemented two real-time scheduling algorithms: RM (rate monotonic) and
Performance Comparison of RTOS
Performance Comparison of RTOS Shahmil Merchant, Kalpen Dedhia Dept Of Computer Science. Columbia University Abstract: Embedded systems are becoming an integral part of commercial products today. Mobile
Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6
Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6 Winter Term 2008 / 2009 Jun.-Prof. Dr. André Brinkmann [email protected] Universität Paderborn PC² Agenda Multiprocessor and
Getting Started with the Internet Communications Engine
Getting Started with the Internet Communications Engine David Vriezen April 7, 2014 Contents 1 Introduction 2 2 About Ice 2 2.1 Proxies................................. 2 3 Setting Up ICE 2 4 Slices 2
Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C
Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C 1 An essential part of any embedded system design Programming 2 Programming in Assembly or HLL Processor and memory-sensitive
Real- Time Scheduling
Real- Time Scheduling Chenyang Lu CSE 467S Embedded Compu5ng Systems Readings Ø Single-Processor Scheduling: Hard Real-Time Computing Systems, by G. Buttazzo. q Chapter 4 Periodic Task Scheduling q Chapter
Chapter 1 Java Program Design and Development
presentation slides for JAVA, JAVA, JAVA Object-Oriented Problem Solving Third Edition Ralph Morelli Ralph Walde Trinity College Hartford, CT published by Prentice Hall Java, Java, Java Object Oriented
Restraining Execution Environments
Restraining Execution Environments Segurança em Sistemas Informáticos André Gonçalves Contents Overview Java Virtual Machine: Overview The Basic Parts Security Sandbox Mechanisms Sandbox Memory Native
Java Coding Practices for Improved Application Performance
1 Java Coding Practices for Improved Application Performance Lloyd Hagemo Senior Director Application Infrastructure Management Group Candle Corporation In the beginning, Java became the language of the
1. What are Data Structures? Introduction to Data Structures. 2. What will we Study? CITS2200 Data Structures and Algorithms
1 What are ata Structures? ata Structures and lgorithms ata structures are software artifacts that allow data to be stored, organized and accessed Topic 1 They are more high-level than computer memory
Embedded Systems. 6. Real-Time Operating Systems
Embedded Systems 6. Real-Time Operating Systems Lothar Thiele 6-1 Contents of Course 1. Embedded Systems Introduction 2. Software Introduction 7. System Components 10. Models 3. Real-Time Models 4. Periodic/Aperiodic
Java (12 Weeks) Introduction to Java Programming Language
Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short
Fundamentals of Java Programming
Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors
The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. [email protected] Oct 2003 Presented to Gordon College CS 311
The Java Virtual Machine and Mobile Devices John Buford, Ph.D. [email protected] Oct 2003 Presented to Gordon College CS 311 Objectives Review virtual machine concept Introduce stack machine architecture
Operating Systems Concepts: Chapter 7: Scheduling Strategies
Operating Systems Concepts: Chapter 7: Scheduling Strategies Olav Beckmann Huxley 449 http://www.doc.ic.ac.uk/~ob3 Acknowledgements: There are lots. See end of Chapter 1. Home Page for the course: http://www.doc.ic.ac.uk/~ob3/teaching/operatingsystemsconcepts/
JAVA - MULTITHREADING
JAVA - MULTITHREADING http://www.tutorialspoint.com/java/java_multithreading.htm Copyright tutorialspoint.com Java is amulti threaded programming language which means we can develop multi threaded program
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
Resource Utilization of Middleware Components in Embedded Systems
Resource Utilization of Middleware Components in Embedded Systems 3 Introduction System memory, CPU, and network resources are critical to the operation and performance of any software system. These system
Tomcat Tuning. Mark Thomas April 2009
Tomcat Tuning Mark Thomas April 2009 Who am I? Apache Tomcat committer Resolved 1,500+ Tomcat bugs Apache Tomcat PMC member Member of the Apache Software Foundation Member of the ASF security committee
A Comparative Study on Vega-HTTP & Popular Open-source Web-servers
A Comparative Study on Vega-HTTP & Popular Open-source Web-servers Happiest People. Happiest Customers Contents Abstract... 3 Introduction... 3 Performance Comparison... 4 Architecture... 5 Diagram...
IBM SDK, Java Technology Edition Version 1. IBM JVM messages IBM
IBM SDK, Java Technology Edition Version 1 IBM JVM messages IBM IBM SDK, Java Technology Edition Version 1 IBM JVM messages IBM Note Before you use this information and the product it supports, read the
Monitoring Java enviroment / applications
Monitoring Java enviroment / applications Uroš Majcen [email protected] Java is Everywhere You Can Expect More. Java in Mars Rover With the help of Java Technology, and the Jet Propulsion Laboratory (JPL),
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
CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014
CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages Nicki Dell Spring 2014 What is a Programming Language? A set of symbols and associated tools that translate (if necessary) collections
STM32JAVA. Embedded Java Solutions for STM32
STM32JAVA Embedded Java Solutions for STM32 What is STM32Java? Solution to develop and to deploy software applications on STM32F0 to STM32F7 microcontrollers using Java Help to reduce the total cost of
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
Threads Scheduling on Linux Operating Systems
Threads Scheduling on Linux Operating Systems Igli Tafa 1, Stavri Thomollari 2, Julian Fejzaj 3 Polytechnic University of Tirana, Faculty of Information Technology 1,2 University of Tirana, Faculty of
Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition
Chapter 5: CPU Scheduling Silberschatz, Galvin and Gagne 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating
Can You Trust Your JVM Diagnostic Tools?
Can You Trust Your JVM Diagnostic Tools? Isaac Sjoblom, Tim S. Snyder, and Elena Machkasova Computer Science Discipline University of Minnesota Morris Morris, MN 56267 [email protected], [email protected],
Java Programming Fundamentals
Lecture 1 Part I Java Programming Fundamentals Topics in Quantitative Finance: Numerical Solutions of Partial Differential Equations Instructor: Iraj Kani Introduction to Java We start by making a few
An Incomplete C++ Primer. University of Wyoming MA 5310
An Incomplete C++ Primer University of Wyoming MA 5310 Professor Craig C. Douglas http://www.mgnet.org/~douglas/classes/na-sc/notes/c++primer.pdf C++ is a legacy programming language, as is other languages
10.04.2008. Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details
Thomas Fahrig Senior Developer Hypervisor Team Hypervisor Architecture Terminology Goals Basics Details Scheduling Interval External Interrupt Handling Reserves, Weights and Caps Context Switch Waiting
Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert
Ubiquitous Computing Ubiquitous Computing The Sensor Network System Sun SPOT: The Sun Small Programmable Object Technology Technology-Based Wireless Sensor Networks a Java Platform for Developing Applications
Java Troubleshooting and Performance
Java Troubleshooting and Performance Margus Pala Java Fundamentals 08.12.2014 Agenda Debugger Thread dumps Memory dumps Crash dumps Tools/profilers Rules of (performance) optimization 1. Don't optimize
Effective Java Programming. measurement as the basis
Effective Java Programming measurement as the basis Structure measurement as the basis benchmarking micro macro profiling why you should do this? profiling tools Motto "We should forget about small efficiencies,
Production time profiling On-Demand with Java Flight Recorder
Production time profiling On-Demand with Java Flight Recorder Using Java Mission Control & Java Flight Recorder Klara Ward Principal Software Developer Java Platform Group, Oracle Copyright 2015, Oracle
What is best for embedded development? Do most embedded projects still need an RTOS?
RTOS versus GPOS: What is best for embedded development? Do most embedded projects still need an RTOS? It is a good question, given the speed of today s high-performance processors and the availability
An Implementation Of Multiprocessor Linux
An Implementation Of Multiprocessor Linux This document describes the implementation of a simple SMP Linux kernel extension and how to use this to develop SMP Linux kernels for architectures other than
Virtual Machine Learning: Thinking Like a Computer Architect
Virtual Machine Learning: Thinking Like a Computer Architect Michael Hind IBM T.J. Watson Research Center March 21, 2005 CGO 05 Keynote 2005 IBM Corporation What is this talk about? Virtual Machines? 2
4. Fixed-Priority Scheduling
Simple workload model 4. Fixed-Priority Scheduling Credits to A. Burns and A. Wellings The application is assumed to consist of a fixed set of tasks All tasks are periodic with known periods This defines
Socket-based Network Communication in J2SE and J2ME
Socket-based Network Communication in J2SE and J2ME 1 C/C++ BSD Sockets in POSIX POSIX functions allow to access network connection in the same way as regular files: There are special functions for opening
Objectif. Participant. Prérequis. Remarque. Programme. C# 3.0 Programming in the.net Framework. 1. Introduction to the.
Objectif This six-day instructor-led course provides students with the knowledge and skills to develop applications in the.net 3.5 using the C# 3.0 programming language. C# is one of the most popular programming
Evolution of the Major Programming Languages
142 Evolution of the Major Programming Languages Object Oriented Programming: Smalltalk Object-Oriented: It s fundamental characteristics are: Data abstraction, Inheritance and Dynamic Binding. The essence
A Look through the Android Stack
A Look through the Android Stack A Look through the Android Stack Free Electrons Maxime Ripard Free Electrons Embedded Linux Developers c Copyright 2004-2012, Free Electrons. Creative Commons BY-SA 3.0
CS 111 Classes I 1. Software Organization View to this point:
CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects
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
SYSTEM ecos Embedded Configurable Operating System
BELONGS TO THE CYGNUS SOLUTIONS founded about 1989 initiative connected with an idea of free software ( commercial support for the free software ). Recently merged with RedHat. CYGNUS was also the original
Chapter 6, The Operating System Machine Level
Chapter 6, The Operating System Machine Level 6.1 Virtual Memory 6.2 Virtual I/O Instructions 6.3 Virtual Instructions For Parallel Processing 6.4 Example Operating Systems 6.5 Summary Virtual Memory General
CSC 551: Web Programming. Spring 2004
CSC 551: Web Programming Spring 2004 Java Overview Design goals & features platform independence, portable, secure, simple, object-oriented, Programming models applications vs. applets vs. servlets intro
STORM. Simulation TOol for Real-time Multiprocessor scheduling. Designer Guide V3.3.1 September 2009
STORM Simulation TOol for Real-time Multiprocessor scheduling Designer Guide V3.3.1 September 2009 Richard Urunuela, Anne-Marie Déplanche, Yvon Trinquet This work is part of the project PHERMA supported
Mutual Exclusion using Monitors
Mutual Exclusion using Monitors Some programming languages, such as Concurrent Pascal, Modula-2 and Java provide mutual exclusion facilities called monitors. They are similar to modules in languages that
Real-Time Component Software. slide credits: H. Kopetz, P. Puschner
Real-Time Component Software slide credits: H. Kopetz, P. Puschner Overview OS services Task Structure Task Interaction Input/Output Error Detection 2 Operating System and Middleware Applica3on So5ware
Exception Handling. Overloaded methods Interfaces Inheritance hierarchies Constructors. OOP: Exception Handling 1
Exception Handling Error handling in general Java's exception handling mechanism The catch-or-specify priciple Checked and unchecked exceptions Exceptions impact/usage Overloaded methods Interfaces Inheritance
Multithreaded Programming
Java Multithreaded Programming This chapter presents multithreading, which is one of the core features supported by Java. The chapter introduces the need for expressing concurrency to support simultaneous
Practical Performance Understanding the Performance of Your Application
Neil Masson IBM Java Service Technical Lead 25 th September 2012 Practical Performance Understanding the Performance of Your Application 1 WebSphere User Group: Practical Performance Understand the Performance
Introduction to Java
Introduction to Java The HelloWorld program Primitive data types Assignment and arithmetic operations User input Conditional statements Looping Arrays CSA0011 Matthew Xuereb 2008 1 Java Overview A high
