Quote:

The amount of happiness that you have depends on the amount of freedom you have in your heart
Showing posts with label CS501. Show all posts
Showing posts with label CS501. Show all posts

Wednesday, 14 March 2012

CS501 Advance Computer Architecture ASSIGNMENT 5 SOLUTION


Assignment No. 05 SOLUTION
Semester Spring 2011
Advance Computer Architecture - CS501

Total Marks: 20

Due Date: 01/07/2011

Objective:
To learn and understand basic concepts of disk drives, and error control
Instructions:
Please read the following instructions carefully before solving & submitting assignment:
Assignment should be in your own wordings not copied from net, handouts or books.
It should be clear that your assignment will not get any credit (zero marks) if:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file corrupt.
  • The assignment is copied (from other student or copy from handouts or internet).
  • Student ID is not mentioned in the assignment File or name of file is other than student ID.

Note: You have to provide solution with all the calculations and formulations involved, else no marks will be awarded.

For any query about the assignment, contact at cs501@vu.edu.pk

GOOD LUCK
Question No 1

10 Marks 

A hard drive has 4 surfaces, with 512 tracks per surface and constant 64 sectors per track. Sector size is 2K byte. The average seek time is 3 ms, the drive runs at 3,600 rpm.

  1. What is the drive capacity? (5)
  2. What is average access time for the drive? (5)

Solution:

  1. Capacity = 4 x 512 x 64 x 2K= 262144 KB
  2. Rotational latency = Rotation time/ 2 = 60/ 3600x2 = 8.3 ms
Average access time= Seek time + Rotational latency = 3 + 8.3 = 11.3 ms

Question No 2
10 Marks

Use the hamming code to encode the following 4-bit values (8 marks)
Also write down the encoding scheme (2 mark)
 Total (8+2 = 10 marks)

A.                0110
B.                 1001
C.                0000
D.                1111

Note : Use odd bit parity to encode above values
Solution:

The encoding scheme is P1P2D3P4D5D6D7 , using odd parity

0110 → 0001110
1001 → 1110001
0000 → 1101000
1111 → 0010111



Advance Computer Architecture - CS501 ASSIGNMENT 5


Assignment No. 05
Semester Spring 2011
Advance Computer Architecture - CS501

Total Marks: 20

Due Date: 01/07/2011

Objective:
To learn and understand basic concepts of disk drives, and error control
Instructions:
Please read the following instructions carefully before solving & submitting assignment:
Assignment should be in your own wordings not copied from net, handouts or books.
It should be clear that your assignment will not get any credit (zero marks) if:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file corrupt.
  • The assignment is copied (from other student or copy from handouts or internet).
  • Student ID is not mentioned in the assignment File or name of file is other than student ID.

Note: You have to provide solution with all the calculations and formulations involved, else no marks will be awarded.

For any query about the assignment, contact at cs501@vu.edu.pk

GOOD LUCK
Question No 1

10 Marks 

A hard drive has 4 surfaces, with 512 tracks per surface and constant 64 sectors per track. Sector size is 2K byte. The average seek time is 3 ms, the drive runs at 3,600 rpm.

  1. What is the drive capacity? (5)
  2. What is average access time for the drive? (5)

Question No 2
10 Marks

Use the hamming code to encode the following 4-bit values (8 marks)
Also write down the encoding scheme (2 mark)

 Total (8+2 = 10 marks)

A.                0110
B.                 1001
C.                0000
D.                1111

Note : Use odd bit parity to encode above values





Advance Computer Architecture - CS501 ASSIGNMENT 4



Assignment No. 04
Semester Spring 2011
Advance Computer Architecture - CS501

Total Marks: 15

Due Date: 19/06/2011

Objective:
To learn and understand basic concepts of I/O subsystems, and DMA
Instructions:
Please read the following instructions carefully before solving & submitting assignment:
Assignment should be in your own wordings not copied from net, handouts or books.
It should be clear that your assignment will not get any credit (zero marks) if:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file corrupt.
  • The assignment is copied (from other student or copy from handouts or internet).
  • Student ID is not mentioned in the assignment File or name of file is other than student ID.

Note: You have to provide solution with all the calculations and formulations involved, else no marks will be awarded.

For any query about the assignment, contact at cs501@vu.edu.pk

GOOD LUCK
Question No 1

10 Marks 

An I/O device transfers data at a rate of 5MB/s over a 100MB/s bus. The data is transferred in 2KB blocks. If the processor operates at 500MHz, and it takes a total of 5000 cycles to handle each DMA request, find the fraction of CPU time handling the data transfer with and without DMA.

Question No 2
5 Marks
A 4 K byte block of data is read from a disk drive. What is the overall data transmission rate if the disk drive has a latency of 7 ms, and a burst bandwidth of 2 MB per second?





Advance Computer Architecture-CS501 ASSIGNMENT 3 SOLUTION


Assignment No. 03 sOLUTION
Semester Spring 2011
Advance Computer Architecture-CS501

Total Marks: 15

Due Date: 09/06/2011

Objective:
To learn and understand basic concepts of I/O and polling loop.

Instructions:
Please read the following instructions carefully before solving & submitting assignment:
Assignment should be in your own wordings not copied from net, handouts or books.
It should be clear that your assignment will not get any credit (zero marks) if:

o   The assignment is submitted after due date.
o   The submitted assignment does not open or file corrupt.
o   The assignment is copied (from other student or copy from handouts or internet).
o   Student ID is not mentioned in the assignment File or name of file is other than student ID.

For any query about the assignment, contact at cs501@vu.edu.pk

GOOD LUCK
Question No 1
Marks = 10 

Let us have a 20MIPS processor, you have to calculate the percentage of time it spends in busy wait loop of a 75-character line printer, when it takes 2 msec to print a character and a total of 665 instructions require to be executed to print a 75 character line.

Suppose that two instructions are executed in the polling loop.

Solution:

Out of the total 665 instructions executed to print a line, 75x2=150 is required for polling. For a 20MIPS processor, the execution of the remaining 515 instructions takes 515/ (20x106) = 25.75µsec. Since the printing of 75 characters takes 150ms, (150-0.02575) =149.97msec is spent in the polling loop before the next 75 characters can be printed. This is 149.97/150=99.98% of the total time.

Question No 2
Marks=5     

Let us assume that a program takes 400 seconds of elapsed time to execute.  Out of these 400 seconds, 320 seconds is the CPU time and the rest is I/O time. What percentage of elapsed time is spent on I/O operations?

Solution:
Elapsed time = CPU time + I/O time.
This gives us the I/O time = 400 – 320 = 80 seconds at the beginning, which is 20 % of the elapsed time.





Advance Computer Architecture-CS501 ASSIGNMEN 3



Assignment No. 03
Semester Spring 2011
Advance Computer Architecture-CS501

Total Marks: 15

Due Date: 09/06/2011

Objective:
To learn and understand basic concepts of I/O and polling loop.

Instructions:
Please read the following instructions carefully before solving & submitting assignment:
Assignment should be in your own wordings not copied from net, handouts or books.
It should be clear that your assignment will not get any credit (zero marks) if:

o   The assignment is submitted after due date.
o   The submitted assignment does not open or file corrupt.
o   The assignment is copied (from other student or copy from handouts or internet).
o   Student ID is not mentioned in the assignment File or name of file is other than student ID.

Note: You have to provide solution with all the calculations and formulations involved, else no marks will be awarded.

For any query about the assignment, contact at cs501@vu.edu.pk

GOOD LUCK
Question No 1
Marks = 10 

Let us have a 20MIPS processor, you have to calculate the percentage of time it spends in busy wait loop of a 75-character line printer, when it takes 2 msec to print a character and a total of 665 instructions require to be executed to print a 75 character line.

Suppose that two instructions are executed in the polling loop.
Question No 2
Marks=5     

Let us assume that a program takes 400 seconds of elapsed time to execute.  Out of these 400 seconds, 320 seconds is the CPU time and the rest is I/O time. What percentage of elapsed time is spent on I/O operations?




CS501 ASSIGNMENT 2 SOLUTION


                                       ASSIGNMENT # 2(Solution)

                                                CS501



QUESTION.1

Specify the condition for the branch instruction and the status of the PC after the branch instruction executes with a true branch condition.


Solution:

Instruction
Condition
PC status
Jump[20]
Always
PC← PC+20
Jnz r3,[33]
If R[3] ≠ 0
PC← PC+33
Jz r1,[16]
If R[1] = = 0
PC← PC+16
Jpl r5,[37]
If R[5] ≥0
PC← PC+37
Jmi r7,[40]
If R[7] < 0
PC← PC+40



Q.2



Identify the addressing modes and Register Transfer Language (RTL) description (meaning) for the given Falcon-A instructions



Solution:

Instruction
Addressing Mode
RTL description(meaning)
Load r3,[r5+27]
Displacement
R[3] ← M[R[5] +27]
Jnz r5,[15]
Relative
(If R[5] ≠ 0): PC← PC+15
Shiftl r3,r2,5
Immediate
Shift r2 left 5 times and store in r3
Add r6,r5,r7
Register
R[6] ← R[5] + R[7]
Subi r4,r3,17
Immediate
R[4] ← R[3] -17