Showing posts with label OS Exam Questions. Show all posts
Showing posts with label OS Exam Questions. Show all posts

Thursday, September 30, 2021

discuss different delays that occur in a storage system with conventional hard disk setup

Operating systems questions and answers, OS University exam questions, what are the different delays happen while accessing data in a hard disk

Question:

List and discuss different delays that occur while servicing a request in a storage system with conventional hard disk setup.

 

Answer:

Seek time: time to move read/write head from its current position to the desired track. It is the time taken for a hard disk controller to locate a specific piece of stored data. It may take 3 to 12 milliseconds (9ms is common for desktop drives).

Rotational latency: time for desired sector on target track to spin under the read/write head. May take 1-2 milliseconds (medium)

Transfer time: it is about how long the actual data read or write takes. Time to read the target sector and transfer bytes to host computer. The transfer time is the estimated time for the completion of a data transmission. A millisecond or less (low).

Wait time: time spent in I/O queue waiting for service. Could be 0 or more milliseconds, depending on number of requests queued and the disk request scheduling policy used.

 

******************
Related Questions:

 

What is seek time

What is rotational latency

how does rotational latency affect the performance in a disk

 

 

Sunday, March 28, 2021

Operating systems multiple choice questions for GATE exams - Set 23

Operating systems exams - multiple choice questions (MCQ) and answers, Objective type questions, OS exam questions, MCQ in memory management, process management, disk scheduling, process state transition, race condition


Operating Systems MCQ questions and answers – Set 23

1. A computer system has a 36-bit virtual address space with a page size of 8K, and 4 bytes per page table entry. How many pages are in the virtual address space?

a) 8,192

b) 4,096

c) 68,71,94,76,736

d) 83,88,608

Answer: (d) 83,88,608  

A 36 bit address can address 2^36 bytes in a byte addressable machine. Since the size of a page 8K bytes (2^13), the number of addressable pages is 2^36 / >2^13 = 2^23 = 83,88,608.

 

2. Which is true about process termination?

a) The waitpid operation always blocks the calling process

b) A child process can kill another child process of the same parent process

c) A child process that exits before the parent process does a waitpid operation becomes a zombie process

d) None of the above

Answer: (d) None of the above    

Process termination is a technique in which a process is terminated and releases the CPU after completing the execution. It may happen in the following situations;

normal conditions (exit() call), abnormal termination (due to programming error, runtime error, i/o error etc.), parent may terminate child process, due to memory requirement etc.

 

3. In the process state transition diagram, the transition from the Ready state to the Running state:

a) Indicates that a process was preempted by another process

b) Indicates that a process is chosen by CPU for execution

c) Indicates that a process is done waiting for an I/O operation

d) Indicates that a process has blocked on an I/O operation

Answer: (b) Indicates that a process is chosen by CPU for execution         

Ready state - The task has completed preparations for running, but cannot run because a task with higher precedence is running. In this state, the task is able to run whenever it becomes the task with the highest precedence among the tasks in READY state.

Running state - A process moves into the running state when it is chosen for execution. The process's instructions are executed by one of the CPUs (or cores) of the system.

The transition from ready state to running state happens if the process is chosen for execution by the CPU.

 

4. Disk scheduling algorithms attempt to reduce

a) Transfer time

b) Rotational latency

c) Seek time

d) All of the above

Answer: (c) Seek time 

In operating systems, seek time is very important. Since all device requests are linked in queues, the seek time is increased causing the system to slow down. Disk Scheduling Algorithms are used to reduce the total seek time of any request.

Seek time – Seek time is the time taken for a hard disk controller to locate a specific piece of stored data. It measures the delay for the disk head to reach the track.

Transfer time – It is about how long the actual data read or write takes. It is the time actually taken to transfer a span of data.

Rotational latency - Rotational latency (or just latency) is the delay waiting for the rotation of the disk to bring the required disk sector under the read-write head. It accounts for the time to get to the right sector.

 

5. Two threads in the same process share the same

a) Address space

b) Program counter

c) Stack

d) All of the above

Answer: (a) Address space

In a multi-threaded process, all of the process’ threads share the same memory and open files. Within the shared memory, each thread gets its own stack. Each thread has its own instruction pointer and registers.

Threads allow for efficient sharing of information, since the address space is shared, multiple threads can directly access the same memory.

 

*********

Related links:


OS Interview questions with answers

How disk scheduling algorithms reduce the seek time

GATE questions in system programming and operating systems

Why threads are good at information sharing

Operating systems interview questions for competitive exams

objective type OS questions for IIT JEE entrance exam

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents