The distributed process computation is performed by splitting up a larger task into smaller chunks of tasks that can be calculated simultaneously and independently. If the task cannot be separated in a required way to perform the calculations, then the distributed processing has no benefit, and serial processing is better suited for these types of tasks [114]. In distributed processing, granularity is a measure of the ratio of computation to communication time and the computation time. Table 3.3 shows task decomposition and granularity methods and their descriptions [108, 109, 115]. Table 3.4 shows task scheduling methods and their descriptions [116].
Table 3.3: Task decomposition and granularity methods
Attribute Description
Domain Decomposition
In this type of partitioning, the data associated with a problem is decomposed. Each parallel task then works on a portion of the data. This is also called data parallelism, in which each processor performs the same task on different data subsets.
Functional Decomposition
In this type of partitioning, each computation is different, and each task then performs a portion of the overall work. Functional decomposition is better suited to problems that can be split into different tasks.
Fine-Grain Processing
Relatively small amounts of computational works are performed between communication and synchronisation events.
Coarse-Grain Processing
Relatively large amounts of computational work are performed between communication and synchronisation events.
Task Scheduling Task scheduling mechanism assigns tasks to a calculation node according to different scheduling policies.
Context Switching The state of the execution context of a process or thread is stored and restored so that the execution can be resumed from the same point at a later time. This allows one CPU to handle many processes or threads without conflicts.
26
Table 3.4: Task scheduling methods and descriptions
Method Description
First In First Out (FIFO)
Schedules tasks based on FIFO method regardless of task size, and this is a basic type of scheduler implementation.
Shortest Job First General scheduling principle can be applied to any system in which the estimated calculation time per task is determined before assigning the tasks to the processing units.
Pro-rata Weighted average calculation times are used to allocate the number of tasks to each processing unit.
Pre-emptive Task can stop/start in the middle of execution to give priority to another task by using a context switch mechanism, that is, stopping the running process and starting/resuming another. Round Robin Instead of executing the tasks to completion, the tasks are
executed in a time-sliced manner.
3.9
Chapter Summary
The development of various types of distributed processing and parallel processing systems have produced several related theories and implementation methods in this field. However, some of the approaches were proposed specifically towards large- scale distributed processing systems and supercomputing-level systems. Hence, most of the specialised distributed processing concepts such as high-speed networks and message processing speeds are not applicable to the research conducted in this phase, which is of a highly specialised bespoke type distributed processing system that uses a small scale and loosely coupled cluster with multiple processing devices for private use for a company. Meanwhile, the fundamental principles of distributed and parallel processing remain the same; therefore, the system is designed based on original design and in conjunction with other known theories, methods and concepts that are particularly useful for bespoke-type highly specialised design. For loosely coupled distributed systems, each processing unit’s performance is a critical factor for the overall performance of the system.
27
4
Distributed Processing Cluster Design Using Network
of Workstations
4.1
Introduction
This chapter describes the implementation of distributed processing clusters using a network of workstations for MS-Excel applications used for calculating hedge funds’ portfolio risk scenarios. This is the first phase of the investigation that explained in section 1.4 in Chapter 1. The primary aim of the investigation is to examine whether it is possible to design, develop, and implement a cost-effective and high-performance distributed processing cluster system that uses Windows network topologies and existing networked workstations to perform time-critical and data-critical calculations. Most of the applications used in the company, specifically the derivative pricing models, are based on MS-Excel and VBA, VBScript, and SQL Server databases and are developed internally as bespoke systems. Since the distributed processing system has to be capable of working with existing systems, the methodology used for the design and development of the distributed processing system is similar to the systems currently used for their compatibility and ease of use. The distributed processing system has a number of different modules, and all the modules are designed and developed to work coherently with each other. Additionally, they are designed in coordination with existing systems with minimum complexity to reduce the failure rate and maximise the efficiency to ensure system robustness. The testing and simulations have shown considerable improvement in calculation times using distributed processing against using a single server as a serial process for certain batch processing calculations. However, due to the nonlinear nature of risk calculation mathematics, complex issues relating to the number of calculation nodes used and the reduction in calculation time. These complexities can be eliminated or reduced by introducing efficient task scheduling and resource management algorithms. Distributed processing system cluster design, database development, cluster controller design, calculation node’s controller designs, and test results are presented in this chapter. The task scheduling mechanisms and load balancing are discussed in detail in Chapter 5.
28