80 likes | 203 Views
Setting Up Environment for Your UNIX Account in TAV. COMP5461 - Operating Systems Tutorial 1: Part 1.5. Why Java 1.2.2? (1).
E N D
Setting Up Environment for Your UNIX Account in TAV COMP5461 - Operating Systems Tutorial 1: Part 1.5 Serguei A. Mokhov, mokhov@cs.concordia.ca
Why Java 1.2.2? (1) • For the purpose of learning various concurrency problems for the time being we’re stuck with the above mentioned JDK version on Linux. JVM of that version was installed in such a way so it uses so-called “green” threads, and manages them itself using the Round Robin scheduling policy (there are many policies out there, you’ll get to know what most of them are later on in the course), so the behaviour of the threads can be considered deterministic. • NOTE: Java 1.2.2 is for Linux. For UNIX (ex. Solaris), Windows NT/2K/XP and Cygwin use 1.2.1. Serguei A. Mokhov, mokhov@cs.concordia.ca
Why Java 1.2.2? (2) • With later versions, especially 1.3.* and above, the JVM basically lets the OS schedule the threads, and whatever policy the OS employs and on how many CPU’s an application is run, makes it completely unpredictable. • NOTE: JVM of (virtually) any version, including 1.2.1 and 1.2.2 does not work well for us on Windows 9x/Me platforms! Work either remotely or install Cygwin (an UNIX emulation layer for Windows) and work under it. Serguei A. Mokhov, mokhov@cs.concordia.ca
Setting Up the Environment • You will have to use your Linux account on debian to do programming assignments (well, if you’re are reluctant to come to the lab, you can do your thing at home or any other place, but just either download and install JDK 1.2.1/2, or if you have a high speed Internet somewhere, you can always ssh to debian and do the thing remotely (look up PuTTY in Google if you plan to do it in Windows)). Serguei A. Mokhov, mokhov@cs.concordia.ca
Setting Up the Environment (2) • If you use your Linux account in labs... • Log in... • If you logged in Linux, ssh to debian first (you always have to do it before compiling and running java code for this course; otherwise, you’ll end up using whatever Java is there those Linux boxes) by typing in the following:ssh debian • On Windows use PuTTY. • Most likely it’s not configured to use Java 1.2.2, you’ll have to do some work to make happen. • How? Please go to the next slide ----> Serguei A. Mokhov, mokhov@cs.concordia.ca
Setting Up the Environment (3) • So... edit your .tcshrc file in your home directory (don’t worry, this is only a one-time procedure). • Use your favorite text editor and type:yourtexteditorhere ~/.tcshrc(What? Don’t have a favorite text editor yet? :-) Here are some suggestions to pick from: xemacs, emacs, vim, pico, ...) • Among the lines there should be something like this:set path=( /usr/bin /usr/sbin /bin ...)So, add at the beginning /local/pkg/java/root-jdk-1.2.2/bin: set path=( /local/pkg/java/root-jdk-1.2.2/bin /usr/bin /usr/sbin /bin ...)DO NOT REMOVE ANYTHING FROM THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING. • After saving the above, type in the following, so your changes take effect:source ~/.tcshrcrehash Serguei A. Mokhov, mokhov@cs.concordia.ca
Setting Up the Environment (4) • Check the Java version:java -versionIf you see smth like this you should be all set:java version "1.2.2“Classic VM (build JDK-1.2.2_013, green threads, nojit) • Come to labs to actually set this thing up and ask your lab instructor if you require some assistance. Serguei A. Mokhov, mokhov@cs.concordia.ca
References • www.cygwin.com • www.chiark.greenend.org.uk/~sgtatham/putty/download.html • man ssh Serguei A. Mokhov, mokhov@cs.concordia.ca