Question: 1) Consider the program which has a write to file operation shown in Figure 1. The values in the blankets indicate the time required

1) Consider the program which has a "write to file" operation shown 

1) Consider the program which has a "write to file" operation shown in Figure 1. The values in the blankets indicate the time required for executing the segment. Suppose that "write to file" operation is independent to other instructions in the program. Program segment 1 (3 s) Write to file sub routine (5 s) Program segment 2 (7 s) Figure 1 a. Draw diagrams to indicate when the program is run by a computer without interrupt and a computer with interrupt. b. What is the time required to execute the program by a computer without interrupt? c. Repeat b. when a computer with interrupt is used. d. If the "write to file" routine is replaced by a read from a file" routine and the read data is immediately consumed by the program segment 2, can the interrupt be used? Why?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!