## 3 The Proposed Architecture
### Data Center
#### 3.1.3 Semi-Preemptive Mode Resource Allocation  
Before sending a request to Resource Broker, a user has to describe which type the request is. Note that a node's performance score is dynamic, e.g., an originally level-1 resource node may become level-2 or level-3 if its load is now heavy, AMS is not huge enough and CLWQ is long. Generally, there are at least two methods that can be employed to allocate different levels of resource nodes to different types of requests. (1) Level-_i_ resource nodes can only be allocated to serve type-_i_ requests. (2) Level-_i_ resource nodes can only be allocated to serve type-_j_ requests where \(i\) \(\leq\)_j_, e.g., level-1 resource nodes can serve type-1, type-2, and type-3 requests, and level-3 nodes can only be allocated to serve type-3 requests. However, with the first method, when many type-_i_ requests and few type-_j_ requests, \(i\) \(\
eq\)_j_, arrive, but currently no level-_i_ resource nodes are available, many type-_i_ requests have to wait in the type-_i_ global queue for a long time, leaving many level-_j_ resource nodes idle. When a few type-_i_ and many type-_j_ requests are submitted at the same time, \(i\) \(\leq\)_j_, the second method can solve the type-_j_'s long waiting-time problem since level-_i_ resource nodes can be allocated to serve the remaining type-_j_ requests. Nevertheless, the second method may introduce another problem, e.g., many type-1 requests are submitted, but currently insufficient level-1 resource nodes can serve them immediately. The reason is that many originally level-1 resource nodes are now serving type-2 and type-3 requests and become level-2 or level-3 resource nodes where originally level-_i_ resource nodes (o-level-_i_ resource nodes for short) are those nodes belonging to level-_i_ when they are idle, \(i\) = 1, 2. Hence, some of these type-1 requests have to wait for a long time in the type-1 global queue. One may always point out that preemptive allocation can solve this problem, _i.e._, an o-level-1 resource node, e.g., N, which is now serving a type-2 or type-3 request may be preempted so that it can recover to level-1 immediately. This is true. But this also means that the resources consumed to serve the preempted job are wasted. (1) Resource Allocation  
To solve these problems, in this study, we propose a semi-preemptive approach, which reserves R1% of o-level-1 (R2% of o-level-2) resource nodes to serve type-1 (type-2) requests. The purpose is to compensate for the above-mentioned cases. Let Ri be the reserved percentage of level-_i_ resources for type-_i_ request, \(i\) = 1, 2, then  
\[\text{Ri}{=}\frac{\text{AVG}_{\_\  
Percentages of o-level-_i_ resource nodes that can serve type-_j_ requests, \(1\leq i,j\leq 3\), are summarized in Table 7 in which the numbers in a row represent the order in which the resource nodes are allocated to the corresponding types of requests. When the percentage of o-level-1 resource nodes assigned to serve type-1 requests reaches R1%, and now new type-1 requests arrive, Resource Broker will allocate o-level-1 resource nodes belonging to the R1'% to serve them. If no more o-level-1 is now available, then o-level-2 resource nodes that belong to the R2'% will be allocated to the new type-1 requests. R2% of o-level-2 resource nodes are reserved to serve type-2 requests only. As the R2'% of resource nodes is also used up, level-3 resource nodes will be allocated to these type-1 requests. Similarly, when a type-2 request arrives, Resource Broker will first allocate o-level-2 resource nodes belonging to R2 % to serve the request. If no more o-level-2 resource nodes belonging to R2 % are available, those belonging to R2'% will be allocated. When no more o-level-2 resource nodes are available, level-3 resource nodes will be allocated. The fourth choice for a type-2 request is the R1'% of o-level-1 resource nodes. The chosen priorities of resource nodes for type-3 requests are level-3 (see type-3 row of Table 7), R2'% of o-level-2 and then R1'% of o-level-1 resource nodes.