SlideServe
Menu
Préférences
© SlideServe · v2026

Multicore Programming

joey avatar
16 diapositives · 341 Views · Jul 26, 2014

Multicore Programming. Tutorial 1 CS 0368-3469 Spring 2010. Administrative. Staff Prof. Nir Shavit , shanir@post.tau.ac.il T.A. - Guy Korland, guykorland@post.tau.ac.il. Administrative. Info Web: http://www.cs.tau.ac.il/~multi/ RSS: http://www.cs.tau.ac.il/~multi/rss.php

Multicore Programming - slide 1
01 / 16Multicore Programming
1 / 17

Télécharger la présentation

Multicore Programming
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Multicore Programming Tutorial 1 CS 0368-3469Spring 2010

  2. Administrative Staff • Prof. Nir Shavit, shanir@post.tau.ac.il • T.A. - Guy Korland, guykorland@post.tau.ac.il

  3. Administrative Info • Web: http://www.cs.tau.ac.il/~multi/ • RSS: http://www.cs.tau.ac.il/~multi/rss.php • Forum– Will be published

  4. Administrative The Textbook The Art of Multiprocessor Programming, Herlihy and Shavit,

  5. Requirements • 6 assignments (20%) • 4% each (5 out of 6) • Final exam (80%)

  6. Assignments • http://www.cs.tau.ac.il/~multi/index.php?p=administ • http://www.cs.tau.ac.il/~multi/index.php?p=technical

  7. Java - links • Download JDK6.0: http://java.sun.com/javase/downloads/widget/jdk6.jsp • JDoc: http://java.sun.com/javase/6/docs/api/ • IDE: http://www.eclipse.org/downloads/ • ANT: http://ant.apache.org/bindownload.cgi

  8. Java Class Example package example; import java.awt.Point; public class Rectangle { privateint width = 0; privateint height = 0; private Point origin; public Rectangle() { origin = new Point(0, 0); } public Rectangle(int w, int h) { this(new Point(0, 0), w, h); } public Rectangle(Point p, int w, int h) { origin = p; width = w; height = h; } publicvoid setWidth(int width) { this.width = width; } } data members constructors a method

  9. Running Java Programs packagemp; // file mp/HelloWorld.java public classHelloWorld { public staticvoid main(String[] args) { System.out.println(“Hello World !”); } } > javac HelloWorld.java The compilation phase: This command will produce the java bytecode file HelloWord.class > java –cp . HelloWorld The execution phase (on the JVM): This command will produce the output “Hello World!”

  10. Java Threads • java.lang.Thread class MyThread extends Thread{ @Override publicvoid run(){ … } } publicstatic void main(String args[]){ MyThread thread = new MyThread(); thread.start(); try { thread.join(); } catch (InterruptedException e) { }; }

  11. Java concurrent • Concurrent: http://java.sun.com/j2se/6/docs/api/java/util/concurrent/package-tree.html • Locks: http://java.sun.com/j2se/6/docs/api/java/util/concurrent/locks/package-summary.html

  12. Java - Overview • final, static, private, … • Exception, try-catch & finally • Types - References and Primitives • Wrappers (int vs Integer) • Inheritance & Interfaces

  13. Ant - Overview <projectname="Ex0" default="run" basedir="."< <propertyname="src" location="src"/> <targetname="compile" depends="init"> <javacsrcdir="${src}" destdir="${build}"/> </target> …

  14. Ant – Overview cont. … <target name="run" depends="compile" description="run the program"> <java classname="mpp.Example" classpath="${build}" fork="true"/> </target> </project>