Configuring A Linux Environment - Installing Cygwin for 32-bit Windows 7

  1. Access to http://www.cygwin.com/install.html
  2. Download and run setup-x86.exe
  3. Select Root Intall Directory -> C:\cygwin
  4. Select Local Package Directory -> C:\Users\username\Downloads
  5. Select Internet Connection -> Direct Connection
  6. Choose A Download Site -> choose a mirror site closer(.ac.jp)
  7. Select Packages
$ whereis gcc
gcc: /usr/bin/gcc.exe /usr/lib/gcc /usr/share/man/man1/gcc.1.gz /usr/src/gcc-4.9.2-1.src/gcc.cygport
$ whereis bison
bison: /usr/src/bison-3.0.2-1.src/bison.cygport
$ whereis flex
flex: /usr/src/flex-2.5.39-1/flex.mknetrel /usr/src/flex-2.5.39-1/flex.skl
$ whereis make
make: /usr/src/make-4.0-2/make.1 /usr/src/make-4.0-2/make.lnk /usr/src/make-4.0-2/make.mknetrel

Week1 Discussion

Languages can be fully compiled, fully interpreted or partially compiled and then interpreted. Choose a language from the list of the top 20 currently most popular languages at http://www.tiobe.com/tpci.htm. Choose one that has not already been chosen by one of your classmates. Discuss which of the three translations mechanisms is used with that language. Offer some rationale for why that mechanism was chosen.

I chose Java. When you run a Java program, your source code is partially compiled by the Java compiler and then interpreted by Java Virtual Machine (JVM). The JVM allows you to develop programs without dependence on operating systems.

A major function of JVM is supporting garbage collection, which automatically frees dynamically allocated memory on the heap. When you create a instance of an object by using new operator, memory is automatically allocated on the heap. Therefore, you don't have to care about memory allocation and deallocation unlike C.

What is the difference between the original JVMs and the newer JIT compilers?

Professor,

The original JVM was designed as an interpreter called the Java interpreter for the Java bytecode. The bytecode is an abstract machine language for the JVMs. It is analyzed, and then executed by byte by the interpreter. On the other hand, JIT compilers load the bytecode into memory and compile it to the native code by method before execution. Although a JIT compiler uses more memory because it stores the compiled native code in memory temporarily, it will enhance execution speed of the application.

Using Java HotSpot VM is a hybrid approach between the interpreter and JIT compilers. It compiles only repetitive methods to the native code.


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS