Introduction to algorithm-1 With the rapid change in ...

2 downloads 30556 Views 848KB Size Report
network connection i.e. Wi-Fi/3G and on the application itself. Applications for ... example procedure, Fig 2(b) shows the context insensitive call graph and.
Introduction to algorithm-1 With the rapid change in technology , the emergence of new class of cognition augmenting applications has drawn out the worth due to its situated focus on neuro-scientific tools that are used to bring the ‘in real time’ cognitive state of a component. Applications in the line of cognition augmentation such as face recognition, image processing and natural language processing are power intensive and require high computation power. Fortunately on the behalf of these mobile applications cloud is there to share the computation of an application while dealing the environment in such a way that is effective in cost and energy consumption. The sharing of computation of particular methods (of an app) on cloud/remote side results in less energy consumption, lesser computation and little storage maintenance at mobile/local side. In order to achieve this adaptive human-system interaction, algorithms are designed to mitigate the changes efficiently. In the same sense our focusing target is on partitioning algorithms. Partitioning algorithms are known for their best abstract forest structure i.e. combination of different levels of trees joined, each single tree represent a block of specified partition of data set. Particularly partition is applied on the set {0, 1, 2…n-1}. In order to do partition first of all we have to find the parent information of tree after then the information is displayed in a vector V form. In the scheme of partition algorithm there is a least partition and the greatest partition represented as and respectively [1]. Why partitioning algorithm Mobile cloud computing (MCC) strongly relies on an infrastructure of three basic building blocks; mobile computing, cloud computing and wireless networks [2]. These three components work together to bring rich user experience to mobile users. In order to reduce the computation at local level and to save the battery power there is a need of subdividing those methods that require more computation power and after then deal such type of methods on some sort of remote procedure. This enrichment strongly depends on the quality of network connection i.e. Wi-Fi/3G and on the application itself. Applications for smartphones such as face recognition, image processing, image mapping, video and image editing and natural language processing perceive the attention of mobile users day by day. But on the other hand these applications require a large amount of computation power and data to store, manage and retrieve that cannot be handled by a smartphone having limited capacity and processing power. So cloud storage is there to offload the heavy computation and storage media. Keeping in view that efficiency of cloud computing all depends on ubiquitous quality of Wi-Fi/3G connection. Particularly the point of focus is the allocating of methods/code-components of target application. This allocation is known as code partitioning problem referenced to portioning algorithms. Thus prior to running code of particular application on cloud environment, there is a need of taking decision about offloading of code-components with reference to current network quality and device capability as shown in Fig-1. How many methods/codecomponents will be shared on remote and how much will reside at local level is decided by Asmat Zahra (MSCS0101201414)

Page 1

implementing the partitioning algorithm. Thus, a good code-partition has a vital role in achieving the efficient performance. Cloud Agent

Mobile Agent

App ID, Device ID Code partition using App ID and Device ID

Partition Decision Input State Return State

Figure 1. MC process and role of code partition.

Code-partitioning algorithm Design Rational For having clear understanding of design principles of code-partitioning algorithm, a brief review of call graph model is given which in turns describe the calling relationship of an application.  Call graph model also known as call multi-graph is a directed graph that depicts the relationship between the program procedures [3]. Every vertex V is representing the method/procedure and each of the edge E is representing the calling relationship from caller to callee. Furthermore there are two types of call graph. One is the context-Insensitive and other is the context sensitive. In context-insensitive there is only one procedure for each call whereas in context sensitive there is a unique procedure for each call. Fig 2(a) shows the example procedure, Fig 2(b) shows the context insensitive call graph and context sensitive call graph is shown in Fig 2(c). main

main

A()

B()

C()

max Figure 2(a) Example Procedure.

Figure 3(b) Context insensitive call graph.

Asmat Zahra (MSCS0101201414)

main

𝑚𝑎𝑥0

main

main

𝑚𝑎𝑥1

Figure 2(c) Context sensitive call graph.

Page 2

Here in the case of code-partitioning algorithm we’ll be using the context sensitive call graph model to model the relationship of each method/procedure with the caller. The usage of sensitive call graph is to search the best offloading and integrating points via depth first search (DFS) after then linear time searching strategy is applied to find the best offloading and integrating points on the call link. Call link separates the remote-able methods only that results in reduction of search space leaving the overall time complexity of Θ (V+E) where V is representing the number of remote-able methods and E is representing the number of invoking relations in the application. For a given (sub) call link, every offloading points share the same optimal integrating point, and the performance improvement of offloading from method i is,

{∑(

1

{

)

1

}

1 1

(

1

1

1)

Where is the utility or performance improvements when offloading starts from method i to its corresponding best integrating point, and are the costs of executing method i on the mobile device and the cloud respectively, 1and 1 are the costs of transferring the input and return state for method i, and K is the number of methods on that (sub) call link. ∑ 1 is the total performance gain by offloading from method 1 to k. 1 are the transferring cost [4].

Figure 4- Linear Time Searching Algorithm.[4]

Asmat Zahra (MSCS0101201414)

Page 3

Algorithm given in Fig 4 gives us an overview of finding the best offloading and integrating points in linear time. and are the cost of executing method i on the smartphone and on the cloud respectively. and are the cost of transferring the input and return state for method i. The first for loop finds the best integrating point by traversing the (sub) call link. The second loop finds the best offloading point. Conclusion Code-partitioning algorithm offers a dynamic approach to offload the code from mobile/local to cloud/remote. In an ideal case of having access to quality connection either Wi-Fi or 3G the user experiences the best of efficient computation further results in saving of battery life.

Bibliography [1] Freese, R. (March 4, 1997). Partition Algorithm. Newyork: Online. [2] Hoang T. Dinh, C. L. (2011, October 11). A survey of mobile cloud computing: architecture,applications and approaches. pp. 1587-1611. [3] Grove, D., DeFouw, G., Dean, J., & Chambers, C. (n.d.). Call Graph Construction in Object-Oriented Languages. Box 352350, Seattle, Washington 98195-2350 USA: Department of Computer Science and Engineering, University of Washigton. [4] Zhang, Y., Liu, H., Jiao, L., & Fu, X. (n.d.). To offload or not to offload: an efficient code partition algorithm for mobile cloud computing. Germany: Institute of Computer Science,University of Göttingen.

Asmat Zahra (MSCS0101201414)

Page 4

Suggest Documents