Question

In: Computer Science

Apply a “stepwise refi nement approach” to develop three different levels of procedural abstractions for one...

Apply a “stepwise refi nement approach” to develop three different levels of procedural abstractions for one or more of the following programs: (1) Develop a check writer that, given a numeric dollar amount, will print the amount in words normally required on a check. (2) Iteratively solve for the roots of a transcendental equation.

(3) Develop a simple task-scheduling algorithm for an operating system.

i need 3rd part solution because 1st 2 parts are already answerd.

Solutions

Expert Solution

We are going to use min-max algorithm to make task scheduling algorithm,

Min-Max makes good use of time for greedy strategy, small tasks and big tasks are put together for scheduling. The main idea is as follows.

1) Calculate the minimum completion time for each task which is assigned to the related resources.

2) Choose a minimum value and a maximum value from the minimum completion time to make up a pair of tasks

3) Finish the pair of tasks scheduling and update related variables.

4) Repeat above steps until all tasks are assigned.

ALGORITHM :-

1 for each task Ti in task collection T

2 for j=1, 2, …, n

3 initialize RT(j)=0

4 calculate prediction finish time of task Ti which is assigned to

resource Mj, CT(i, j)=ETC(i, j)+RT(j)

5 end for

6 end for

7 while T is not null do

8 for each task Ti in task collection T

9 calculate MCT(i) and record host number host _MCT (i)

10 end for

11 choose a minimum value Ta and a maximum value Tb from the MCT(T)

12 assign Ta and Tb to host_MCT (Ta +Tb)

13 delete Ta and Tb from the task collection T

14 update RT(host_MCT (Ta +Tb))=MCT(Ta)+ MCT(Tb)

15 update CT matrix

16 end while

EXPLANATION OF TERMS USED ABOVE:-

RT(j): It refers to prepare time of resource Mj.

ETC(i, j): It represents prediction execute time of task Ti

which is assigned to resource Mj.

CT(i, j) : It represents prediction finish time of task Ti

which is assigned to resource Mj, satisfying CT(i, j)= ETC(i,

j) + RT(j).

MCT(i): It refers to the minimum finish time of task Ti.

host _MCT (i): It means that Task Ti is assigned to re-

source host _MCT (i).


Related Solutions

Firms will typically develop their international strategies using one of three levels of corporate strategy, business...
Firms will typically develop their international strategies using one of three levels of corporate strategy, business strategy, or functional strategies. Present an overview of one of these strategies and provide an example (do not use an example from the text) of a firm that has used such as strategy.
How can we apply the 3 levels-of-analysis approach to the study of stuttering? That is, how...
How can we apply the 3 levels-of-analysis approach to the study of stuttering? That is, how can stuttering be examined at the three levels of interest? Please provide concrete examples in the form of informed speculations.
Describe three different factors, two levels for each, and one response variable to design an experiment...
Describe three different factors, two levels for each, and one response variable to design an experiment where you try to figure out what is the best way to knock down all the bowling pins during a game of bowling.
This assessment task aims to develop your ability to apply the first three phases of the...
This assessment task aims to develop your ability to apply the first three phases of the clinical reasoning process, at an introductory level, to the patient scenario below. You are a student nurse working with a school nurse (registered nurse) in a secondary school. You and your mentor are supervising a bubble soccer match this afternoon (26th March) which commenced at 1400 hrs. The match goes for 40 minutes with a 5-minute break in between the two halves. It is...
This assessment task aims to develop your ability to apply the first three phases of the...
This assessment task aims to develop your ability to apply the first three phases of the clinical reasoning process, at an introductory level, to the patient scenario below. You are a student nurse working with a school nurse (registered nurse) in a secondary school. You and your mentor are supervising a bubble soccer match this afternoon (26th March) which commenced at 1400 hrs. The match goes for 40 minutes with a 5-minute break in between the two halves. It is...
when there is change in an organization it can impact the organization on three different levels....
when there is change in an organization it can impact the organization on three different levels. Societal, Industrial and Firm-level developments. Describe each level and why it is important .
Clinical Reasoning Report This assessment task aims to develop your ability to apply the first three...
Clinical Reasoning Report This assessment task aims to develop your ability to apply the first three phases of the clinical reasoning process, at an introductory level, to the patient scenario below. Patient Scenario - Jessie Lin You are a student nurse working with a school nurse (registered nurse) in a secondary school. You and your mentor are supervising a bubble soccer match this afternoon (26th March) which commenced at 1400 hrs. The match goes for 40 minutes with a 5...
Describe the concept of market efficiency. Explain three different levels of market efficiency
Describe the concept of market efficiency. Explain three different levels of market efficiency
Describe the three different levels of calcium release that can occur in a cell with respect...
Describe the three different levels of calcium release that can occur in a cell with respect to [IP3] and receptors opening
A researcher wanted to test the effectiveness of three different doses of medication on depression levels,...
A researcher wanted to test the effectiveness of three different doses of medication on depression levels, so she recruited 60 people and split them evenly into the 3 groups. Below an ANOVA summary table from his hypothetical experiment. Use this table to answer questions below. Source SS df MS F Between   (A) (C) (F) 3.50 Within 570 (D) (G) Total (B) (E) Using the information in the table (be sure to fill in, see other ANOVA table based essay question),...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT