Computer Labs 2013/2014 - 1st Semester
LCOM's Development Environment and Process (Part 1: Development Environment)


1. Introduction

In LCOM you will develop programs that interface with I/O devices at the hardware (HW) level. To facilitate this development we will use the Minix 3 operating system.

This note is the first part of a two part document on the development environment and process that you will use in LCOM. In this part we focus on the development environment to help you jump start.

2. Development Environment

In the lab, each PC has two Minix 3 installations:

Both of them have only a command line interface: although Minix 3 also has a graphical interface based on X11, at the time of writing only a few X11 applications have been ported to Minix 3, therefore we did not install the GUI.

Minix 3 supports the concept of virtual terminals (VT). I.e. it is possible to use Minix 3 as if it had more than one terminal. The first virtual terminal is known as the console and is used by Minix 3 to output debugging information. All terminals have their own shell, a command line interface, which can be used to issue commands to Minix 3. You can select the virtual terminal to use by typing Alt+F1, Alt+F2, Alt+F3 and so on. The default Minix 3 configuration, supports up to 4 virtual terminals.

You can take advantage of this feature, and use multiple VT simultaneously. You can be logged in in each VT using either identical accounts or different accounts.

Nevertheless, for the sake of convenience, we suggest that you use the installation on the virtual machine for development: you can use Eclipse's Remote System Explorer (RSE) plugin, running on Linux, to write code remotely, i.e. in the VM Player installation. This allows you not only to use a modern integrated development environment (IDE) but also not to lose your development session if you need to reboot Minix 3.

Furthermore, you can access a Minix 3, whether on disk or in the VM Player, via a "remote" access as described in the annex.

The disk partition installation will be used only to demonstrate some of your programs, after you have developed and tested them in the VM Player.

3. User Accounts

So that you can develop your code we have created the necessary accounts in both Linux and Minix 3.

3.1 Linux Account

The VMware Player with Minix 3 is installed in a Linux operating system. So that you can start that Minix 3 installation, you need to first log in Linux. For that, we have created the user account lcom whose password is lcom1234.

3.2 Minix 3 Accounts

Both Minix 3 installations have two accounts. A normal user account, lcom, and the system administration account, root. Both accounts have the same password: lcom.

As a rule, you should use the lcom account. The root account should be used if you cannot do what you need with the lcom account. Thus, source code writing and compilation should be done using the lcom account. In Lab 0, you can also run your programs using the lcom account. However, virtually all programs you will develop in other labs are privileged and you will have to run them using the root account.

Annex: "Remote" Access

To access the Minix 3 installation on the VMware Player you may find it convenient to use "remote" access. I.e. rather than using the terminals of the VMware Player, you may use a terminal on Linux and use the ssh utility to login on Minix 3 as follows:

$ ssh lcom@<ip_address>

where <ip_address> is the IP address of the VMware Player. To find out this IP address you can use the command ifconfig on a terminal of the VMware Player.

$ ifconfig

After loggin in, you can issue the Minix 3 commands from the Linux terminal, as if you were using the virtual terminals on VMware Player.

This approach has several advantages. First, you can use a much larger number of terminals than the 4 virtual terminals available via VMwarePlayer. Second, the use of these remote terminals is more convenient than that of local terminals: there is no need for special key combinations to get/release the focus and you can use standard copy/paste to copy commands from one Linux window to another window.

On the other hand, in order to see the output generated by the printf() statements of privileged processes you need to execute the following command on a remote terminal:

$ tail -f /var/log/messages