Please visit, subscribe and share 10 Minutes Lectures in Computer Science

Monday, 30 March 2020

OS multiple choice questions with answers set 5

Operating systems MCQ questions set 5 for competitive exams with answers explained

Operating systems MCQ Set - 5

1. Which of the following C library functions do NOT directly correspond to (similarly named) system calls? That is, the implementations of which of these C library functions are NOT straightforward invocations of the underlying system call?
a. system()
b. fork()
c. exit()
d. strlen()
Answer: both (a) and (d)
system and strlen are both C functions used to execute a bash shell command and to return the length of a string respectively. On the other hand, both fork and exit are system calls used to create a new child process and to terminate the current process respectively.

2. Which of the following are all system calls?
a. chmod(), chdir(), read(), main()
b. waitpid(), smdir(), mount(), open()
c. fork(), exit(), lseek(), kill()

3. A round robin scheduler:
a. favors processes that are expected to have a short CPU burst.
b. favors high priority processes.
c. dynamically adjusts the priority of processes based on their past CPU usage.
d. gives each process an equal share of the CPU.
Answer: (d)
A round robin scheduler is basically first-come, first-served with preemption: a process can run until it blocks or until its time slice expires. Then it’s put at the end of the queue and every other process that’s ready to run gets to run. No estimation of CPU burst, no priorities.

4. A shortest remaining time first scheduler:
a. dynamically adjusts the quantum based on the process.
b. tries to optimize mean response time for processes.
c. gives each process an equal share of the CPU.
d. favors processes that use the CPU for long stretches of time.
Answer: (b)
A SRTF scheduler tries to estimate the next CPU burst of each process by weighing past CPU bursts. It then sorts processes based on this estimated burst time. This causes short-cpu-burst processes to be scheduled first and optimizes the average response time.

5. Process aging:
a. helps estimate the length of the next compute period.
b. increases the runtime of a process.
c. improves the chances of a process getting scheduled to run.
d. is a count of the total CPU time used by the process and is stored in the PCB.
Answer: (c)
Process aging is when you temporarily increase the priority of a low-priority process that has not been run in a while to ensure that it gets a chance to get scheduled to run.


Go to Operating Systems MCQ home page

Go to Operating Systems home page

Go to Operating Systems TRUE/FALSE questions page

What is process aging?

Define SRTF

What is round robing scheduler?

C library functions to execute system calls

list of system call functions

OS Interview questions with answers

solved Interview questions in operating systems

GATE questions in operating systems

MCQ Interview questions in OS

Operating systems interview questions for competitive exams

OS questions for IIT JEE entrance exam

No comments:

Post a Comment

Featured Content

Multiple choice questions in Natural Language Processing Home


All time most popular contents