Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS609: System Programming Assignment No. 06 Semester: Fall 2012 Due Date: 06/02/2013

Assalam-o-Alaikum

Assignment # 6 CS609 has been uploaded. Its due date is 06 -02- 2013. Please discuss here about the assignment

Thanks 

Instructions

Please read the following instructions carefully before submitting assignment:

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

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupt.
  • Solution is copied from any other source.

 

Objective

The objective of this assignment is to enhance your knowledge about;

  • File System
  • Block size
  • Internal Fragmentation

 

Assignment          

 

Part a)

10 Marks

 

What advantage and disadvantage do we get if Bytes per Sector used in a file system is too small/large? Your answer shall be in the following tabular format.

Scenario

Advantage

Disadvantage

No. of Bytes per Sector is Small

 

 

No. of Bytes per Sector is Large

 

 

 

Part b)

10 Marks

Let suppose we have to store files on a hard disk having sizes given as below.

840 Bytes, 1790 Bytes, 650 Bytes, 2470 Bytes and 2840 Bytes.

 

You have to choose an optimal size of sector on your disk which also referred as Bytes per Sector or Block Size. You have the choice to choose the Sector size only from typical values 512 Bytes, 1024 Bytes or 2048 Bytes. Do not make random guess, do some calculations and report them in your solution. Based on your calculations, answer the following questions with reasons stated briefly.

 

Question No.1: What Block size will you choose if the objective is to have optimal disk space utilization?

 

Question No.2: What Block size will you choose if the objective is to have reduced access time?

 

 

Submission

You are required to submit a single MS word file through LMS.

 

Fall%202012_CS609_6%20%281%29.doc

Views: 3931

Replies to This Discussion

Access time ka formula??

Please koi Allah ka banda/bandi poori calculation share kar day

how we  find out  that 512 has the least  memory loss chances. it depends on highest negative value or something else ??? 

ehrihioun wali larki sari caluclation kar do please kasay karni ha yeh???????

@ True/false 

unused space = no of block*(block size) - file size

koi haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?????

yup..

Attachments:
Part a): What advantage and disadvantage do we get if Bytes per Sector used in a file system is too small/large? Your answer shall be in the following tabular format.
Scenario Advantage Disadvantage
No. of Bytes per Sector is Small Increased access time i.e. decreased performance Optimal disk utilization
No. of Bytes per Sector is Large Reduced access time i.e. increased performance Disk space is wasted

Part b): Let suppose we have to store files on a hard disk having sizes given as below.
840 Bytes, 1790 Bytes, 650 Bytes, 2470 Bytes and 2840 Bytes.
You have to choose an optimal size of sector on your disk which also referred as Bytes per Sector or Block Size. You have the choice to choose the Sector size only from typical values 512 Bytes, 1024 Bytes or 2048 Bytes. Do not make random guess, do some calculations and report them in your solution. Based on your calculations, answer the following questions with reasons stated briefly.
Question No.1: What Block size will you choose if the objective is to have optimal disk space utilization?
Solution: Small block size gives optimal disk utilization. So, in this case we will choose block size of 512 bytes.
Proof:
If block size 512 bytes then to store
840 bytes uses 2 blocks
1790 bytes uses 4 blocks
650 bytes uses 2 blocks
2470 bytes uses 5 blocks
2840 bytes uses 6 blocks
Total used memory = no of blocks * block size = 19 * 512 = 9728 bytes
If block size 1024 bytes then to store
840 bytes uses 1 blocks
1790 bytes uses 2 blocks
650 bytes uses 1 blocks
2470 bytes uses 3 blocks
2840 bytes uses 3 blocks
Total used memory = no of blocks * block size = 10 * 1024 = 10240 bytes
If block size 2048 bytes then to store
840 bytes uses 1 blocks
1790 bytes uses 1 blocks
650 bytes uses 1 blocks
2470 bytes uses 2 blocks
2840 bytes uses 2 blocks
Total used memory = no of blocks * block size = 7 * 2048 = 14336 bytes
Hence prove if we will use block size of 512 bytes less memory will be used.
Question No.2: What block size will you choose if the objective is to have reduced access time?
Solution: Large block size will reduce access time. If we will chose large block size whole file will reside in the same block and can be read in single access. So, in this scenario we will choose block size of 2048 bytes.
As proved in above question we will need 7 accesses in case of block size of 2048, 10 accesses in case of block size of 1024 and 19 accesses in case of block size of 512. So in this scenario we will choose block size of 2048 bytes.

Ansar Gopang thank you so much bro......!!!

hmmad and ansar both are confusing in 1st question ????????????????????
tell me which one is most suitable according to question ?

RSS

Looking For Something? Search Below

Latest Activity

VIP Member Badge & Others

How to Get This Badge at Your Profile DP

------------------------------------

Management: Admins ::: Moderators

Other Awards Badges List Moderators Group

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

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