A Cost and Energy Efficient Task Scheduling Technique to Offload Microservices based Applications in Mobile Cloud Computing

The number of smartphone users and mobile devices has been increased significantly. The Mobile Cloud Applications based on cloud computing have also been increased. The mobile apps can be used in Augmented Reality, E-Transportation, 2D/3-D Games, E-Healthcare, and Education. The modern cloud-based frameworks provide such services on Virtual Machines. The existing frameworks worked well, but these suffered the problems such as overhead, resource utilization, lengthy boot-time, and cost of running Mobile Applications. This study addresses these problems by proposing a Dynamic Decision-Based Task Scheduling Technique for Microservice-based Mobile Cloud Computing Applications (MSCMCC). The MSCMCC runs delay-sensitive applications and mobility with less cost than existing approaches. The study focused on Task Scheduling problems on heterogeneous Mobile Cloud servers. We further propose Task Scheduling and Microservices based Computational Offloading (TSMCO) framework to solve the Task Scheduling in steps, such as Resource Matching, Task Sequencing, and Task Scheduling. Furthermore, the experimental results elaborate that the proposed MSCMCC and TSMCO enhance the Mobile Server Utilization. The proposed system effectively minimizes the cost of healthcare applications by 25%, augmented reality by 23%, E-Transport tasks by 21%, and 3-D games task by 19%, the average boot-time of microservices applications by 17%, resource utilization by 36%, and tasks arrival time by 16%.

offered by these applications are very lightweight and oblige very tinny local services to execute them to process them correctly. The minimum delay is observed when these tinny services are offered. On the other hand, the current oppressed heavyweight VMs provides high-level assistance for usercentric machines applications. As these services are paid according to their use model, mobility, cost, and interactivity are the main challenges to the existing MCC paradigm. Another challenge for the MCC paradigm for microservicesbased applications is cost-efficient resource scheduling for Mobile processes/tasks [12]. Task Scheduling is one of the most concerning topics in mobile cloud computing due to the limited capabilities of mobile devices, storage restrictions, Task processing capabilities, and network bandwidth requirements. On the other hand, cloud-based Mobile Cloud Computing has huge processing capabilities, unlimited bandwidth, and no storage restriction, making us use task scheduling for mobilebased microservices applications. This paper encounters the cost-efficient task scheduling problem in MCC for IoT applications. We consider the MCCbased cloud network. The goal of the research is to curtail the cost of the services of mobile applications. We selected the computation and communication cost overhead involved in the persistent problem of task scheduling and task offloading. In Mobile applications, we have independent and fine-grained sub-tasks. Fine-grained means that every task has its attributes and data, which runs independently and effectively utilizes the workload. The associated vector attributes include every task, CPU instructions, data size, and execution deadline. We have considered the MCC services based on their price and speed. The main contribution of the proposed system is to save time and computational energy using the mobile cloud computing approach as follows.
(i). We proposed a novel microservices container-based MCC system (MSCMCC) to implement the docker container to improve the VM's workload and enhance performance. MCSMCC gains are less overhead for services and lower boot time for VMs. (ii).
We consider MCC servers with attributes, and we also considered different Quality of Service (QoS) requirements for every task individually. We selected the MCC servers with VMs to meet the services demand. Based on the services and tasks, a service matching algorithm is proposed to compare and execute the instructions based on services requirements. (iii).
FCFC and SJF effectively sequence the task generated randomly to reduce slack time and task size. (iv).
We set up the fine-grained tasks from the local mobile device towards MCC VM to schedule the tasks. We proposed a microservices-based cost-efficient task scheduler for task scheduling to handle this problem. The proposed algorithm reduces mobile tasks' overhead cost to MCC servers.
(v). The tasks requiring special consideration during offloading are at the highest priority consideration, and sequencing is performed based on the highest priority order, a novel contribution. The rest of the paper is organized as follows. Section 2 presents the related work on task scheduling and fault tolerance. Then, in Section 3, we outline our approach for the research and proposed solutions to the relevant problems encountered in Section 1 of the paper. Then, in Section 4, we present the proposed method with simulations using an MCSMCC approach. Section 5 concludes our proposed system, highlighting that our technique is straightforward for fault tolerance methodology.

II. LITERATURE REVIEW
With the increase of Mobile Devices and Mobile Applications, the computational offloading of mobile applications has increased and gained popularity among mobile cloud users. It allows the computationally intensive mobile devices to offload their tasks towards the cloud for mobile cloud server execution. The offloading of the tasks is performed after executing trustable tasks from the task schedular. These tasks offloading is improved but with limited knowledge about task microservices. [13]. The battery and mobile device performance could be improved by offloading mobile tasks. Efforts are made to perform the intensive application tasks to offload through mobile cloud support. Past studies made efforts to improve mobile application performance and save computational cost and mobile device processing power. Energy consumptions and executions time is considered in this approach for task scheduling in the provided environment [14]. In [15], the authors propose a microservices-based task offloading framework called the CEMOTS framework. The proposed technique is a mobility-aware task offloading framework that minimizes the cost of application transferring towards the cloud environment. The authors effectively reduce the application cost but do not work on VM fault rate, CPU, and resource utilization. In paper [16], the author proposed container-based and latency and aware reliability scheduling (LRLBAS) algorithms. Particle Swarm Optimization algorithm is used to balance the load on edge servers and provide an effective methodology for task offloading. Another approach called MAUI performs computational offloading strategies using profiling technologies. The main difference is to take the excellent decision to offload the task either locally run or on the mobile cloud server. The approach's primary purpose is to offload the task at its run time [17]. To the best of our knowledge, the microservices-based MCC framework for delay-sensitive fined-grained work is not proposed yet. We proposed an MCSMCC mobile cloud computing framework that executes the tasks with minimum cost and energy. Additionally, we proposed a cost-aware (CCCOF) framework to optimize the cost-centric and computational offloading framework. CCCOF provides the computational offloading with QoS, executes the services under specified deadlines, and minimizes resources costs. In [18], the authors presented another approach called ThinkAir. ThinkAir Author Name: Preparation of Papers for IEEE Access (February 2017) VOLUME XX, 2017 1 is the computational offloading framework to offload the mobile device tasks towards the mobile cloud. The idea is simple to offload the tasks when using mobile virtualization technology. Moreover, some meta-heuristic algorithmic approaches are also produced to address the task scheduling problems [19,20]. Due to cloud network latencies, the resolution of computation offloading frameworks is not a sustainable solution. So, the cloudlet-based computational offloading resources for the wireless-based latency access network are more problemoriented. Cloudlet frameworks brought proximity to mobile devices. In [21], Satyanarayanan et al. proposed a virtual machine-based Cloudlet framework. Cloudlets provide elasticity, scalability, and mobility. Cloudlets are very near to mobile phones like single hope towards the cell phones.
Another researcher presented Rattrap [22] proposed an Android Cloud-based system to offload the mobile device's computational tasks to the mobile cloud by placing VMs with containers. The research aims to reduce the boot time of monolithic services for the cloud platforms using a mobile cloud-centric environment. Although the approach reduces the boot time of the services effectively, all the techniques mentioned earlier do not meet the mobile device's fine-grained requirements for resource-intensive applications. Some research contributions contribute to and enhance the cost efficiency of mobile application services. In [23], the authors use heterogeneous mobile cloudlet services to improve costefficiency. The Authors consider this framework's computation time, communication time, and deadline cost. In [24][25][26], investigate, cost-efficient, and energy-efficient task offloading in mobile cloud computing is effectively probed. The focus of the research is to save the battery life of mobile devices by offloading tasks to the mobile cloud. The authors consider resources as storage. The presented computing model effectively presents the mobile cloud-based computational offloading framework for task scheduling. The [14,27,28] investigate the resource consumption model for mobile device applications in mobile cloud computing. Cost pricing models are addressed in these studies to provide effective collaboration for resource consumption. For example, spot instance, ondemand, and on-reserved systems are produced. The achievement of these studies is to reduce resource renting costs and execute mobile services under their deadlines. Furthermore, the authors in [29][30][31] investigate the cost efficiency and cost-effective real-time analysis to overcome the application running cost during task scheduling. These studies aim to enhance the performance of mobile cloud applications and provide effective workflow categories to execute the tasks efficiently. Moreover, data transfer time and execution time are enhanced. Additionally, the studies considered the computational cost and communication cost of mobile device services during task scheduling in MCC [32]. In [33], the authors use mobile edge computing to minimize service latency, revenue optimization, and high quality of services. The authors share maximum revenue and services utilization features. The authors improve the utilization, service latency, revenue, and utility value but do not consider cost management, resource matching, task deadline handling, server utilization ratio, and microservices boot time. Authors in [34] design a microservice scheduling framework. The framework implements mathematics to improve the satisfaction level, network delay, energy consumption, average price, failure rate, and network throughput for the proposed technique. Still, it does not work on services delivery latency, cost management of microservices, resource matching, task failure ratio, servicer utilization, task sequencing. Another technique presented in [35] is the author's auction mechanism to model to interact between Mobile Edge Computing system. The performance is measured for each offloading task by the management of these tasks for justified methodology.
Most of the algorithms are proposed in this related work section. The problem we identify to address in our proposed methodology is the migration of microservices based on heavy content-sensitive applications. We address those multiple techniques are proposed in this regard to address the mentioned problem but do not address the computational cost capabilities according to the requirements and demands of the future needs.
In the next section, we address the standard methods used to address the problem and detail about problem description. As microservices-based tasks are growing on mobile devices, the tasks are very resource-intensive in the modern environment. So we only need to perform the desired operation of tasks rather than whole tasks. The main reason for the microservices-based task offloading is VM-based resources and cost-effectiveness. Existing studies focus on task scheduling for microservices only on collective tasks with individual services. Still, we take both cost-effectiveness and resource handling for every individual microservices. The tasks are offloaded towards the MCC VM in this approach. The Dynamic Decision-Based Task Scheduling Approach for Microservice-based Mobile Cloud Computing Applications framework has not been suggested to the best of our knowledge. This research proposes the MSCMCC framework for mobile devices' microservices-based tasks execution with very low cost. Furthermore, through the MSCMCC framework, we ensure the Quality of Service (QoS) for microservices-based mobile device applications over mobile cloud computing. MSCMCC framework enhances application efficiency and provides the effective resource constraints framework to enhance application-based efficiency, execute tasks under deadline, and minimize application cost.

A. Problem Description
We study task offloading in mobile cloud computing [46], but task scheduling is an issue when mobile applications are designed through microservices containers architecture. Most of the current techniques focused on computational offloading frameworks to minimize the services delay, time, and cost. None of the existing techniques considers the microservicesbased inter-dependent tasks and minimizes the existing cost of resource distribution, server utilization, deadline of tasks, boot time, cost management, latency, resource matching, and fault tolerance in the proposed approach. We have considered communication, offloading cost, and processing power during scheduling and offloading in CCCOF. The paper aims to reduce the computation and communication cost with processing power at MCC and Mobile Devices. In the next section of the paper, we explain the detail of the proposed architecture.

III. PROPOSED MICROSERVICES BASED MCC ARCHITECTURE
The MCC Server Engine communicates with microservices through REST-API services. DB/Libraries are connected with the MCC servers to load any data and functions required to fulfill the Microservices offloading. All tasks are running independently and do contain their data and processes. Based on the characteristics of these tasks, every task contains a deadline for execution, data size, and CPU time to execute before scheduling from MCC. A random method loads these tasks onto the task scheduling and communication mechanism. Randomly these tasks are loaded onto the MCC system as these tasks before scheduling are not preempted on MCC.

A. Tasks Mobility
We attached the MCC cloud servers at the end of the MCC network. In CCA, we introduced a Mobility Module that allows the MCC network to select the mobile users or subscribers for data packets delivery. Location Management is one of the packets delivery ratios schemes. CCA also maintains the connection of all mobile subscribers, which contains the attachment points for the final task scheduling. Handoff Management is one of the main points which decides the scenario for handoff management. The Task Mobility Section handles the glitches and functionalities of location and handoff management problems. In MCC, the Mobile Devices change their position using Mobility options, which trigger their connection from one access point to another. This process is Handoff Management. In MCC Mobile Devices connections, we divide the handoff management into three main stages.

B. Microservices Based MCC Servers Characterization of Resources
In the MCC paradigm, Mobile Cloud Layer containers are the trivial methodology. This newly thriving application methodology is especially to run the Mobile Applications in the MCC network. Classically, the administration of group containers grows in different ways, and crucial growth is observed. The deployment of the microservices containers through the MCC server layer is the fundamental problem.
Microservices are tiny self-governing services inside mobile applications that communicate with external resources through well-defined APIs. Self-established teams own these microservices in MSCMCC. We consider the heterogeneous mobile cloud servers with VMs with every heterogeneous server to exploit these VMs. The MCC server engine is deployed, quickly adding or removing the microservices. We have a heterogeneous MCC server containing devices and processors in the Mobile Cloud Layer. Every processor and device contains computational capabilities, bandwidth, runtime, costs, and VMs (container microservices).

C. RUNTIME Microservices in MSCMCC
In microservices, the protocols are lightweight, and every service is fine-grained. In MSCMCC, every MCC server consisted of a single VM. On the other hand, every VM can support many of the microservices at a single time. Every MCC Server VM runs a single microservice according to the microservices architecture. CCA works with cost-efficient microservices with requested computational tasks to deliver efficient results. Inside CCA, every microservice (any computational task) holds libraries and resources associated with every task. Mobile Application tasks are handled through fine-grained microservices architectures during the task offloading in MSCMCC.

D. Problem Formulation
Initially, we set the delay-sensitive tasks T = { 1 , 2 , ……, } to be offloaded to the MCC server. These tasks are scheduled through the MCC server. As we handled the microservices, so each task consisted of attributes. Attributes associated with tasks are = { , , , }.
denotes the task workload, shows the data of task during the transmission from the mobile device to MCC server VM, illustrate the task deadline, and Shows the task storage requirements. Based on the MCC cloud configuration, we assume that we have N number of MCC servers, i.e., = { 1 , 2 …..., }. Every MCC server has the following attributes i.e. = { , , , }, where is the bandwidth between the MCC Centric Agent and MCC server during the task offloading, demonstrates the computing rates of ℎ MCC server, Demonstrates the total storage of the MCC server j in the method.
Demonstrates the deployed VMs for microservices through MCC server j with the same capability to handle tasks. Each It comprises multiple containers to execute the microservices to execute multiple tasks. Each microservice has its database and libraries to be executed during the execution. When a task is scheduled at MCC server j, we illustrate that does the task demand the total bandwidth . The resources such as Storage, RAM, Bandwidth, etc., is the offloaded task towards MCC server cost, i.e., j, and state of the task is = 1 are denoted by . Due to limited page space, this paper shows the limited explanation of the notation, and the remaining notations are illustrated in Table 2. Equation 1 illustrates that through binary variable either the task scheduling through MCC server Or not. can be either zero or one for tasks scheduling overall tasks from all applications. The decision about tasks is made through the proposed servers. ℎ fog server cost in the method Moreover, each task in this problem context is assigned to one . On the other hand, the MCC server schedules one task simultaneously. Equation 2 shows the task assignment to MCC server . The one indicates the ready tasks assigned to the MCC server for processing on its VMs. The value 1 indicates the positive task assignment to the appropriate server VM from 1 to N tasks.
Every MCC server has limited capability regarding resources. Therefore, the task offloading requirements do not exceed the MCC server capabilities. Equation 3 represents the scenario to check the task offloading capabilities about tasks scheduling. . Task offloading capabilities are checked for , against to check that no tasks processing requirements exceed the MCC server.
The MCC resource server has the capabilities of limited resources. It also has limited VM to offer its services to execute the microservice for each task coordination. So, equation 4 represents fewer computational tasks assignment decision making. Every requested task (microservices tasks) must consume less computational than VM computational capabilities.
Every task is scheduled on an optimal MCC server . Cloud Computing Agent decides where to schedule the designated task Towards the MCC server VM. The task execution on the MCC server is illustrated through equation 5. It illustrates that task with resources, storage, and time responsible for selecting the appropriate server to follow for final decision.
Therefore, after the decision of the Cloud Computing Agent when a task It is scheduled towards the MCC server for computation; the task gains extra computational offloading possibilities and sends the results back towards the Mobile Device from the MCC server. The computational work is illustrated through equation 6.
Author Name: Preparation of Papers for IEEE Access (February 2017) VOLUME XX, 2017 1 In equation 6 the − illustrate the task input data size and − shows the task the output data size after being processed by the MCC server . and Shows bandwidth of uplink and downlink of link rates from Mobile device offloading to MCC server and gets results back to the mobile device after computation. is the Round-Trip Time, i.e., the time between data sending and receiving from Mobile Device to MCC server For all tasks (microservices). Now we measured the bandwidth required for the measurement of each task. Equation 7 illustrate the bandwidth requirements for every task for . The bandwidth requirements are checked against each task to best fit MCC server VM processing capabilities and data communication with tasks. ( The above equation 7 defines the bandwidth requirements, but as every task is different, the bandwidth differs. We obtained inequality bandwidth of task is illustrated in equation 8. The bandwidth is checked against the Time, Data, The computational speed of individual VM under the MCC server . The inequality bandwidth is measured through equation 8.
To achieve the performance of the proposed system, we make sure that all the tasks Originated from Mobile Devices should be finished before their respective deadlines. This process minimizes the MCC Server Cost. The required communication bandwidth between the MCC server and Mobile application is calculated in equation 9. After inequality bandwidth of task .The communication bandwidth is computed to check the actual and expected communication bandwidth required for the task to offload.
Besides the individual task bandwidth, every MCC server has limited bandwidth with limited VMs. The allocation of the tasks to the MCC server it should contain less bandwidth consumed as compared to the server itself. Equation 10 illustrates total bandwidth of the tasks should be less than or equal to the bandwidth required to MCC for tasks. shows the bandwidth required to execute the tasks for proper ordering.

F. Proposed Algorithm Framework for system
Task Scheduling and Microservices based Computational Offloading (TSMCO) framework comprises several components. Figure 2 shows the TSMCO framework components. The first module of the framework is the resource matching from incoming tasks from mobile devices and then matching for MCC servers for their pair-wise processing. Task Sequencing is one of the most critical components of the TSMCO framework. It uses sorting algorithms to sort the tasks into different to perform cost-effective scheduling. Task sequencing provides input to the tasks scheduled. The task sequence to be scheduled on the MCC server if = 1, or else = 0. The task sequences process continues until all the tasks are scheduled and processed according to their deadlines using MSCMCC. All the mobile tasks are passed and processed from multiple components and complete their executions. We have heterogeneous MCC servers deployed to process the scheduled tasks on each VM. We define Algorithm 1 to best schedule for tasks. Task Scheduling Mobile Cloud Computing Optimization (TSMCO) algorithm is declared for task scheduling on MCC servers. This algorithm takes G, T, and j/M as input, and output returns resource constraints for every MCC server. Initially, the decision schemes are called with server state , cost , and Services . In steps 2 and 3, tasks scheduling and sequencing are performed using said parameters, i.e., G, T, M. The array of tasks from mobile nodes is defined on the empty step. Initially, it was set to NULL with no entries. All the processes continue for M, G, and T on steps 5, 6, and 7. Steps 8 and 9 define to check for time. If defined, then time for CPU, data, execution of tasks, and limit for tasks execution is declared. This checks resources also to be identified for provided time. Next, on steps 10 and 11, the tasks list is checked. If not empty, then sequencing of ready tasks is performed for M, T, and G parameters.
Step 12 shows an array of tasks ready for offloading decision. Then, on steps 13 to 15, the resource cost is computed for every task found in the array of ready tasks and returned to the system for further actions.

G. MCC Server Resource Attaining
We deal with the cost optimization problem [47] and heterogeneous MCC servers. The most effective and interesting is selecting the best edge MCC server to process all the extended sequential tasks. The object of our task scheduling for microservices applications is to reduce MCC's processing and computation costs. The MCC server selection with minimum cost Is one of the challenging ways. Equation 26  After successful processing from the servers, the remaining resourcing is not needed to waste. ̅̅̅̅ are considered as remaining resources on the MCC server After initial level task scheduling. There is a task that maximizes the products and their primary operations, so we denoted it dot product . The determined values of is computed through equations 28, 29, 30, and 31. These equations show complete declarations for the proposed system. = ̅̅̅̅ * ̅̅̅̅̅ … … … … … … … … . . . . . . … (28) = * * + * + * * … (29) = ( * * * , * ) … … … … … … … (30) = − ∑ * … … … … … … … … … (31) * illustrate the tasks resource management to schedule on the MCC server . There are different types and resources on the MCC server system. Resource matching is used to allocate the optimal and best available resource for each task in the MCC server in heterogeneous nature. The tasks contain vector attributes such as task deadline, data size, and workload. On the other hand, the resources contain vector attributes such as bandwidth, cost, VM capacity, storage. Resource matching is one of the problems that must be addressed. We select Technique for Order of Preference by Similarity to Ideal Solution (TOSS) model and Analytic hierarchy processing (AHP) model as resource matching algorithms. Algorithm 2 is designed for MCC server resources matching. It takes resources and tasks (in sequential order) as input. The output of the algorithm is the [] frequent list array.
[] after fulfillment of the requirements of the task linked with resources, store these on the MCC server . The detailed explanation of algorithm 2 is as follows.
• The algorithm input is Tasks, Resources, Task deadline, Task computation workload or data associated with tasks, and Tasks processing lists. • The output is the array of a Frequent list of tasks.
• In steps 1 to 3, the algorithm continuously runs for all Resources and time for every task.
• Step 4 define that if the resource at time matches with server requirements, then execute Ideal Solution (TOSS) model and Analytic hierarchy processing (AHP) model as resource matching algorithms to match the resources on step 5 and 6. • Every matched task's resource and time is added to PLIST on step 7. • If not added to the PLIST array, perform steps 4 to 7 again for the new task. • After executing tasks and resources matching, the servers are stored in PLIST and returned to the system in steps 10 and 11. • Looping is ended, and the algorithm is also ended on steps 12 13. In algorithm 2, step 4 verified the needs of the MCC server for all incoming tasks f the resources are matched according to the MCC server, and the algorithm returns true otherwise return false. After the return of true results, we add the matching list into Frequent List [ , ].
Step 4 repeats all the possible tasks coming from mobile devices to match the heterogeneous MCC server requirements.

H. MCC server Task Sequencing
All tasks arrived randomly because mobile devices originated from different devices. The arrival rate of the tasks is followed through Poisson Process. The task sequences do not follow any rule to allow the task to allocate exclusive of any sequence randomly. All the arrived tasks must be sequenced first to be distinguished from non-sequenced and sequenced tasks. The sequenced must be in proper format and provided in proper sequential order. The company task sequenced method has consisted of four rule-based. The method is deployed in the current system. We take task size, deadline, and slack time as three parameters to sequence the tasks. Four rules are developed and deployed to sort all incoming un-ordered tasks. The rules are as under: -1. First Come First Served (FCFS): We sort the task according to their arrival time. All the tasks sort are sorted according to the size of the task. Shorter size tasks are arranged first, and lengthy size tasks are arranged later. The SSF follows the strategy of preemptive task scheduling for sequences of the tasks, which is very helpful for the efficient and reliable provision of the data.
All the offloaded tasks from mobile devices randomly arrived at MCC. Initially, FCFS arranged all these tasks in a first-come, first-severed sequence. FCFS executes the order sequences rules to arrange the tasks in a particular order in a cost-efficient method. Figure 3 exploits all task sequences techniques from task offloading to task sequencing. Every task sequence method, i.e., FCFS, SJF, and SSF, has different scheduling and sequences results. However, we will select one with the best results according to the objectives of the problem for optimal task sequencing.

I. Task Scheduling
Till now, we have done the resource matching and tasks sequencing. After that, we should get the tasks scheduling methodology adopted to sort the problem. However, the initial implementation of the tasks scheduling is not just the outcome of the task scheduling policies implemented in the paper. The cost can be calculated in some different ways. Due to concurrent changes in the MCC cloud network, the initial selection is not suitable for task scheduling to calculate the Mobile application cost. Another reason not to select the initial as final is instability in the MCC resources. A new, improved solution is required to improve task scheduling. For example, we take tasks, i.e., 1, 2 to execute on heterogeneous MCC server with VM i.e. 1 20) respectively. Initially, the task 1 is scheduled on the MCC server 1 , and task 2 is scheduled on the MCC server 2 . The total cost of the application is the total aggregate of the two MCC server costs. Equation 33 depicts the total cost of the application. The equation effectively shows the reduced cost required for the application to offload the task.
If all the tasks are scheduled on the MCC server 2 then the total cost of application is solely the cost of the MCC server 2 .
Although the tasks are executed on the same server, this reduces applications computational costs. Figure 4 shows more than one solution for single task sequencing. We are also ready to accept the worst solution to be adopted by the processes. The challenge for the schedular is to pick one of the best solutions. The schedular should pick one solution which reduces the system's total internal cost. In the example mentioned above, the MCC server picked by the Schedular has resources according to the cost mentioned in the resource list. So, additional optimization is required to achieve high-cost reduction. At the start, the MCC Server had a high cost of available resources. The challenging thing for us is how to reduce the resource utilization cost and utilize the maximum resources. So, we introduce the improved Task Scheduling methodology that significantly improves the resource utilization of MCC servers. The main goal of the scheduling is to schedule the tasks to MCC servers with the lowest cost at this initial scheduling phase. This is one only way through which the Task Scheduling Algorithm improves the performance of the MCC server. The scheduler removed the extra and most expensive cost at this initial collaboration stage. However, we propose task scheduling algorithms that enhance the scheduling performance and solve the resource optimization problem on MCC Server. Algorithm 3 defines the task scheduling on the MCC server with optimized resource utilization. The algorithm takes input tasks set to be scheduled on a heterogeneous MCC server. Algorithm 3 is executed in the below-mentioned task as: • Variables are declared online 1-6. All MCC servers are sorted in descending order according to and (from Equations 27 and 29).
• All applications are loaded onto the MCC server and their resource and task requirements on lines 7 to 10. • From the set of T tasks, there are some unpublished tasks G, to select the smallest MCC server . The unscheduled tasks are executed on the MCC server according to their resource requirements and the MCC server's available resource requirements. Then we select the smallest unit cost server in the available MCC servers set. If from available fog servers, the scheduled cost of the servers satisfies the resource requirement demand, then the most substantial task to schedule on the MCC server . Otherwise, if the server does not satisfy the requirements demand, the server is picked to satisfy the requirement. Line 11-20 execute these steps.
Author Name: Preparation of Papers for IEEE Access (February 2017) VOLUME XX, 2017 1 • We pick the MCC servers 1.
2 . With cost function . If the resources on MCC servers 1 satisfy the requirements of the task on MCC server 2 . So, the task swapping is only possible when the task Is it possible to swap of MCC server? Task Scheduling variable is used to swat the task on both MCC servers. Whenever all the tasks on the MCC server 2 are all removed then E and similar we update the 2 state. After selecting the new server, the small cost new MCC server is selected from E to propose new information effectively. (( 1 > 2 ) ← ) ℎ 24.

J. Time Complexity of TSMCO
The TSMCO has different components like Resource Matching, Task Sequences, and Task Scheduling. We take these three components separately and then effectively utilize all these components to obtain the time complexity. (1) Resource Matching: We expect the heterogeneous servers to exploit the TOPSIS and AHP methods for task matching [44]. The calculated time complexity of the Resource Matching is ( ) [45]. M is the MCC server resources for multicriteria, and T is the tasks arranged in the pair-wise matching.
(2) Sequence of Tasks: In Task sequencing, all the tasks are sorted with the shortest size, deadlines, and lateness by using ( ). N is the number of sorted tasks, and M is the exploited method to sort the tasks accordingly. (3) Task Scheduling: All the MCC servers are scheduled according to descending order of , and . Although the time complexity that we have measured is ( ). ( ) + [46]. This time complexity is for all MCC servers according to their descending order of price and load for the task scheduling process.
shows the tasks swapping process in the time complexity of the different MCC servers. Figure 4 represents the entire system work, including the simulation work.

IV. PERFORMANCE EVALUATION
To evaluate the performance of proposed TSMCO and MSCMCC frameworks, we generate practical results from different simulators over mobile and microservices-based applications. Initially, we simulated task sequencing over FCFS, SSJ, and SJF to simulate the task sequencing results of the proposed methodology. Task sequencing is an evaluation metric that defines the task's actual sequencing before the final decision. Furthermore, the CPU utilization evaluation metric is defined to check existing resource utilization under the common ship of different resources. Overhead time is an Author Name: Preparation of Papers for IEEE Access (February 2017) VOLUME XX, 2017 1 evaluation metric. Overhead time describes the framework for microservices overhead time using performance parameters. Task Deadlines (Execute all the tasks before the final submission of the deadlines), Cost (RPD value in percentage to show the total cost of application such as E-Transport, 2D/3D Games, Augmented Reality, HD Video Streaming, and Healthcare Applications used in the proposed system evaluation), and task failure ratio (During Scheduling Task failed to offload, and VMs failure after offloading) evaluation metrics are evaluated in the results section to briefly describe the performance of the proposed microservices-based task offloading framework. Table 4 defines the stimulation parameters with their description.

≈ 50 Mbps
The process is divided into distinct parts based on the simulation parameters defined in Table 4. (1) MSCMCC implementation part, (2) Metric Parameters and Components Calibration, (3) Comparison of TSMCO offloading framework, and (4) Algorithms Comparison and Task Scheduling part. In Table 5, we describe the MCC server's resource, and in table 6, we describe the workload analysis of Mobile Applications. So, selecting these applications is to compare with existing techniques from literature to get better results for this costintensive application. Every application instance is considered one task containing multiple microservices.

A. Comparison Framework and Approaches
To compare with the existing approach, the following primary considerations are considered to compare the obtained results.
Author Name: Preparation of Papers for IEEE Access (February 2017) VOLUME XX, 2017 1 • Hypothesis-1/Baseline-1: We implement the VM-based offloading framework for MCC task scheduling. The studies have implemented the [46,[48][49][50] frameworks for testing results. The goal of the hypothesis is to offload the entire mobile application (including all the microservices) towards the MCC cloud servers. • Hypothesis-2/Baseline-2: Dynamic computational offloading-based framework is implemented using virtual machines. The adopted strategies are [51][52][53] used to test and compare the testing results. The aim is to offload complete mobile applications towards heterogeneous servers. The offloading is based on sufficient available resources.
• Hypothesis-3/Baseline-3: Mobile Applications deadlines are implemented in the baseline for Cost and Application deadline time. These are five selected application types taken from table 5 [16]. These are used to test and compare the testing results in Figures 9 and 10.
These methods work for cost, energy, and fault rate handling using task dependency values, Cloud Assisted Mobile Edge Computing (CAME) framework in which cloud resources are leased to enhance the system computing capacity. Another baseline method called Rattraap is used to compare the proposed system results. A lightweight cloud platform that improves the offloading performance from the cloud side. The results are compared for boot time for microservices, overhead cost, tasks sequences, deadline for microservices, failure rate, and tasks rates for microservices. These results are compared with the baseline methods for effective results comparison. Initially, we build the model for the proposed system and compare the selected results with existing baseline methods. We review that our results are comprehensively better than these baseline methods from all aspects.

B. Performance Metrics
In this paper, the components collaborations recommend the actual implementation plan for experimental results. The application tasks are generated from components collaboration as described in table 3. In this experiment, we take five different applications, and their types are considered for experimental results. Every task contains a deadline to finish its execution. The task deadlines set in this experimental paper setup are based on equation 34. This equation computes the task deadline for task requirements and provides a comprehensive approach to deal with the finished time of tasks. , = , + + , … … … … … … … … … (34) The task deadline for , is required to define the early finished time and task deadline to finish the final task interval. shows the tightness in the task deadline, which shows the values of 0. Where, shows the objective function.

C. MSCMCC Implementation
We implement a Mobile Cloud-based application in Mobile Devices using Mobile Application Developer IDE, i.e., Android Studio, and Huawei Y9 2019 Mobile Model as an emulator to test mobile applications. Figure 5 shows this description for applications and scenarios.

D. Comparison of Offloading Frameworks
The proposed Microservices Container-Based Mobile Cloud Computing offloading framework provides lower bootup time than heavyweight VM frameworks. The proposed system effectively improves resource utilization as compared to existing techniques. These aspects are proved through simulation through mentioned parameters from Table 3. The main reason behind the effective results is the lightweight VM utilization over heavyweight when running Mobile Applications during scheduling. Therefore, our task scheduling framework is efficient for delay-sensitive mobile applications.
The proposed system effectively minimizes the cost of healthcare applications by 25%, augmented reality by 23%, E-Transport tasks by 21%, and 3-D games task by 19%, the average boot-time of microservices applications by 17%, resource utilization by 36%, and tasks arrival time by 16%.

E. Task Sequencing
Task Sequencing rules such as FCFS, SJF, and SSJ are the main components used to organize the tasks in sequential order for scheduling. Figure 12(a) demonstrates Task Sequencing Rules' working, and figure 12(b) demonstrates the Mean plot of alpha with 95% of HSD Interval and Mean plot for random Mobile Tasks arrival with 95% of HSD intervals. The proposed approach effectively compares the results among FCFS, SJF, and SSJ, which effectively compares and extends results for RPD value in percentage. The proposed technique uses SSJ, which effectively improves the results compared to existing methods for proper implementation of the results. The results show that our proposed approach effectively enhances the proposed technique's working with an effective scenario.  sequencing rules systematically choose the sequencing methodology based on the primitive tasks sequencing technique. The task priorities are set for the tasks, which shows the dynamic topological order for the sequencing of the tasks.

F. Task Scheduling
Cost Efficiency in MCC is a key for Mobile Applications. We consider task deadlines and application costs. This research aims to execute the tasks under their deadlines and minimize the mobile application cost. Figures 13 and 14 illustrate the TSMCO framework that incurs lower mobile application execution costs than the existing baseline 1 to 3. The baselines are the existing technologies that elaborate the proposed approach's effectiveness. Moreover, the results are compared for different applications designed using a microservices-based implementation scheme. The mobile applications run under their deadlines which are shown in figure 13. The proposed system effectively improves the proposed system through iterative features. The solution is continuous until the final optimal solution has been reached.

G. Task Failure Ratio
Our task scheduling mechanism improves the task failure ratio compared to existing techniques. The existing techniques only consider the basic approach for task scheduling. Figures 15 and  16 show the task failure ratio in the proposed technique compared to existing techniques. The TSMCO technique Author Name: Preparation of Papers for IEEE Access (February 2017) VOLUME XX, 2017 1 effectively overcame the task failure ratio. This shows that the proposed techniques perform better in the dynamic allocation of Mobile Cloud Servers. The Proposed TSMCO framework works efficiently in the dynamic allocation of resources and situations. The cost of the system significantly improved and provided the deadlines for the efficient resources constraints. The Proposed TSMCO framework executes the mobile tasks due to deadline and expands the execution cost.

V. CONCLUSION AND FUTURE WORK
This research proposes a new task scheduling for a microservices-based mobile cloud computing framework. We propose a new microservices-based Mobile Cloud Computing system MSCMCC to run the microservices applications for efficient delay-sensitive applications and a mobility-aware framework to overcome the cost of the application. Moreover, we introduce the TSMCO framework that effectively solves the task scheduling in steps. The steps are task sequences, resource provision and matching, and task scheduling. The experimental results elaborate on the efficient utilization of the resources used in mobile devices and MCC servers. The boot time of the microservices-based applications is lower than existing techniques. The overhead time reduces towards the provided mechanism. We further find from the study that overhead time of the microservices-based tasks in the proposed technique is lower, and the cost of each of the microservices based applications used is lower than other techniques in baseline one and two. Furthermore, the experimental results elaborate on the server utilization achieved through MSCMCC and TSMCO schemes. To decrease the latency of mobile cloud servers, the mobile server bootup time and microservices latency are effectively utilized, and server cost is effectively minimized.
In the future, Privacy-aware microservices-based task offloading framework for IoT and mobile applications collectively. Our deployment plan is to deploy such mainstream towards Azure, Amazon, and Google. Both transient failure and security are considered during microservices task offloading frameworks. Furthermore, we plan to implement task scheduling decision-making using machine learning or ANN.