• Tidak ada hasil yang ditemukan

4. Migration of Processes and Virtual Machines

4.1 Process Migration

Migration of processes has been expected to increase the computer performance when the process requires more computing resources; migrating processes to the computers with more resources may improve computer performance. Various process migration mechanisms were introduced in Nuttall[38].

4.1.1 A Process and Its Resources

A process is an instance of a program, which could be either a user application or a system-related program, running on an OS environment. Numerous processes are running on top of an OS, and they share the resources provided by computer hardware and managed by the OS.

When a process is executed on an OS, a memory space for storing the process image is allocated. Then, the process runs on the computer, storing necessary data on the segments of main memory for handling the necessary instructions to a CPU. Many of the processes use numerous resources other than just the memory space. Some of the common resources include, for example, file descriptors for reading from and writing to files, and sockets for communicating other hosts on IP networks. Running programs de- pend on shareable libraries and other version-dependent features of the OS. They also depend on namespaces, including file systems and even process IDs. Some processes storing a great chunk of data may consume a noticeable number of memory pages.

4. Migration of Processes and Virtual Machines

Nowadays, a process has grown larger in its image size, and relationships between mul- tiple processes running on either a single or multiple computers have become common.

Thus, it can be said that the management of resources consumed by a process has become complex in modern OSes.

In addition to the visible resources, processes consume CPU time, which is one of the major resources on a computer system. Even though multiple processes seem to be running on a single computer, each core of a CPU can be utilized by only a single process at a time. The parallel execution of numerous processes have become possible with time sharing system (TSS), and the processes that are currently not being executed on the CPU are put into a “sleep” state. This scheduling is another important role of an OS, and being scheduled on the OS means the process will consume some CPU resources while it is running.

4.1.2 Ideas of Process Migration

The concept of process migration has been explored since the earlier years of com- puting age. Process migration is the movement of a running process from a computer to another, continuing execution of the process and sustaining resources utilized by it.

Process migration becomes useful when resources on a computer that the process is running have become short, or at a case where the process must be kept running while the computer being required to restart. If a process could be migrated from a computer to another, the running process could claim additional resources if necessary and if available.

4.1.3 openMosix: an Example of a Process Migration Facility

openMosix[39] is an example of process migration implementation. It had been developed on Linux kernel 2.4, but the project was discontinued on March 1, 2008.

Mosix[40] is still being developed as a commercial product, and it works on Linux kernel 2.6.

openMosix and Mosix use a patched Linux kernel to allow migration of processes.

Once a host is added to the cluster of computers, the resources available on those computers are treated as a single resource pool on the cluster. When a process requires more resources on the computers, the process is migrated automatically to one of the members of the cluster. The process may migrate back and forth, depending on the availability of resources.

Sometimes process migration facilities require the program to be modified to support the migration, such as management of file descriptors. However, openMosix and Mosix can run the programs without modifying them.

4. Migration of Processes and Virtual Machines

4.1.4 Issues of Process Migration

Process migration may be useful for purposes such as load balancing. On the other hand, there are difficulties for sustaining process states, differences of file descriptors on each hosts, and management of memory space becomes necessary.

The issues of process migration resides on the following elements. A computer that had process running will be called “source computer”, and the computer that the process will resume on after process migration will be called “destination computer”

in the list.

Both source and destination computers need to have a CPU with the same architecture. A process is built dependent to the CPU architecture of which the process was designed for. If the CPU architecture changes, the process cannot be continued after it is migrated.

Both source and destination computers need to have the same shared libraries. If a process migrates, there is no guarantee that the elements external to the process itself would be similar on the destination computer. If the process was running on the source computer referring to a shared library, the same version of the same shared library must exist on the destination computer.

File descriptors must be managed independent of the source computer.

The file descriptor is locally managed on the computer running the processes. If a process is migrated, the file descriptors may become different on the destination computer.

Other entities in the OS must reside as similar to the source computer.

For example, if a process was writing to and reading from a file, the file used by the process must reside on the destination computer. If the process was communicating with other processes running on the same computer, those other processes must also exist on the destination computer. If any of the entities in the OS change after the process migrated to the destination computer, it is likely that the process will face problem on the destination computer.

In addition, each process has its own state, and the state must be synchronized when the process migrates. Process migration is considered as finished when transfer of states completes from one node to another[41]. Several approaches were considered in the process migration, but most of the approaches are unused even after years of research.

Thus, migration of processes require numerous management of their resource utiliza- tion, and are considered to be obstacles for achieving the process migration to be used in the real world environment.

4. Migration of Processes and Virtual Machines