4.3k views

A hard disk has $63$ sectors per track, $10$ platters each with $2$ recording surfaces and $1000$ cylinders. The address of a sector is given as a triple $\langle c, h, s \rangle$, where $c$ is the cylinder number, $h$ is the surface number and $s$ is the sector number. Thus, the 0$^{th}$ sector is addresses as $\langle 0, 0, 0 \rangle$, the 1$^{st}$ sector as $\langle 0, 0, 1 \rangle$, and so on

The address $\langle 400, 16, 29 \rangle$ corresponds to sector number:

1. $505035$
2. $505036$
3. $505037$
4. $505038$
edited | 4.3k views
0
How to find reverse of this solution.
Like.. to find the address of the sectors of 505035, 505036, 505037 and so on..
+6
⟨400,16,29⟩ it means we have to cross 400 clyinder, 16 surfaces and 29 sectors

now we have to see total no. of sectors to cross

for 400 clyinders, no. of sectors to be crossed

=400 *10*2*63

after reaching at 400th clylinder we have to go at 16th surface for which no. of sectors to be crossed

=16 *63 (each suface has 63 sectors)

now we are at 16th surface of 400th clylinder then we can directly go to 29th sector of this surface

Total sectors crossed = (400*10*2*63) + (16*63) +29

0
@cse23

How did u interpreted that data on disk is stored cross sectionally ? and not linearly ?
0
last term should be 29 instead of 20

The data on a disk is ordered in the following way. It is first stored on the first sector of the first surface of the first cylinder. Then in the next sector, and next, until all the sectors on the first track are exhausted. Then it moves on to the first sector of the second surface (remains at the same cylinder), then next sector and so on. It exhausts all available surfaces for the first cylinder in this way. After that, it moves on to repeat the process for the next cylinder.

So, to reach to the cylinder numbered $400 (401^{th} cylinder)$ we need to skip $400$ $\times$ ($10$ $\times$ $2$) $\times$ $63 = 504,000$ sectors.

Then, to skip to the $16^{th}$ surface of the cylinder numbered $400$, we need to skip another $16$ $\times$ $63 = 1,008$ sectors.

Finally, to find the $29$ sector, we need to move another $29$ sectors.

In total, we moved $504,000 + 1,008 + 29 = 505,037$ sectors.

Hence, the answer to $51$ is option (C).

edited by
+1
In the statement "Finally, to find the 29 sector, we need to move another 29 sectors" in your explanation you said that we moved another 29 sectors to reach sect 29, but finally we need to access sect 29 which is 30th sector and question asks for that sect number which is having address 29 in 17th surface(surface no 16) which is further on 401 st cylinder (cylinder number 400 ) .So according to me answer is (D).

Give it a thought or correct me if I am missing something !!
+13

It is true that the counting starts from 0, so the 29th sector is actually the 30th sector. Or is it?!

Notice that although the counting begins with 0, the starting sector is labelled the 0th sector, and not the first.

So, to reach the sector marked by the address <0, 0, 3>, we need to goto the sector labelled number 3 (not number 4)

<0,0,0> = 0th sector

<0,0,1> = 1st sector

<0,0,2> = 2nd sector

<0,0,3> = 3rd sector

...

<0,0,29> = 29th sector.

+1
Thanx @Pragy...Got it now .Actually I thought it is asking for "Number of sectors like from 0-3 we have 4 sectors .But question actually calls number 3 sector as 3rd sector and not 4th as you said.
–2
for b part chck the options to see who gives the desired no of sectrs
0

How to find reverse of this solution.
Like.. to find the address of the sectors of 505035, 505036, 505037 and so on..

0
+1 Very well explained.
0
@Pragy but then how can you be sure that in convention <c,h,s> , for s the numbering begins from 1 but for cylinder it begins from 0? It's nowhere mentioned in the question that 1st cylinder is addressed as <1,0,0>
0

@Sandeep

I think you're right

http://stackoverflow.com/questions/8950810/do-we-call-the-first-bit-in-a-byte-bit-1-or-0

Even in bit conventions the first bit is called as "bit 0".

@Arjun if possible please see this.

+3
@arjun sir ,
How could one  interpret that data on disk is stored cross sectionally ? and not linearly ?
+1 vote

(See UPDATE below) May be my interpretation flawed.. but here's my approach:

First, let us understand the story behind the DISK's Model which I have inferred after a two hour long research from this paper:
http://www2.cs.uh.edu/~paris/7360/PAPERS03/IEEEComputer.DiskModel.pdf

So, as per the question, there are 10 platters which are like the simple (2-sided) RW CD..
A cylinder is a stack of tracks. Don't think them as tracks on a surface but a cross-sectional stack of tracks across all the platters.
Imagine stacking all the platters one one top of the other (which they actually are on a spindle) and then looking at a track which in turn is a cylinder through all the platters below..

If the image is still unclear, refer to the diagrams in the paper or the web.

Now, as per the question,

10 platters (2-sided),, 1000 cylinders per platter (or 500 per surface), 63 sectors per track (which is on a cylinder on each surface - logically).

Now, the address <400,16,29> corresponds to,
PS: It must be noted that this is a 0-based address as per the question.
Hence, it is actually <401st cylinder, 17th surface, 30th sector>..

Skipping 16 (0-15) surfaces above the 17th (on which the sector is located) =>

skipping 16 x 500 x 63 sectors +

(on the 17th surface) skipping 400x63 sectors +

(on the 400th cylinder) skipping 29 sectors

= 529229

UPDATE:
The question is not ambiguous but my interpretation was flawed in the sense that the sectors are not numbered laterally but CROSS-SECTIONALLY across the platters (rather surfaces).

So the sectors are first numbered sequentially on the 0th cylinder of the 0th surface on the 1st platter and then the 1st surface (the other recordable end) of the same platter.

Similarly, if the head is on the 1st cylinder => It has skipped the 0th cylinder.
Further, depending on the cylinder position of the head, it can be inferred how many times, all the 10 platters were skipped.

To make this even more evident and clear, let us rectify the above interpretation.

So, <400,16,29> can still be interpreted as: the head on the 401th cylinder, 17th surface and the 30th sector on that surface as explained above due to the 0 based index.

Hence, we have skipped
400 x 2 <individual tracks per surface> x 10 <platters> x 63 <sectors> + 16 <cylinders skipped no 17th surface> x 63 + 29 <sectors skipped no the 401st track>
= 505037

edited
0
Feedback: Although I appreciate the other answer by @Pragy, it would have been further appreciated if the interpretation in my answer was corrected instead of a downvote.. Am I right? :)
+11

Heres the obvious rule:

$\text{If you don't know the answer, don't post an answer!"}$

If you have some approach and wish to discuss it, either open up a new thread, or drop a comment on the question.

Also, heres how the downvote to an answer should be interpreted:

A downvote is NOT a personal attack at the person, who's answer/comment received the downvote.

0
how... 400*20 is giving no. of surfaces... for track why we are not multipling with 1000..then we should multiply with 63....so answer should be... 400*20*1000*63+16*1000*63+29 correct me where i m wrong
0
When read write head arm is at 400 cylinder it means we have surpassed 400*20*63 as each cylinder has 20 surfaces each containing 63 cylinder in addition to that we are at 16th  track  containing 63 sectors each so add 16*63 in addition we have surpassed total 29 cylinders here that gives 505037

1
2