Basic CS-Operating System [3i Infotech Placement]: Sample Questions 44 - 45 of 89

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 44

Operating System
Edit

Describe in Detail

Essay▾

Define latency, transfer and seek time with respect to disk I/O.

Explanation

Latency

  • Time required for a sub-system or its component to process a single storage transaction or data request.
  • Refers to length of time for- single data request to be received and right data found and accessed from the storage media.
  • For example, in a disk drive, latency is the controller to find the proper data blocks and place the head over those blocks to begin the transfer process.

Transfer Time

  • Time taken to actually transfer the data.

Seek Time

  • The time required to move the disk arm to the required track.
  • Seek time consist of two components:
    • The initial startup time.
    • In a disk drive it is the time taken by access arm to move the track.
      • The traverse time is not linear function of the number of tracks.
    • Average seek time:< 10 milliseconds

Question 45

Operating System
Edit

Write in Short

Short Answer▾

What is macro? What are its advantages and disadvantages?

Explanation

  • A micro is a name given to block of C statements given as a pre-processor directive.
  • A pre-processor communicates the block of code to the compiler before entering into the actual compiling.
  • A macro is defined with the pre-processor directive.

Advantages:

  • Symbolic constants are evaluated by the pre-processor.
  • It is easy to modify the value of the constant variable.
  • Run time cost of inline functions (using macro) is less as no function call is made.

Disadvantages:

  • Macro are not useful when the function definitions are big and when the function is used many number of times.

Developed by: