1 / 5

Tutorial 1

Tutorial 1. Q1: Compare and contrast between multiprocessors and multicore. Multicore Dual-core processor has two cores (e.g. AMD Phenom II X2, Intel Core Duo),

neveah
Download Presentation

Tutorial 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tutorial 1

  2. Q1: Compare and contrast between multiprocessors and multicore • Multicore • Dual-core processor has two cores (e.g. AMD Phenom II X2, Intel Core Duo), • Quad-core processor contains four cores (e.g. AMD Phenom II X4, intel's quad-core processors, see i3, i5, and i7 at Intel Core), • Hexa-core processor contains six cores (e.g. AMD Phenom II X6, Intel Core i7 Extreme Edition 980X), • Octa-core processor contains eight cores (e.g. Intel Xeon E7-2820). wikipedia

  3. Q2 : List and discuss different compilers for Java programming language. • A Java compiler is a compiler for the Java programming language. The most common form of output from a Java compiler is Java class files containing platform-neutral Java bytecode. There exist also compilers emitting optimized native machine code for a particular hardware/operating system combination. • As of 2010, the following are major Java compilers: • Javac "java-see", included in JDK from Sun Microsystems, open-sourced since 13 November 2006. • GNU Compiler for Java, a part of the GNU Compiler Collection, which compiles C, Fortran, Pascal and other programming languages besides Java. It can also generate native codeusing the back-end of GCC. • ECJ, the Eclipse Compiler for Java, is an open source incremental compiler used by the Eclipse project. http://en.wikipedia.org/wiki/Java_compiler

  4. Exercise • Go to command prompt: • Open a notepad and write the following code. Save it as HelloWorld.java class HelloWorld { public static void main(String args[]) { System.out.println("Hello World!"); } }

  5. Exercise • Run Command Prompt (found under All Programs/Accessories in the Start menu).  • Type • C:\> cd \mywork • This makes C:\mywork the current directory. • C:\mywork> dir • This displays the directory contents.  • You should see HelloWorld.java among the files. • C:\mywork> set path=%path%;C:\Program Files\Java\jdk1.5.0_09\bin • This tells the system where to find JDK programs. • C:\mywork> javacHelloWorld.javaThis runs javac.exe, the compiler.  • You should see nothing but the next system prompt... • C:\mywork> dir • javac has created the HelloWorld.class file.  • You should see HelloWorld.java andHelloWorld.class among the files • .C:\mywork> java HelloWorld • This runs the Java interpreter.  • You should see the program output:Hello, World! • If the system cannot find javac, check the set path command.  • If javac runs but you get errors, check your Java text.  • If the program compiles but you get an exception, check the spelling and capitalization in the file name and the class name and the java HelloWorld command.  Java is case-sensitive!  http://www.skylit.com/javamethods/faqs/javaindos.html

More Related