Question

In: Computer Science

In a one processor system, there is an interrupt clock which is set to a “time...

In a one processor system, there is an interrupt clock which is set to a “time slice Q”, that is, every Q an interrupt occurs to stop the process. There is only one I/O device in the system    which is interrupted when the process needs an I/O. There are 3 processes A, B, C.

    

     Process A executes an I/O interrupt every T units of time.

     Process B executes an I/O interrupt every 2T units of time.

     Process C executes an I/O interrupt every 3T units of time.

(a) Which of the above processes will benefit the most and which is not when Q = T.

      Explain your answer

(b) Which of the above processes will benefit the most and which is not when Q = 2T.

      Explain your answer

(a) Which of the above processes will benefit the most and which is not when Q = 3T.

      Explain your answer

What is the best value should Q takes for good performance ? explain your answer in full.

Solutions

Expert Solution

Ans for the given problem

i) Time-sharing:- Time sharing is a type of operating system, it enables multiple user who are located at the various terminals, to use the same computer system at the same time. In a time sharing system the main objective is to minimize the response time. The time- sharing systems were built and developed to provide an interactive use of the computer system. It uses CPU scheduling and multi - programming to provide each user with a small portion of a time - shared computers.

II) a) process which will benefit the most and which is not when Q = T :-

The Process C will benefit the most for Q = T as it is already defined above that Process A executes an I/O interrupt every T units of time. Assuming, for 1 sec second it states that for every one second Process A executes an I/O interrupt and hence, it will interrupts the CPU when new data has arrived and is ready to be retrieved by the system processor. and so Process A having Q = T will interrupt the least. Since, excessive amounts of processing time will be spent handling interrupts

b) process which will benefit the most and which is not when Q = 2T :-

Process C will benefit the most in this case as it will produce less interruption in the I/Odevice for every one second. Whereas, Process A will be the least beneficial .

a) process which will benefit the most and which is not when Q = 3T :-

Process C will be the most beneficial in thiss case having the same amount of interruption for each second whereas Process A will be least beneficial.

Hence, Process C will be the best among all for Q to get good performance as Interrupts provide low overhead and good latency at low load, but degrade significantly at high interrupt rate. excessive amounts of processing time spent in handling interrupts can cause interruption storm and hinder the performace of the system.

****************************************Thank You***************************************


Related Solutions

V. How does ARM processor differentiate between a timer interrupt and an A/D interrupt? VI. What...
V. How does ARM processor differentiate between a timer interrupt and an A/D interrupt? VI. What does privileged mode mean and what is the major difference between this mode and non-privileged mode? VII. There are two interrupt pins on ARM microprocessor: IRQ and FIQ. Which one can interrupt the other one and why?
The speed at which a processor can process instructions can be increased by making its clock...
The speed at which a processor can process instructions can be increased by making its clock speed higher, or by increasing the amount of L1 cache memory on the processor chip. Explain the terms clock speed and L1 cache and briefly discuss how increasing each of them increases the speed at which instructions can be processed. The maximum word limit for Question 3(a) is 150 words. b.You have the choice of buying two processors: Processor 1 has a clock speed...
This is a atmega128 source to make a clock using the timer interrupt. I want to...
This is a atmega128 source to make a clock using the timer interrupt. I want to add source if i press switch (PIND==0x0FE&&PIND==0x0FD) then below program would be running . #include<io.h> int position=0,BJT[4]={0xFE,0xFD,0xFB,0xF7}; int number=0,segment[10]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90}; int msec=0, sec=0, min=0; void main() { DDRA=0xFF; PORTA=0XFF; DDRB=0xFF; PORTB=0xFF; TCCR0=0x04; TIMSK=0x01; SREG=0x80; while(1){} } interrupt[TIM0_OVF]void timer0_ovf_isr() { TCNT0=0x06; PORTA=BJT[position]; if(position==0)number=sec%10; if(position==1)number=sec/10; if(position==2)number=min%10; if(postion==3)number=min/10; PORTB=segment[number]; position++; if(position>3)position=0; msec++; if(msec==1000) { msec=0; sec++; } if(sec==60) { sec=0; min++; } if(min==60)min=0; }
Assume that at time 5 no system resources are being used except for the processor and...
Assume that at time 5 no system resources are being used except for the processor and memory. Now consider the following events: At time 5: P1 executes a command to read from disk unit 1. At time 15: P2's time slice expires. At time 18: P4 executes a command to write to disk unit 1 At time 20: P3 executes a command to read from disk unit 2. At time 24: P2 executes a command to write to disk unit...
Assume that at time 3 no system resources are being used except for the processor and...
Assume that at time 3 no system resources are being used except for the processor and memory. Now consider the following events: At time 2: P0 is ready. At time 4: P0 is selected by CPU scheduler   At time 8: P0 executes a command to read from disk 0. At time 16: An interrupt occurs from disk unit 0: P0's read is complete. For each time 2, 4, 8 and 16, identify which state process is in. If a process...
A processor has a clock rate of 2.5 GHz. It’s dynamic power is 80 W and...
A processor has a clock rate of 2.5 GHz. It’s dynamic power is 80 W and static power is 20 watt. It executes a certain program in 25 seconds. a. What is the power consumption if clock frequency is slowed down by 30%? b. What will be the new execution time for the program which earlier took 25 seconds after slowing down the clock as in part a? c. What is the power consumption if voltage is decreased by 15%?
What is the difference between Interrupt and polling technique? Which one is preferable and why? 2:...
What is the difference between Interrupt and polling technique? Which one is preferable and why? 2: Store two values 0x80 and 0x08 in in file register locations 0x40 and 0x41 respectively. Subtract content of location 0x41from 0x40 and store the result in register 0x43.
When is an external interrupt recognized by the CPU?  When more than one interrupt occurs, what approaches...
When is an external interrupt recognized by the CPU?  When more than one interrupt occurs, what approaches would you use to service them? What approaches should be taken when an interrupt occurs within an interrupt service routine Consider a hypothetical microprocessor having 64-bit instructions composed of two fields: the first 16-bits contains the op-code and the remainder the immediate operand or an operand address.  Assume memory is organized in 32-bit words, i.e. one r/w access can yield a maximum of 32 bits.  ...
Outline the process that occurs when a hardware interrupt is generated by a disk controller. Set...
Outline the process that occurs when a hardware interrupt is generated by a disk controller. Set the context for the interrupt disk read and describe how an interrupt handler would address the event.
Answer the following questions about cache coherency protocols in a dual-processor system. a) If each processor...
Answer the following questions about cache coherency protocols in a dual-processor system. a) If each processor has a separate cache, what is the main advantage of the 4-state MESI snoopy cache coherency protocol compared to a snoopy cache coherency protocol that uses only 3 states M, S and I (modified, shared and invalid)? b) Suppose that processor P1 (in a dual-processor system) writes to a memory block. A copy of this same memory block is already in a modified line...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT