Like.. to find the address of the sectors of 505035, 505036, 505037 and so on..

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+25 votes

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:

- $505035$
- $505036$
- $505037$
- $505038$

0

How to find reverse of this solution.

Like.. to find the address of the sectors of 505035, 505036, 505037 and so on..

Like.. to find the address of the sectors of 505035, 505036, 505037 and so on..

+5

⟨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

=505037 is the answer...???

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

=505037 is the answer...???

+46 votes

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**).

+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 !!

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

+13

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

Notice that although the counting begins with 0, the starting sector is labelled the 0^{th} 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

<0,0,0> = 0^{th} sector

<0,0,1> = 1^{st} sector

<0,0,2> = 2^{nd} sector

<0,0,3> = 3^{rd} sector

...

<0,0,29> = 29^{th} 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.

0

Like.. to find the address of the sectors of 505035, 505036, 505037 and so on..

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.

+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

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

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:

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:

*"The answer was flawed/was misleading/was spam/poorly structured/had poor grammar/was racist/sexist/ or some other genuine cause."*

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

- All categories
- General Aptitude 1.4k
- Engineering Mathematics 5.9k
- Digital Logic 2.3k
- Programming & DS 4.3k
- Algorithms 3.7k
- Theory of Computation 4.6k
- Compiler Design 1.7k
- Databases 3.4k
- CO & Architecture 2.9k
- Computer Networks 3.4k
- Non GATE 1.2k
- Others 1.3k
- Admissions 506
- Exam Queries 482
- Tier 1 Placement Questions 22
- Job Queries 64
- Projects 15

40,903 questions

47,558 answers

146,291 comments

62,306 users