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
  CS604 MidTerm Past Paper Mishi Khan 0 114 12-22-2018, 08:23 PM
Last Post: Mishi Khan
  CS610 GDB Assignment Solution Fall 2018 Mishi Khan 0 51 12-13-2018, 11:58 PM
Last Post: Mishi Khan
  CS601 Assignment 1 Solution Fall 2018 Pakistani 0 166 12-03-2018, 10:15 AM
Last Post: Pakistani
  CS608 Assignment 1 Solution Fall 2018 Admin 0 174 11-30-2018, 11:37 PM
Last Post: Admin
  cs609 assignment 1 fall 2018 solution fahadmukhtar 2 132 11-30-2018, 11:06 PM
Last Post: Admin
  require cs609 assignment solution fahadmukhtar 1 81 11-29-2018, 07:18 PM
Last Post: fahadmukhtar
  require cs610 assignment solution fahadmukhtar 0 222 11-18-2018, 05:20 PM
Last Post: fahadmukhtar
  CS601 - Assignment No. 1 Solution - Fall 2018 Angry_Bird 1 508 11-16-2018, 05:09 PM
Last Post: Zara Shahid
  CS625 Assignment 1 Solution Fall 2018 Admin 0 459 11-14-2018, 11:21 PM
Last Post: Admin
  CS603 Assignment 3 Solution Spring 2018 Admin 0 919 07-31-2018, 09:28 PM
Last Post: Admin



Users browsing this thread:
2 Guest(s)