• 沒有找到結果。

In order to build a consistent of the examination software environment, the following solutions have been evaluated:

1. Boot from the USB flash 2. Boot from the optical disc 3. Remote desktop connection 4. Virtual machine

Table 1 Comparison of The Varied Implementations

Implementations Advantages Disadvantages

Boot from the USB flash 1. Does not require pre-installed.

2. Based on hardware performance.

1. Slightly more difficult to create image.

2. High purchase cost.

3. Security issue.

Boot from the optical disc 1. Does not require pre-installed.

2. Based on hardware performance.

1. Slightly more difficult to create image.

2. High depletion rate.

3. Security issue.

Remote desktop connection 1. Does not require pre-installed.

1. Heavy load of the remote server.

2. Need a stable network connection quality.

3. High construction cost.

Virtual machine 1. Low cost

2. Stable operation

1. Required pre-installed.

2. Lower performance.

3.1 Decide To Use VirtualBox

After evaluations, we believe that the most feasible solution is using virtual machine. At first, we would like to try to use the VMware. Because in our experience, its performance is better than the products of other virtual machines. However, it is a commercial product, and cannot be distributed without agreement. So we finally decided to use VirtualBox which is open source software.

3.2 Decide To Use FreeBSD

And then I follow the recommendations and accordance with the directions on this

web page "http://pc2.ecs.baylor.edu/InstallDirections.html", to install ACM ICPC World Final Contest image in VirtualBox. Because this image is specifically designed for the ACM ICPC World Final Contest, many of the operating system management tools have been removed. It is very difficult to add or remove software to meet our

needs, so we began to imitate the contest image, to install a new operating system and the software needed by us in the virtual machine.

We have tried to install CentOS just like the contest image. Due to the complex dependency of Linux packages, we could not easily remove unnecessary packages. If

we re-built package from source code, it may reduce the complex dependency, but

much like using FreeBSD. Linux kernel supports more modern hardware devices;

however, at this time, we may not need these drivers if the faster boot time is seriously considered.

As a server operating system, FreeBSD is fairly famous. Few people would use

FreeBSD as a desktop environment. X window is not the default option during

FreeBSD installation, and to configure X window to run on FreeBSD may encounter a variety of difficult problems. I had experience of using X window on FreeBSD a few

months, So I knew that X window could be ran on FreeBSD efficiently and stably.

3.3 Reducing Size of Virtual Disks

Virtual disks are usually stored in the form of files. While creating a virtual disk, there are usually two options: "allocate all space at once" or "dynamically grow when need". In order to save network transmission time, we cannot allow the virtual disk to be allocated all space at once. However, the dynamic growth of the virtual disk has a

characteristic that is never be reduced after growth. If we would like to minimize the size of the virtual disks, we must not install unnecessary packages on FreeBSD.

However, this idea is impractical because there are always some of the packages used to

assist in the installation of other packages, but they are never needed at run time. So, installation of packages for programming proficiency examination is needed to split to two stages. At the first stage, we perform the normal installation of packages on FreeBSD and remove the unnecessary packages at the end of this stage. And then we

create several new virtual disks and copy files from the original virtual disks to these new virtual disks at the second stage. Such a complex procedure is to ensure that the virtual disks only grow to the appropriate size.

3.4 Restricting the Examinees’ Privileges to Use FreeBSD

As a desktop environment used for the examination, examinees do not need to have root privileges on FreeBSD. In order to exempt the invigilators' trouble, the system will automatically login as an ordinary user, and examinees will be blocked from trying to login as root. Restricted external network communication become essential to

examinations fairness. To conduct such examinations in the past, usually taken to unplug the external network wire or modify the firewall rules of network devices and

recover the network connection after the end of the examination, this practice may cause

trouble for administrators. So we have configured firewall rules on the virtual machine in advance, and the firewall rules can be modified by the management agent during the examination. The management agent will periodically access to our central control server via HTTP. Administrators usually do not block the HTTP connection, unless they

execute a proxy policy. Our server is accessed in passive mode to avoid Network Address Translation (NAT) issue.

3.5 Preventing Examinees from escaping from The Virtual Machine

Most of virtual machine products with graphical user interface can run in the full

screen mode. They can return to window mode by pressing specific key combinations.

But we do not permit examinees to manipulate the virtual machine to run in window mode, so we must disable these specific key combinations to make the virtual machine operate in kiosk mode. We must also disable the toolbar of virtual machine, but doing

so is not enough. Microsoft Windows itself has a key combination that will not be intercepted by any application, that is, "Ctrl-Alt-Delete". After pressing the key

combination, the task manager will be invoked. Users could terminate any process by

using the task manager if they have sufficient privileges. Users may use the task

manager to switch applications to foreground, so we have to make every effort to block invoking the task manager.

Although we have just prevented examinees from escaping from the virtual

machine, no one can guarantee that the examinees would obediently start the virtual machine and switch it to the full screen mode. So I wrote some programs to

automatically start the virtual machine and make it run in the full screen mode.

Therefore, examinees are enforced to stay inside the virtual machine.

3.6 Restoring a Clean Examination Environment Rapidly

In the beginning of every examination, we have to clean the user's home directory.

That is also one of the reasons why administrators of the computer classroom are unwilling to hold the examination. Administrators need to manually one by one clean

up, and nobody could substitute or help them due to privilege issues. Now, a clean home directory can be restored after the virtual machine boot. Our management agent

fetches the clean home directory which is compressed in the form of file from the

central control server. It could be done quickly because the size of the compressed file is quite small. And it does not ask administrators to do anything additionally.

We also provide a recovery mechanism. By simply click your mouse twice, and then the virtual machine will be repaired in few minutes, because we have locally

retained an original archive of the virtual machine. This mechanism is especially suitable used for the computer classroom without Reborn card or diskless system.

3.7 Provide A Variety Way Of Installations

We have defined a modular directory structure. The structure has been created at our FTP site. Administrators can download it to any disk device. And we export the

virtual machine in the form of open virtualization format archive with the file extension

"ova". Administrators can put an "ova" file into the corresponding directory in order to install our system.

We have proposed an approach for rapidly replication over the local area network.

It inherits the peer-to-peer concept but without tracking, and therefore is decentralized.

In order to ease administrators' overhead, we implemented this approach by writing

batch file and copying files via Common Internet File System (CIFS). This approach is

especially suitable for the computer classroom without Reborn card or diskless system.

3.8 Simplify The Setup Procedure By Single Installation Executable

It seems trivial to deploy the unified software environment to lots of computer by using virtual machine. But some administrators will resist doing this if the manual

procedure takes efforts in more than one minute. The normal installation of products of virtual machine has some unconfirmed options. And we also need to do additional settings to prevent cheating in the examination. These operations are definitely exceeding the administrators' tolerable limit. This is why the large-scale joint

examination of the use of computers has never been held in Taiwan. So a single highly integrated installation executable can ease the work of the system administrators.

3.9 Assign An Unique Identifier To Every Virtual Machine

To distinguish from these duplicated virtual machines, we make the management

agent to perform the registration on the central control server. The identifier of a virtual machine will be dynamically changed every time after it boots. We must not assign the static identifier to a virtual machine, because we distribute it from a single source to lots of destination. We also must not locally store the identifier assigned by the server,

because the previously registered virtual machine may be replicated by the various way.

The management agent has the ability to detect whether the examinee has logged in judge system. And then reports the unique identifier of the virtual machine used by the

examinee to the judge system.

3.10 Backup Examinees’ Source Code Automatically

Many programmers may have the same experience that sometimes the crashes happen in debugging their program. It is easy to forget to backup manually, so regularly automatic backup may be helpful, but the broken source code would be submitted through the regularly automatic backup mechanism. Many of software engineers are

accustomed to commit their code into the version control system. Most of version control system is not easy to use and the careless engineers may make the mistakes to

operate. Without any configuration, our backup mechanism would be performed at the

beginning of compiling source code. And it performs a differential backup because many programmers often just do a little modification of their source code while debugging.

3.11 Flexible Expansion Of The Central Control Architecture

Our central control server has a cluster of servers to support it. While the HTTP request is reached the central control server, it uses port forwarding to the rear cluster by using round robin in order to balance the loading. Each server in the cluster runs the two services: hypertext and databases. Since databases are distributed, it is easy to add the

additional servers into the cluster.

相關文件