Hardware platform of the target embedded systems

Assignment Help Data Structure & Algorithms
Reference no: EM13120583

An embedded system is a computer system performing dedicated functions within a larger mechanical or electrical system. Embedded systems range from portable devices such as Google Glasses, to large stationary installations like traffic lights, factory controllers, and complex systems like hybrid vehicles, and avionic. Typically, the software of an embedded system consists of a set of tasks (threads) with timing constraints. Typical timing constraints are release times and deadlines. A release time specifies the earliest time a task can start, and a deadline is the latest time by which a task needs to finish. One major goal of embedded system design is to find a schedule for the task set such that all the timing constraints are satisfied.

Task scheduler

We assume that the hardware platform of the target embedded systems is a single processor with midentical cores. The task set V={v1, v2, ..., vn} consists of n independent tasks. The execution time of each task is one time unit. Each task vi (i=1, 2, ,,, n) has a release time ri and a deadline di. All the release times and deadlines are non-negative integers. You need to design an algorithm for the task scheduler and implement it in Java. Your task scheduler uses EDF (Earliest Deadline First) strategy to find a feasible schedule for a task set. A schedule of a task set specifies when each task starts and on which core it is executed. A feasible schedule is a schedule satisfying all the release time and deadline constraints.

The EDF strategy works as follows.

 At any time t, among all the ready tasks, find the one with the smaller deadline, and schedule it on an idle core. Ties are broken arbitrarily. A task vi (i=1, 2, ,,, n) is ready at a time t if t≥ri holds.

We can prove that the EDF strategy is guaranteed to find a feasible schedule whenever one exists for a set of independent tasks with unit execution time.

An Example

Consider a set of 10 independent tasks whose release times and deadlines are shown in Table 1. The target processor has 3 identical cores. A feasible schedule of the task set is shown in Figure 1.

2484_embedded system.png

In this example, if the number of cores is 2, no feasible schedule exists. The reason is that one of the tasks v2, v3 and v4 must miss its deadline.

1250_embedded system11.png

The TaskScheduler class

You need to write a task scheduler class named TaskScheduler. A template of the TaskScheduler class is shown as follows.

public class TaskScheduler
{
...
static void scheduler(String file1, String file2, Integer m) {};
...
}

class ClassX {} /** Put the additional classes you need here */
...

You can define any fields, constructors and methods within the TaskScheduler class. You can also define additional classes. You must put all the additional classes in the file Taskscheduler,java without class any class modifiers.

The main method scheduler (String file1, String file2, Integer m) gets a task set from file1, constructs a feasible schedule for the task set on a processor with m identical cores by using the EDF strategy, and write the feasible schedule to file2. If no feasible schedule exists, it displays " No feasible schedule exists" on the screen. This method needs to handle all the possible cases properly when reading from file1 and writing to file2. All the possible cases are as follows.

1. file1 does not exist.
2. file2 already exists.
3. The task attributes (task name, release time and deadline) of file1 do not follow the format as shown next.

Both file1 and file2 are text files. files1 contains a set of independent tasks each of which has a name, a release time and a deadline. A task name is a string of letters and numbers. All the release times are non-negative integers, and all the deadlines are natural numbers. The format of file1 is as follows.

v1 r1 d1 v2 r2 d2 ... vn rn dn

Two adjacent attributes (task name, release time and deadline) are separated by one or more white space characters. A sample file1 is shown here.

For simplicity, you may assume that all the task names are distinct.

v1 t1 v2 t2 ... vn tn

where ti is the start time of the task vi (i=1, 2, ..., n). In file2, all the tasks must be sorted in non-decreasing start times. A sample file2 is shown here. Notice that you do not need to include the core on which each task is executed.

Time complexity requirement

The time complexity of your scheduler is required to be no higher than O(m*n log n), where n is the number of tasks, and m is the number of cores (Hints: use a fast sorting algorithm and the priority queue using heap). You need to include the time complexity analysis of your task scheduler in the TaskScheduler class file as comments. There is no specific requirement on space complexity. However, try your best to make your program space efficient.

Reference no: EM13120583

Questions Cloud

What is the probability of there being 2 aces in a single : What is the probability of there being 2 aces in a single column at the start of a Free Cell game? What about 3 and 4 aces in a single column? Conduct an experiment that validates your findings.
Find assumptions exit valuation and probability of sucess : EBV is considering a $5M Series A investment in Newco. EBV proposes to structure the investment as 6M shares of convertible preferred stock.
Illustrate what is the spring stiffness constant of spring : A 1300-{rm kg} car rolling on a horizontal surface has speed v = 50 km/h when it strikes a horizontal coiled spring and is brought to rest in a distance of 2.7 m. Illustrate what is the spring stiffness constant of the spring?
Radical expressions in real life : Consider how you might apply radical expressions to your daily life. Explain this application, and discuss what the equation might be.
Hardware platform of the target embedded systems : An embedded system is a computer system performing dedicated functions within a larger mechanical or electrical system. Embedded systems range from portable devices such as Google Glasses, to large stationary installations like traffic lights, fa..
Probability randomly chosen drivers coming to intersection : What is the probability that , of 20 randomly chosen drivers coming to an intersection under these conditions, a) At most 2 will come to a complete stop?
Consolidated cash flow statement : Aceton Corporation owns 80 percent of the outstanding stock of Voctax, Inc. During the current year, Voctax made $140,000 in sales to Aceton. How does this transfer affect the consolidated statement of cash flows?
Find probability demand for a product : Probability : Demand for a Product The demand for a product is estimated to be normally distributed with u=200 and o=40. Let x be the number of units demanded
How much heat is produced by the complete combustion : How much heat is produced by the complete combustion of 253g of CH4? Ch4(g) +2 O2(g) ----> CO2(g) + 2H2O (g)

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Efficient algorithm to achieve goal using few base stations

Certain points along the road, so that every house is within four miles of one of the base stations. Give an efficient algorithm that achieves this goal using as few base stations as possible.

  Js code to prompt the user for integer and print result

Write JS code which prompt the user for an integer and prints the result.

  Algorithm to divide sixteen digit value by six digit integer

Divide 16 digit value N by six digit integer D obtaining quotient Q and remainder (or sign of the remainder) R by division algorithms.

  Show result of inserting keys using linear probing

Show the result of inserting these keys using linear probing, using quadratic probing with c1 = 1 and c2 = 3, and using double hashing with h2(k) = 1 + (k mod (m ¡ 1)).

  Implement iterative version of algorithm heapify

Using any programming language to implement iterative version of algorithm HEAPIFY. Show your algorithm by running it on the array that contain your name characters.

  Universalist rationality theory

Universalist rationality theory supposes that actors within an institution are rational. They function with their own material interests in mind, maximizing efficiency and resources.

  Difference between sequential, random and binary file access

Discuss the difference between sequential file access, random file access, and binary file access? For each of the three types, provide an example of an application where the use of one type is better than the other 2-types.

  Analyzing the use of databases

Create a paper analyzing the use of databases in your company. Include what database applications are used. Conclude through proposing improvements.

  Write algorithm using pseudocode to recognize substrings

Write the algorithm, using pseudocode, to do the following task, Given the string of numbers, recognize all the substrings which form numbers which are divisible by 3.

  Complications in a time sharing system

Determine what complications could happen in a time-sharing system if two processes need access to the same file at the same time?

  Find the mean number of rounds per contention period

Two CSMA/CD stations are each trying to transmit long documents. After each frame is sent, they contend for the channel using the binary exponential backoff algorithm.

  Discuss and define normalization

Discuss and define normalization and what are the basic steps of the normalization process?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd