CS501 Assignment 2 Solution 2023 PDF Download

CS501 Assignment 2 Solution 2023 PDF Download

CS501 Assignment 2 Solution 2023 of VU is available in pdf Download. We share the 100% solution for CS501 GDB Solution Fall 2023 of Virtual University(VU), which is the 2nd GDB of the course. For the most up-to-date GDB assignment solutions, make sure to keep checking back to PreparationPoint.

PDF Download CS501 Assignment 2 Solution 2023

We know that Virtual University can be a challenging place, especially for new students. That is why our Virtual University Assignment Solution is here to help. Contact us today through the comment section for all your Virtual University Assignment Solution needs.

The time required to perform a context switch and start an ISR: 1000 clock cycles / 500 MHz = 2e-8 seconds or 0.0000002 seconds

The time required to execute each ISR: 10000 clock cycles / 500 MHz = 0.0002 seconds

The time required to poll an I/O device: 500 clock cycles / 500 MHz = 1e-8 seconds or 0.00000001 seconds

The total time spent on ISR execution per second: 200 interrupt requests/second * 0.0002 seconds/request = 0.04 seconds

The total time spent on polling per second: (1/2000) seconds/poll * 20000 polls/second = 0.01 seconds

The total CPU utilization due to interrupts: 0.04 seconds / (0.04 seconds + 0.01 seconds) = 80%

The total CPU utilization due to polling: 0.01 seconds / (0.04 seconds + 0.01 seconds) = 20%

Q: NO:1 Solution

The time required to perform a context switch and start an ISR: 1000 clock cycles / 500 MHz = 2e-8 seconds or 0.0000002 seconds

The time required to execute each ISR: 10000 clock cycles / 500 MHz = 0.0002 seconds

The time required to poll an I/O device: 500 clock cycles / 500 MHz = 1e-8 seconds or 0.00000001 seconds

The total time spent on ISR execution per second: 200 interrupt requests/second * 0.0002 seconds/request = 0.04 seconds

The total time spent on polling per second: (1/2000) seconds/poll * 20000 polls/second = 0.01 seconds

The total CPU utilization due to interrupts: 0.04 seconds / (0.04 seconds + 0.01 seconds) = 80%

The total CPU utilization due to polling: 0.01 seconds / (0.04 seconds + 0.01 seconds) = 20%

Q: NO:2 Solution

To find the fraction of the CPU time used in interrupt handling, we can use the information provided in the question to calculate the total CPU utilization due to interrupts. We know that:

The total CPU utilization due to interrupts: 0.04 seconds / (0.04 seconds + 0.01 seconds) = 80%

So, 80% of the CPU time is used in interrupt handling. Or, interrupt handling uses 80/100 or 4/5 of the CPU time.

Leave a Comment

Your email address will not be published. Required fields are marked *

%d bloggers like this: