CS604 Assignment 3 Solution
#1
CS604 Operating System
Assignment 3 Solution
Semester: Spring 2017



Question No. 1 (05 marks):

There is a system with 16 tape drives and four processes. To follow the deadlock avoidance algorithm creates a Safe Sequence of the following processes by calculating the available tape drives.
Initial Available tap drive = 2

Solution:
Safe Sequence: P1, P3, P2, P0




Question No. 2 (05 marks):

Considering the following constraints, calculate the effective access time of finding a page table entry in the TLB. Write down the all calculating steps.
 
Tmem = 200 nsec
TTLB = 30 nsec
Hit ratio is 70%
Teffective = ?



Solution:

Formula for Teffective:

Teffective = Hit ratio(TTLB + Tmem) + miss ratio(TTLB + 2 * Tmem)Nanoseconds.

Question No. 3 (05 marks):

 

Suppose, Logical address space = 32 bits, Page size = 8k, Process address space = 4GB and Main memory RAM = 512 MB

 

Then calculate the following

 

•        Maximum pages in a process address space

•        Address bits p (page number) and d (offset)

•        No. of frames

•        Frame size |f|

•        Physical address



Solution:
  • Process Address Space / Page Size
  • d = log2 Page Size
  • p = Logical Address Space - d
  • No. of Frames = RAM / Page Size
  • |f| = log2 (No. of Frames)
  • Physical Address = |f| + d
#2
(07-25-2017, 10:29 AM)Pakistani Wrote: CS604 Operating System
Assignment 3 Solution
Semester: Spring 2017



Question No. 1 (05 marks):

There is a system with 16 tape drives and four processes. To follow the deadlock avoidance algorithm creates a Safe Sequence of the following processes by calculating the available tape drives.
Initial Available tap drive = 2

Solution:
Safe Sequence: P1, P3, P2, P0




Question No. 2 (05 marks):

Considering the following constraints, calculate the effective access time of finding a page table entry in the TLB. Write down the all calculating steps.
 
Tmem = 200 nsec
TTLB = 30 nsec
Hit ratio is 70%
Teffective = ?



Solution:

Formula for Teffective:

Teffective = Hit ratio(TTLB + Tmem) + miss ratio(TTLB + 2 * Tmem)Nanoseconds.

Question No. 3 (05 marks):

 

Suppose, Logical address space = 32 bits, Page size = 8k, Process address space = 4GB and Main memory RAM = 512 MB

 

Then calculate the following

 

•        Maximum pages in a process address space

•        Address bits p (page number) and d (offset)

•        No. of frames

•        Frame size |f|

•        Physical address



Solution:
  • Process Address Space / Page Size
  • d = log2 Page Size
  • p = Logical Address Space - d
  • No. of Frames = RAM / Page Size
  • |f| = log2 (No. of Frames)
  • Physical Address = |f| + d


Attached Files Thumbnail(s)
   
#3
Solution of cs604


Attached Files
.pdf   cs604 solution by Rubaisha.pdf (Size: 165.64 KB / Downloads: 10)
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  CS603 Assignment 3 Solution Spring 2018 Admin 0 471 07-31-2018, 09:28 PM
Last Post: Admin
  CS610 Assignment 1 Solution Spring 2018 Admin 0 1,486 05-08-2018, 09:09 AM
Last Post: Admin
  CS604 GDB Solution Fall 2017 Admin 0 1,281 01-30-2018, 07:13 PM
Last Post: Admin
  CS601 Assignment 2 Solution Fall 2017 Admin 1 2,084 01-14-2018, 10:21 PM
Last Post: fahadmukhtar
  CS605 Assignment 2 Solution Fall 2017 Pakistani 0 928 01-02-2018, 01:38 PM
Last Post: Pakistani
  CS601 Assignment 1 Solution Fall 2017 Pakistani 0 3,022 11-03-2017, 07:50 PM
Last Post: Pakistani
  CS605 Assignment 1 Solution Fall 2017 Pakistani 0 1,176 10-31-2017, 02:37 PM
Last Post: Pakistani
  CS601 Assignment 4 Solution Admin 0 1,321 07-24-2017, 11:49 AM
Last Post: Admin
Lightbulb CS604 GDB 01 Discussion Halaa_Syed_NEW 1 538 07-18-2017, 07:44 PM
Last Post: Pakistani
  CS605 assignment-3 Solution Nadeem Rana vu 1 673 07-14-2017, 05:49 PM
Last Post: Pakistani



Users browsing this thread:
1 Guest(s)