We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Advance Computer Architecture (CS501)

Assignment # 02 (GRADED)

  Total marks = 20

                                                                                       Deadline Date = 21-July-2016

Please carefully read the following instructions before attempting the assignment.

Assignment Guidelines:

It should be clear that your assignment would not get any credit if:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupt.
  • The assignment is copied. Note that strict action would be taken if the submitted assignment is copied from any other student. Both students will be punished severely.

 

1)      You should consult recommended books to clarify your concepts as handouts are not sufficient.

2)      You are supposed to submit your assignment in .doc or docx format. Any other formats like scan images, PDF, Zip, rar, bmp etc will not be accepted.

3)      You are advised to upload your assignment at least two days before due date.

 

Important Note: 

Assignment comprises of 20 Marks. Note that no assignment will be accepted after due date via email in any case (whether it is the case of load shedding or emergency electric failure or internet malfunctioning etc.). Hence, refrain from uploading assignment in the last hour of the deadline, and try to upload Solutions at least 02 days before the deadline to avoid inconvenience later on.

For any query please contact: CS501@vu.edu.pk

Objective:

The objective of this assignment is to assess the understanding of,

  • I/O Subsystems and Interrupt Service Routine
  • Interrupts
  • Polling

 

 

 

Question:

 

Suppose a CPU with 300 MHz clock needs 500 clock cycles to perform a context switch and start an interrupt service routine (ISR). Assume that each interrupt takes 5,000 cycles to execute the ISR and the device makes 100 interrupt requests per second. Further, assume that the CPU polls every 0.25 msec during the time when there are no interrupts. Further, assume that the polling of I/O device requires 300 cycles.

 

According to the above information, you are required to perform the following tasks:

 

1) How many cycles per second will be spent by the CPU in handling I/O from the device using interrupts (if only interrupts are used)?

 

2) Calculate the fraction of the CPU time that is used in interrupt handling for part (1).

 

3) How many cycles per second are spent by the CPU on I/O using interrupts and polling (if polling is also used with interrupts)?

 

4) How frequently the processor should poll such that the polling will experience the same overhead as interrupts?

 

 

 

 

 

 

Good Luck


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 2755

Attachments:

Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.

Dear Students Don’t wait for solution post your problems here and discuss ... after discussion a perfect solution will come in a result. So, Start it now, replies here give your comments according to your knowledge and understandings....

konsy sa lecture ma

please upload solution

i think this solution is wrong!
as
1) How many cycles per second will be spent by theCPUin handling I/O from the device using interrupts (if only interrupts are used)?
Ans. 500+2X500=1500Cycle
1500X100=150, 000
it should be 
5000 + 2*500 = 6,000
6000 * 100 = 600,000

Question:

Suppose a CPU with 300 MHz clock needs500 clock cycles to perform a context switch and start an interrupt service routine (ISR). Assume that each interrupt takes 5,000 cycles to execute the ISR and the device makes 100 interrupt requests per second. Further, assume that the CPU polls every 0.25msec during the time when there are no interrupts. Further, assume that the polling of I/O device requires 300 cycles.

According to the above information, you are required to perform the following tasks:

How many cycles per second will be spent by theCPUin handling I/O from the device using interrupts (if only interrupts are used)?
Ans. 500+2X500=1500Cycle
1500X100=150, 000


Calculate the fraction of the CPU time that is used in interrupt handling for part (1).
Ans. 150.000/(300X10^6)or .05

How many cycles per second are spent by the CPU on I/O using interrupts and polling (if polling is also used with interrupts)?
Ans. 1500/(300X10^6)=5.0
500-5.0=495 msec for polling
495/0.25=1,980 time per second
The total Number of cycle require for polling is :
1,980X300=594000 cycle per second
Thus , total time spend on I/O when using polling with interrupts
150,000+594000=744000 cycle per second


How frequently the processor should poll such that the polling will experience the same overhead as interrupts?
Ans. 2X500=1000
1000X100=100,000 Cycle per second
The polling overhead is 300 cycle per second . Thus , for a total of 2 X 1000 cycle per second interrupts, the polling operation should be performed
100,000/300 = 333.33333 time per second

Saba Mughal Assignment solution posted here 

Attachments:

salam,, any one tell me k 1st part ma 500+2X500=1500Cycle kassa aya ,,,,,, jb k lecture ma 10,000+2x1000 hy is tara to hum5,000+2x500 nhi kara gy kya????

ya 2 kahn sy ay gya

aliza you said correct it willl be 6000  as 5000+2(500,  as for reverse we write 2 time) ,this mistake will lead for further mistakes 

CS501

Advance Computer Architecture



Assignment no.2 Complete Solution



Semester Spring 2016




Question: 
Suppose a CPU with 300 MHz clock needs500 clock cycles to perform a context switch and start an interrupt service routine (ISR). Assume that each interrupt takes 5,000 cycles to execute the ISR and the device makes 100 interrupt requests per second. Further, assume that the CPU polls every 0.25msec during the time when there are no interrupts. Further, assume that the polling of I/O device requires 300 cycles.

According to the above information, you are required to perform the following tasks: 


1) How many cycles per second will be spent by theCPUin handling I/O from the device using interrupts (if only interrupts are used)?
Ans. 500+2X500=1500Cycle
1500X100=150, 000


2) Calculate the fraction of the CPU time that is used in interrupt handling for part (1).
Ans. 150.000/(300X10^6)or .05

3) How many cycles per second are spent by the CPU on I/O using interrupts and polling (if polling is also used with interrupts)? 
Ans. 1500/(300X10^6)=5.0
500-5.0=495 msec for polling
495/0.25=1,980 time per second
The total Number of cycle require for polling is :
1,980X300=594000 cycle per second
Thus , total time spend on I/O when using polling with interrupts
150,000+594000=744000 cycle per second


4) How frequently the processor should poll such that the polling will experience the same overhead as interrupts?
Ans. 2X500=1000
1000X100=100,000 Cycle per second
The polling overhead is 300 cycle per second . Thus , for a total of 2 X 1000 cycle per second interrupts, the polling operation should be performed
100,000/300 = 333.33333 time per second

i think this solution is wrong!
as
1) How many cycles per second will be spent by theCPUin handling I/O from the device using interrupts (if only interrupts are used)?
Ans. 500+2X500=1500Cycle
1500X100=150, 000
it should be
5000 + 2*500 = 6,000
6000 * 100 = 600,000

Question:

Suppose a CPU with 300 MHz clock needs500 clock cycles to perform a context switch and start an interrupt service routine (ISR). Assume that each interrupt takes 5,000 cycles to execute the ISR and the device makes 100 interrupt requests per second. Further, assume that the CPU polls every 0.25msec during the time when there are no interrupts. Further, assume that the polling of I/O device requires 300 cycles.

According to the above information, you are required to perform the following tasks:

How many cycles per second will be spent by theCPUin handling I/O from the device using interrupts (if only interrupts are used)?
Ans. 500+2X500=1500Cycle
1500X100=150, 000


Calculate the fraction of the CPU time that is used in interrupt handling for part (1).
Ans. 150.000/(300X10^6)or .05

How many cycles per second are spent by the CPU on I/O using interrupts and polling (if polling is also used with interrupts)?
Ans. 1500/(300X10^6)=5.0
500-5.0=495 msec for polling
495/0.25=1,980 time per second
The total Number of cycle require for polling is :
1,980X300=594000 cycle per second
Thus , total time spend on I/O when using polling with interrupts
150,000+594000=744000 cycle per second


How frequently the processor should poll such that the polling will experience the same overhead as interrupts?
Ans. 2X500=1000
1000X100=100,000 Cycle per second
The polling overhead is 300 cycle per second . Thus , for a total of 2 X 1000 cycle per second interrupts, the polling operation should be performed
100,000/300 = 333.33333 time per second

RSS

Latest Activity

Mifa Fadel liked +M.Tariq Malik's discussion SOC101 Introduction to Sociology Assignment 01 Fall 2020 Solution / Discussion
1 hour ago
shifa arshad added a discussion to the group CS605 Software Engineering-II
4 hours ago
shifa arshad joined +M.Tariq Malik's group
4 hours ago
Profile Iconиαвєєℓ αнмє∂ and Ali Fahad joined +M.Tariq Malik's group
5 hours ago
shifa arshad replied to +M.Tariq Malik's discussion MGT502 Organizational Behavior GDB No 01 Fall 2020 Solution / Discussion in the group MGT502 Organizational Behavior
6 hours ago
shifa arshad joined +M.Tariq Malik's group
6 hours ago
+ !! SARAH replied to Hafiza Tehreem Fatima's discussion BIRTHDAY CELEBRATION OUR BELOVED <MEMBER SARAH ABDUL
7 hours ago
+ ᴄᴏғғᴇᴇ updated their profile
7 hours ago
Rizwan Mushtaq joined +M.Tariq Malik's group
7 hours ago
Arooj Shahid liked 乇メ-丂イひり3刀イ.'s discussion *** My Drawing ***
8 hours ago
Arooj Shahid liked 乇メ-丂イひり3刀イ.'s discussion *** الوداع اردو ***
8 hours ago
Arooj Shahid liked Miss. Churhail's discussion LOVE YOUR LIFE!!!!!
8 hours ago
Arooj Shahid liked Hafiza Tehreem Fatima's discussion BIRTHDAY CELEBRATION OUR BELOVED <MEMBER SARAH ABDUL
8 hours ago
Arooj Shahid liked Omar's discussion Dua
8 hours ago
+!!! ❤️ Shadow Girl❤️!!! liked 乇メ-丂イひり3刀イ.'s discussion *** الوداع اردو ***
8 hours ago
+!!! ❤️ Shadow Girl❤️!!! liked Hafiza Tehreem Fatima's discussion BIRTHDAY CELEBRATION OUR BELOVED <MEMBER SARAH ABDUL
8 hours ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion MGT201 Financial Management GDB No 01 Fall 2020 Solution / Discussion in the group MGT201 Financial Management
9 hours ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion MGT201 Financial Management GDB No 01 Fall 2020 Solution / Discussion in the group MGT201 Financial Management
9 hours ago
Profile IconSaba Shahzadi, waqar, Hammad Syed and 12 more joined Virtual University of Pakistan
9 hours ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion ENG001 Elementary English GDB No 01 Fall 2020 Solution / Discussion Last Date: 04-12-2020 in the group ENG001 Elementary English
9 hours ago

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.