Fakultät für informatik informatik 12 technische universität dortmund Imperative model of computation Peter Marwedel TU Dortmund, Informatik 12 Graphics:

Slides:



Advertisements
Similar presentations
Technische universität dortmund fakultät für informatik informatik 12 Models of computation Peter Marwedel TU Dortmund Informatik 12 Graphics: © Alexandra.
Advertisements

Peter Marwedel TU Dortmund, Informatik 12
Fakultät für informatik informatik 12 technische universität dortmund Optimizations - Compilation for Embedded Processors - Peter Marwedel TU Dortmund.
Technische universität dortmund fakultät für informatik informatik 12 Specifications and Modeling Peter Marwedel TU Dortmund, Informatik 12 Graphics: ©
Fakultät für informatik informatik 12 technische universität dortmund Petri Nets Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte,
Evaluation and Validation
Fakult ä t f ü r informatik informatik 12 technische universit ä t dortmund Data flow models Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra.
Fakultät für informatik informatik 12 technische universität dortmund Specifications and Modeling Peter Marwedel TU Dortmund, Informatik 12 Graphics: ©
Fakultät für informatik informatik 12 technische universität dortmund Standard Optimization Techniques Peter Marwedel Informatik 12 TU Dortmund Germany.
Fakultät für informatik informatik 12 technische universität dortmund SDL Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte, Gesine.
Technische universität dortmund fakultät für informatik informatik 12 Discrete Event Models Peter Marwedel TU Dortmund, Informatik 12 Germany
Communicating finite state machines
Technische universität dortmund fakultät für informatik informatik 12 Specifications and Modeling Peter Marwedel TU Dortmund, Informatik
Embedded Systems & Parallel Programming P. Marwedel, Univ. Dortmund/Informatik 12 + ICD/ES, 2007 Universität Dortmund A view on embedded systems.
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
So far Binary numbers Logic gates Digital circuits process data using gates – Half and full adder Data storage – Electronic memory – Magnetic memory –
1 G54PRG Programming Lecture 1 Amadeo Ascó Adam Moore G54PRG Programming Lecture 1 Amadeo Ascó 3 Java Programming Language.
fakultät für informatik informatik 12 technische universität dortmund Optimizations - Compilation for Embedded Processors - Peter Marwedel TU Dortmund.
Chapter 1 Introduction Copyright © Operating Systems, by Dhananjay Dhamdhere Copyright © Introduction Abstract Views of an Operating System.
Fakultät für informatik informatik 12 technische universität dortmund Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund,
1 Java Card Technology Prepared by:Ali Toyserkani Adopted from: Introduction to Java Card Technology C. Enrique Ortiz.
Debugging operating systems with time-traveling virtual machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
Multi-Application in Smart Card-based Devices Christophe Colas, Chief Software Architect August 2002.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2003 Universität Dortmund Hardware/Software Codesign.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Introduction to Computer Administration Introduction.
3.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Process An operating system executes a variety of programs: Batch system.
Processes Management.
Executional Architecture
SE-292 High Performance Computing
Petri Nets Jian-Jia Chen (slides are based on Peter Marwedel)
Technische universität dortmund fakultät für informatik informatik 12 Specifications, Modeling, and Model of Computation Jian-Jia Chen (slides are based.
(slides are based on Peter Marwedel)
technische universität dortmund fakultät für informatik informatik 12 Early design phases Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund,
Technische universität dortmund fakultät für informatik informatik 12 Discrete Event Models Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund,
Hardware/ Software Partitioning 2011 年 12 月 09 日 Peter Marwedel TU Dortmund, Informatik 12 Germany Graphics: © Alexandra Nolte, Gesine Marwedel, 2003 These.
Fakultät für informatik informatik 12 technische universität dortmund Specifications - Session 5 - Peter Marwedel TU Dortmund Informatik 12 Germany Slides.
Multimedia Network Communications Subject:T0934 / Multimedia Programming Foundation Session:13 Tahun:2009 Versi:1/0.
J2ME 25 July Overview  What is J2ME?  The CLDC and CDC configurations  MIDP and MIDlets  Development Tools  Demonstrations.
UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01.
Fakultät für informatik informatik 12 technische universität dortmund Imperative languages Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra.
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Chapter 13 Embedded Systems
J2ME Prepared by: - Gaery- Ronny - Alan- Andy. Why Technology for Mobile Devices? The nature of wireless devices is changing Old devices: All the software.
Embedded Java Research Geoffrey Beers Peter Jantz December 18, 2001.
Topics on KVM Presented By Xiaozhou David Zhu. Topics covered Introduction Java2 Platform Micro Edition CLDC KVM.
Course Outline DayContents Day 1 Introduction Motivation, definitions, properties of embedded systems, outline of the current course How to specify embedded.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 11 J2ME and MIDlets Rob Pooley
Computer Science Wi-Fi App using J2ME and MVC Architecture Advisor : Dr. Chung-E Wang Department of Computer Science Sacramento State University Date:
J2ME Presented by May Sayed & Menna Hawash. Outline Introduction “Java Technology” Introduction “What is J2ME?” J2ME Architecture J2ME Core Concepts 
1Basics of J2ME. 2 Objectives –Understand the different java API’s and how the mobile edition API’s fit in –Understand what a mobile configuration and.
Enhancements to Java for Real Time Systems Theresa Dsena CSE Fall 2006 Prof. Ganesan.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
CSCI1600: Embedded and Real Time Software Lecture 18: Real Time Languages Steven Reiss, Fall 2015.
technische universität dortmund fakultät für informatik informatik 12 Early design phases Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund,
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Advance Computer Programming Market for Java ME The Java ME Platform – Java 2 Micro Edition (J2ME) combines a resource- constrained JVM and a set of Java.
The Java Platform Micro Edition Java ME
Introduction to Operating Systems Concepts
Computer System Structures
Before You Begin Nahla Abuel-ola /WIT.
Introduction to the CVM and the Timesys RI
2. Specification and Modeling
MOBILE DEVICE OPERATING SYSTEM
Wireless Instant Messaging Using J2ME
Embedded System Design Specifications and Modeling
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Specifications and Modeling
Chapter 13: I/O Systems.
Presentation transcript:

fakultät für informatik informatik 12 technische universität dortmund Imperative model of computation Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte, Gesine Marwedel, /10/28 These slides use Microsoft clip arts. Microsoft copyright restrictions apply.

- 2 - technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Models of computation considered in this course Communication/ local computations Shared memory Message passing Synchronous | Asynchronous Undefined components Plain text, use cases | (Message) sequence charts Communicating finite state machines StateChartsSDL Data flow(Not useful)Kahn networks, SDF Petri nets C/E nets, P/T nets, … Discrete event (DE) model VHDL*, Verilog*, SystemC*, … Only experimental systems, e.g. distributed DE in Ptolemy Imperative (Von Neumann) model C, C++, JavaC, C++, Java with libraries CSP, ADA | * Classification based on the implementation of HDLs

- 3 - technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Imperative (von-Neumann) model The von-Neumann model reflects the principles of operation of standard computers: Sequential execution of instructions (sequential control flow, fixed sequence of operations) Possible branches Partitioning of applications into threads In most cases: Context switching between threads, frequently based on pre-emption (cooperative multi-tasking or time-triggered context switch less common) Access to shared memory

- 4 - technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 From implementation concepts to programming models Example languages Machine languages (binary) Assembly languages (mnemonics) Imperative languages providing a limited abstraction of machine languages (C, C++, Java, ….) Threads/processes Initially available only as entities managed by the operating system Made available to the programmer as well Languages initially not designed for communication, availability of threads made synchronization and communication a must. Bottom up process

- 5 - technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Communication via shared memory Several threads access the same memory Very fast communication technique (no extra copying) Potential race conditions: thread a { u = 1; if u<5 {u = u + 1;..} } thread b {.. u = 5 } Context switch after the test could result in u == 6. inconsistent results possible Critical sections = sections at which exclusive access to resource r (e.g. shared memory) must be guaranteed

- 6 - technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Shared memory thread a { u = 1;.. P(S) //obtain mutex if u<5 {u = u + 1;..} // critical section V(S) //release mutex } thread b {.. P(S) //obtain mutex u = 5 // critical section V(S) //release mutex } S: semaphore P(S) grants up to n concurrent accesses to resource n =1 in this case (mutex/lock) V(S) increases number of allowed accesses to resource Imperative model should be supported by: mutual exclusion for critical sections cache coherency protocols

- 7 - technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Synchronous message passing: CSP CSP (communicating sequential processes) [Hoare, 1985], rendez-vous-based communication: Example: process A.. var a... a:=3; c!a; -- output end process A.. var a... a:=3; c!a; -- output end process B.. var b c?b; -- input end process B.. var b c?b; -- input end

- 8 - technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Synchronous message passing: ADA After Ada Lovelace (said to be the 1st female programmer). US Department of Defense (DoD) wanted to avoid multitude of programming languages Definition of requirements Selection of a language from a set of competing designs (selected design based on PASCAL) ADA95 is object-oriented extension of original ADA. Salient: task concept

- 9 - technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Synchronous message passing: Using of tasks in ADA

technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Synchronous message passing: ADA-rendez-vous task screen_out is entry call_ch(val:character; x, y: integer); entry call_int(z, x, y: integer); end screen_out; task body screen_out is... select accept call_ch... do.. end call_ch; or accept call_int... do.. end call_int; end select; Sending a message: begin screen_out.call_ch('Z',10,20); exception when tasking_error => (exception handling) end; Sending a message: begin screen_out.call_ch('Z',10,20); exception when tasking_error => (exception handling) end;

technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Java (1) Potential benefits: Clean and safe language Supports multi-threading (no OS required?) Platform independence (relevant for telecommunications) Problems: Size of Java run-time libraries? Memory requirements. Access to special hardware features Garbage collection time Non-deterministic dispatcher Performance problems Checking of real-time constraints

technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Overview over Java 2 Editions Based on products/cldc/wp/ KVMwp.pdf J2ME … addresses the large, rapidly growing consumer space, which covers a range of devices from tiny commodities, such as pagers, all the way up to the TV set-top box..

technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Software stack for J2ME Java Virtual Machine: implementation of a Java VM, customized for a particular devices host OS and supports a particular J2ME configuration. Configuration: defines the minimum set of Java VM features and Java class libraries available on a particular category of devices representing a particular horizontal market segment. In a way, a configuration defines the lowest common denominator of the Java platform features and libraries that the developers can assume to be available on all devices. Profile: defines the minimum set of Application Programming Interfaces (APIs) available on a particular family of devices representing a particular vertical market segment. Profiles are implemented upon a particular configuration. Applications are written for a particular profile and are thus portable to any device that supports that profile. A device can support multiple profiles. Based upon

technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 KVM and CLDC The K Virtual Machine: Highly portable Java VM designed for small memory, limited-resource, network-connected devices, e.g.: cell phones, pagers, & personal organizers. Devices typically contain 16- or 32-bit processors and a minimum total memory footprint of ~128 kilobytes. Connected, Limited Device Configuration (CLDC) Designed for devices with intermittent network connections, slow processors and limited memory – devices such as mobile phones, two way pagers and PDAs. These devices typically have either 16- or 32-bit CPUs, and a minimum of 128 KB to 512 KB of memory.

technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 CDC Configuration and MIDP Profiles CDC: Designed for devices that have more memory, faster processors, and greater network bandwidth, such as TV set- top boxes, residential gateways, in-vehicle telematics systems, and high-end PDAs. Includes a full-featured Java VM, & a larger subset of the J2SE platform. Most CDC- targeted devices have 32- bit CPUs & 2MB of memory. Mobile Information Device Profile (MIDP): Designed for mobile phones & entry-level PDAs. Offers core application functionality for mobile applications, including UI, network connectivity, local data storage, & application management. With CLDC, MIDP provides Java runtime environment leveraging capabilities of handheld devices & minimizing memory and power consumption.

technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Real-time features of Java [ J2ME, KVM, CLDC & MIDP not sufficient for real-time behavior. Real-time specification for Java (JSR-1) addresses 7 areas: 1.Thread Scheduling and Dispatching 2.Memory Management: 3.Synchronization and Resource Sharing 4.Asynchronous Event Handling 5.Asynchronous Transfer of Control 6.Asynchronous Thread Termination 7.Physical Memory Access Designed to be used with any edition of Java. [//

technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Example: different types of memory areas Area of memory may be used for the allocation of objects. There are four basic types of memory areas (partially excluded from garbage collection): 1.Scoped memory provides a mechanism for dealing with a class of objects that have a lifetime defined by syntactic scope. 2.Physical memory allows objects to be created within specific physical memory regions that have particular important characteristics, such as memory that has substantially faster access. 3.Immortal memory represents an area of memory containing objects that, once allocated, exist until the end of the application, i.e., the objects are immortal. 4.Heap memory represents an area of memory that is the heap. The RTSJ does not change the determinant of lifetime of objects on the heap. The lifetime is still determined by visibility. [

technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Other imperative languages Pearl: Designed in Germany for process control applications. Dating back to the 70s. Used to be popular in Europe. Pearl News still exists (in German, see Chill: Designed for telephone exchange stations. Based on PASCAL.

technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Communication/synchronization Communication libraries can add blocking or non-blocking communication to von-Neumann languages like C, C++, Java, … Examples will be presented in chapter 4

technische universität dortmund fakultät für informatik P.Marwedel, Informatik 12, 2010 Summary Imperative languages CSP ADA Java Other languages