Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Short answers [5 pts each, total = 25] 1. Is the Least Slack Time algorithm dyna

ID: 2083198 • Letter: S

Question

Short answers [5 pts each, total = 25]

1. Is the Least Slack Time algorithm dynamic or static,each and why?

2. Define a sporadic job acceptance test and give an example.

3. What is an overloaded system, and give an example.

4. Define a LIFO algorithm and give an example

5. What happens when a sporadic job is accepted? Give an example

--------------------------

Calculations [each problem is 25 pts]

1a. Use the EDF algorithm to get some insights into this system:

(4,2), (12,2), (6,1)

1b. Where is slack time that could be used for slack stealing?

1c. Using the 3 guidelines, what frames could be utilized.

1d. Using ONE appropriate frame size, develop and analyze a network flow graph.

2a. If this can be scheduled as defined by the RM schedulability test, then

schedule it.

(5,1), (3,1), (9,2)

2b. Do a time-demand analysis on this, up to the time you calculate, and interpret

3a. The task set is (3,1), (4,1), (5,1).         Schedule using RM.

3b. Now, a sporadic job comes at t=7. Its deadline is t=10. Can it be done?

3c. now, two aperiodic jobs come. One comes at t = 5, e = 1. The other comes at t = 12, e = 1.

What are their response times?

Explanation / Answer

1) The Least time slack algorithm is dynamic because it assigns different priorities to an individual job in each task. LST algorithm follows the smaller slack time, the higher priority. Scheduler gives jobs with smaller slack higher priority. The slack time means the remaining spare time ( d - x - t ).

x remaining execution time of a job

d absolute deadline

t current time .

LST algorithm can schedule all tasks on condition of satisfying. And, it can be considered to be an optimal algorithm for a single processor.

2) Sporadic job acceptance test is that based on the execution time and deadline of each newly arrived sporadic job, decide whether to accept or reject the job . Accepting the job implies that the job will complete within its deadline, without causing any periodic task or previously accepted sporadic job to miss its deadline –.It will not accept a sporadic job if cannot guarantee it will meet its deadline.When sporadic jobs arrive, they are both accepted and scheduled in EDF order. In a dynamic-priority system, this is the natural order of execution . In a fixed-priority system, the sporadic jobs are executed by a bandwidth preserving server, which performs an acceptance test and runs the sporadic jobs in EDF order .In both cases, no new scheduling algorithm is required.This acceptance test assumes every sporadic jobs is ready for execution when released.

3) System Overloading is a feature that allows a class to have two or more methods having same name, if their argument lists are different.

Method overloading is also known as Static Polymorphism. This is also known as compile time binding or early binding.Static binding happens at compile time. Method overloading is an example of static binding where binding of method call to its definition happens at Compile time.

Example :

Overloading – Different Number of parameters in argument list

When methods name are same but number of arguments are different.

Output :

a

a 10

4 ) LIFO is a algorithm where whatever was added last is used first. Using the tray example; the trays are stacked in order of the oldest one at the end and the newest one at the top. Now, newer trays are added to the top and they are used in the same way. The newer trays are used first, with the older trays being used last.

In computing, LIFO is a queuing theory that refers to the way items are stored in types of data structures. If set according to LIFO structured linear tray, items can only be taken off from the top; which means the data that was added last to the tray is the first one that will be taken out. This term refers to the abstract principles of list processing and temporary storage, particularly when there is a need to access the data in limited amounts, and in a certain order.

In accounting, LIFO is also used as a measure to determine the value of unsold inventory. According to this, the goods produced the most recently are recorded as sold first, with the goods that were produced previously are still in the inventory or sold last. LIFO states that an entity uses or disposes of its newest inventory first. If the asset is sold less than what it is acquired for it is considered as a loss, while the opposite is considered as a profit. LIFO was commonly used method for tax evaluation as it increases tax liability.

Assume company A has 10 widgets. The first five widgets cost $100 each and arrived two days ago. The last five widgets cost $200 each and arrived one day ago. Based on the LIFO method of inventory management, the last widgets in are the first ones to be sold. Seven widgets are sold, but how much can the accountant record as a cost?

Each widget has the same sales price so revenue is the same, but the cost of the widgets is based on the inventory method selected. Based on the LIFO method, the last inventory in is the first inventory sold. This means the widgets that cost $200 sold first. The company then sold two more of the $100 widgets. In total, the company sold $1,200 worth of widgets under the LIFO method, or five at $200 and two at $100.LIFO creates higher costs and lowers net income, which also lowers taxable income. Likewise, in periods of falling prices, LIFO creates lower costs and increases net income, which also increases taxable income.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote