Question

In: Computer Science

II. Application 1 and 2 run concurrently. Whenever a timeout interrupt occurs, the kernel switches control...

II. Application 1 and 2 run concurrently. Whenever a timeout interrupt occurs, the kernel switches control between the applications. Show the order of instruction execution, assuming application 1 is currently running. (42 pts)

Application 1

Application 2

...

instruction i

(timeout interrupt)

instruction i+1

...

instruction k

(timeout interrupt)

instruction k+1

...

instruction 0

...

instruction j

(timeout interrupt)

instruction j+1

...

  1. _______

  2. _______

  3. _______

  4. _______

  5. _______

  6. _______

Solutions

Expert Solution

Required Sequence of Execution:

1) application 1 started and continues execution from instruction 0 to instruction i

instruction i (application 1)

-------------------timeout interruption --------------------------(switching control--application 1 paused)--------------------------

2) instruction 0 (application 2 started)

...........instructions of applications 2 will continue from instruction 0 to instruction j

instruction j (application 2)

-------------------timeout interruption --------------------------(switching control--application 2 paused)--------------------------

3) instruction i+1 (application 1 begins)

...........instructions of applications 1 will continue from instruction i+1 to instruction k

instruction k (application 1)

-------------------timeout interruption --------------------------(switching control--application 1 paused)--------------------------

4) instruction j+1 (application 2 begins)

........application 2 will continues its execution until it completes all its instructions and then it gets terminated

.......application 2 terminated

5) instruction k+1 (application 1 begins)

........application 1 will continues its execution until it completes all its instructions and then it gets terminated

........application 1 terminated

Note: since the number of items required in the question is mentioned as 6 number of items but as the total number of executions is total 5 in number hence their order is as mentioned above.


Related Solutions

How does an interrupt differ from a subroutine? When an interrupt occurs, where does program control...
How does an interrupt differ from a subroutine? When an interrupt occurs, where does program control branch to?
1- Classify the power switches according to the ability to control 2- What are the conditions...
1- Classify the power switches according to the ability to control 2- What are the conditions of turning on the thyristor. State the methods of turning it off. What is the main difference between thyristors and GTO 3- Describe the behavior of TRIAC 4- Derive the expressions of the average load voltage and current in single-phase half-wave controlled rectifiers and resistive load. Draw the waveforms of supply voltage, output voltage, output current, thyristor voltage and thyristor current 5- In a...
1) If nondisjunction occurs during meiosis II, what type of gametes would be expected? 2) Sex...
1) If nondisjunction occurs during meiosis II, what type of gametes would be expected? 2) Sex determination in Ewoks is similar to humans - female Ewoks have two X chromosomes and males have one X and one Y chromosome. A gene on the X chromosome determines eye color, where the dominant allele XB gives produces black eyes and the recessive allele Xb produces hazel eyes. Two black eyed parents have a hazel eyed son. If they have two additional children,...
1. Why there needs to be user thread and kernel thread? 2. What are the advantages...
1. Why there needs to be user thread and kernel thread? 2. What are the advantages and disadvantages of writing an operating system in a highlevel language, such as C? 3. What is a critical section problem? Demonstrate that with an example. 4. With an example, show how critical section can led to dead locks. 5. Write two differences between a network OS and a distributed OS. 6. Identify the following environments as hard, firm or soft real time. Give...
1. What is the mechanism of interrupts? 2. How does an interrupt occur? 3. How should...
1. What is the mechanism of interrupts? 2. How does an interrupt occur? 3. How should two or more simulations interrupt requests be handled?
QUESTION 1 A Type II error occurs when we ________. reject the null hypothesis when it...
QUESTION 1 A Type II error occurs when we ________. reject the null hypothesis when it is actually true reject the null hypothesis when it is actually false do not reject the null hypothesis when it is actually false do not reject the null hypothesis when it is actually true QUESTION 2 A lower level of significance makes it harder to reject the null hypothesis. True False QUESTION 3 A professional sports organization is going to implement a test for...
1. The Profit-maximizing Level of output for a perfectly competitive firm in the short run occurs...
1. The Profit-maximizing Level of output for a perfectly competitive firm in the short run occurs where: a. marginal revenue equals price B. Total revenue equals total cost C.marginal cost equals price D. Average revenue equals average total cost 2. Marginal revenue is a firms: A. Ratio of the change in total revenue to change in output. B. Profit per unit times the number of units sold C. Ratio of average revenue to total revenue D. Increase in profit when...
1. Water is the best choice for use as a crystallization solvent whenever possible. Why? 2....
1. Water is the best choice for use as a crystallization solvent whenever possible. Why? 2. Why do you crystallize your product as slowly as possible? 3. Why would n-propyl alcohol, CH3CH2CH2OH be more soluble in water than n-propyl bromide, CH3CH2CH2Br?
run in python IDLE 3.9.0 i) One that prompts a user for 2 numbers. ii) Adds...
run in python IDLE 3.9.0 i) One that prompts a user for 2 numbers. ii) Adds the two numbers if they are even iii) Multiplies the two numbers if they are odd iv) Displays the appropriate output to the user You are writing 4 functions and calling them to test functionality.
QUESTION 1 Does the Basel II Accord deserve its share of the blame in the run...
QUESTION 1 Does the Basel II Accord deserve its share of the blame in the run up to the financial crisis of 2007? Those who say “no” however point to shortcomings of Basel I Accord as the possible reason. At a time when countries had just begun the implementation of the Basel II Accord, the remnants of the Basel I era, with its lack of sensitivity and inflexibility to rapid innovations, could have created perverse regulatory incentives to simply move...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT