eMuCo News  

  2nd Issue - 15th July 2009


Scheduling and Contract Model for Load balancing in Multicore Mobile Embedded System

By: Yang Chang yang@cs.york.ac.uk
      University of York, United Kingdom
      Georgiana Macariu georgiana@cs.upt.ro
      Politehnica University of Timisoara, Romania
Following the latest evolution of desktop computing systems, mobile embedded systems also begin to embrace the idea of using multiple cores to boost performance and save energy. Given the additional processing power provided by such systems, contract model is key to efficiently and safely sharing physical resources among different applications.

The basic functionality of a load balancer in a Multicore Mobile Embedded System is to provide support for real-time and non-real-time applications with different performance and timing requirements. The architecture of the eMuCo load balancer addresses the problem of CPU sharing between applications with such diverse requirements in a way that all these requirements are satisfied while the total power consumption of the system is kept as low as possible.

eMuCo Load Balancer architecture
Load balancer architcture


The Scheduling Policy of eMuCo load balancer determines how threads are allocated to CPU cores and possibly reassigns priorities to avoid deadlocks and ensure application performance. Preserving resources for each application is key to satisfying applications´ dramatically different requirements. It is also important to describe the resource requirements of each application or application component without losing the freedom of satisfying resource requirements with different physical resources.

One solution to this issue, the service contract, was initially proposed and used in the FRESCOR (Framework for Real-time Embedded Systems based on COntRacts) project for single core systems. In this contract model, every application or application component should have a contract with the rest of the system, describing the minimum resource requirements of this application or application component. Negotiations are made across the whole system to guarantee, if successfully negotiated, that enough resources are always available to satisfy the minimum requirements of all contracts.

On the other hand, an increasing demand for processing power caused by complex new embedded applications, and the difficulties with manufacturing faster unicore processors with acceptable power dissipation, force hardware manufacturers to produce more multicore systems than ever. Motivated by this trend, eMuCo extends the current service contract model to multicore mobile embedded systems. In this new model, a contract describes not only the minimum resource requirements (in the form of minimum budget (CPU time requirement) and maximum period) but also the parallelism needed (i.e. the number of cores that will provide the required budget in the given period). As with the FRESCOR contract model, offline or online negotiations shall be made across the whole system to determine if the minimum required computation power can be guaranteed for all contracts. A tool is under development, which takes application thread characteristics as inputs and automatically generates a contract for each application.

In order to implement the extension to the current contract model, eMuCo also takes advantage of new progress of real-time multiprocessor scheduling algorithm and theory. In existing literature, there are two main approaches for scheduling schedulable entities (such as threads and servers) on multicores or multiprocessors: fully partitioned and global scheduling. In eMuCo, a hierarchical multiprocessor scheduling framework based on the fully partitioned scheduling approach and aperiodic server technique is being developed. Its corresponding schedulability analysis will be implemented in our contract negotiation tool, which decides whether all contracts can be satisfied.

An example use of the eMuCo contract tool chain is illustrated in the following diagram.

example of eMuCo contract tool chain
Contract Negotiation Tool


Since results provided by the schedulability analysis based on real-time multiprocessor scheduling theory are often pessimistic, investigations on the use of formal methods for an exact schedulability analysis are also undertaken. Starting from the hierarchical multiprocessor scheduling solution proposed by eMuCo, the timed automata theory is applied for specifying the contracts for applications and their components and model checking is employed as a technique for deciding on their schedulability on a multiprocessor system. The integration of the timed automata formalism and the contract based scheduling is shown in the following figure.

integration of the timed automata formalism and the contract based scheduling
Application Scheduler


Moreover, a technique for offline contract negotiations will be developed based on the use of the same formalism. The starting point for the negotiations is represented by the traces of the timed automata which model possible behaviors of an application given specific contract conditions. Therefore, the traces can give means to detect possible breaches of the contract which can be corrected by further refinement of the contract.

It is expected that the scheduling and contract model adapted for multicore mobile embedded systems, will give to the future smart phones enough performance to satisfy the future users.

 
back to eMuCo News