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

Sunday, June 28, 2020

Operating systems multiple choice questions for exams - Set 20

Operating systems exams - multiple choice questions (MCQ) and answers, Objective type questions, OS exam questions


Operating Systems MCQ questions and answers – Set 20

1. Which of the following statements is/are true?

(a) Shortest Job Next (SJN) is the best preemptive scheduling algorithm in terms of turnaround time

(b) First Come First Serve (FCFS) can suffer from starvation

(c) Priority scheduling is the most general scheduling algorithm

(d) None of the above.

 

2. The working set of a process

(a) is statically determined based on the code

(b) is impossible to determine at runtime

(c) can change as the process executes

(d) is set of pages in the virtual address space of the secondary memory device.

 

3. Which of the following is an advantage of Direct Memory Access (DMA)?

(a) It requires fewer memory copies

(b) Increases the speed of the CPU

(c) Increases the speed of the data bus

(d) Increases the performance of the system by allowing more things to happen at once

 

4. Which one of the following is one of the three ways in which context-switching can happen in a non-preemptive scheduler?

(a) The user code can request an I/O operation

(b) Through killing a process

(c) Restart the system process

(d) None of the above

 

5. Buffering is useful because:

(a) It makes it seem like there is more memory in the machine

(b) It allows devices and the CPU to operate asynchronously

(c) It requires fewer memory copies

(d) It increases the file system performance


Click here for Answers:

View Answer

1. – (C)

SJN is a non-preemptive algorithm. FCFS does not suffer from starvation.

2. – (C)

Working set

Working set is a concept in computer science which defines the amount of memory that a process requires in a given time interval.

3. – (D)

4. – (A)

Three ways:

1) The user code can execute a yield() system call.

2) The user code can request an I/O operation.

3) The user code can request a wait() operation for another thread (such as thread-join).

5. – (B)


*********

Related links:




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

objective type OS questions for IIT JEE entrance exam


Monday, June 15, 2020

Quiz - Memory Management in Operating System



Memory Management Quiz in Operating System

Processes/Synchronization

(Answers are in bold blue)
1. In a certain system, N processes arrive at the CPU ready queue at the same time. Which of the following scheduling algorithms will give the minimum average turnaround time of these N processes (assuming that the CPU ready queue is initially empty and that no new processes arrive at the CPU ready queue before the CPU finishes these N processes)?
a. First-Come, First-Served
b. Round-Robin
c. Shortest-Job-First

2. A process was observed to switch from running to ready state. The scheduling must be:
a. Shortest Job First
b. Preemptive
c. Non-preemptive
d. Round Robin
e. None of the above

3. In the five philosophers' problem, consider an asymmetric solution in which every odd philosopher picks up first her left chopstick and then her right one, whereas every even philosopher picks up her right chopstick and then her left chopstick is. Is this solution guaranteed to be:
a. deadlock free
b. starvation free
c. both (a) and (b)
d. none of the above

4. What is swapping?
a. Copying a process from one memory location to another to allow space for other processes
b. Copying process from disk to memory to provide page-in service
c. Copying process from/to memory to/from disk to allow space for other processes

5. Ideally, what criteria should we use to replace pages?
a. Choose the victims to achieve the highest memory utilization.
b. Choose the victims to achieve the lowest page-fault rate.
c. Choose the victims to achieve the highest disk utilization.

6. What is thrashing?
a. State where the system swap s out un-referenced pages.
b. State where the system decides that the degree of multiprogramming must be increased.
c. State where the system spends an excessive amount of time on paging, compared to the execution of processes.

7. Why use pre-paging?
a. To increase the degree of multiprogramming.
b. To reduce paging later
c. To utilize working set information.

8. In the basic memory management system, consider program A and the variable a in A with the logical address 10. The base address of A is 10 and the limit of A is 100. What is the physical address of variable 'a'?
a. 10
b. 20
c. 110
d. 120

9. Symbolic Links can span across
a. one file system
b. multiple file systems
c. both (a) and (b)

10. Let us consider 32-bit pointers throughout the UNIX operating system, and the minimal block size for a file is 4K. Then the maximum file size the user can create and access in this OS is
a. 2^32
b. 12 x 4K
c. 12 x 4K + 1024 x 4K
d. 12 x 4K + 1024 X 1024 x 4K
e. 12 x 4K + 1024 x 1024 x 1024 x 4K

*************
*Thanks to Klara Nahrstedt, University of Illinois

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

data recovery