Multiple Choice Quiz Question

FastPacedGiant avatar
FastPacedGiant
·
·
Download

Start Quiz

Study Flashcards

Questions and Answers

What is the difference between preemptive and non-preemptive scheduling? Provide an example for each.

Preemptive scheduling allows the operating system to interrupt a process, while non-preemptive scheduling does not. An example of preemptive scheduling is Round Robin, while an example of non-preemptive scheduling is First Come First Serve.

Define semaphore and mention two types of semaphores.

A semaphore is a synchronization construct used to control access to a common resource. Two types of semaphores are binary semaphore and counting semaphore.

Explain what a race condition is in the context of operating systems.

A race condition occurs when two or more processes or threads attempt to change shared data at the same time, leading to unpredictable outcomes.

What are the various ways of aborting a process to eliminate deadlocks?

<p>Processes can be aborted to eliminate deadlocks by using techniques such as killing all involved processes, killing one process at a time until the deadlock is resolved, or using a timeout mechanism.</p> Signup and view all the answers

Explain the concept of threading in operating systems.

<p>Threading involves dividing a process into multiple simultaneous execution paths to improve application responsiveness and performance.</p> Signup and view all the answers

Explain the dining-philosopher problem and devise an algorithm to solve it using semaphores.

<p>The dining-philosopher problem involves multiple philosophers sitting at a table with forks. They must acquire two forks to eat, but deadlocks can occur. An algorithm to solve this involves using semaphores to control access to the forks, ensuring that each philosopher can only pick up both forks if they are both available.</p> Signup and view all the answers

Illustrate the five major activities of an operating system in regard to process management.

<p>The five major activities of an operating system in process management are: process creation, process scheduling, process termination, process synchronization, and interprocess communication.</p> Signup and view all the answers

Define external fragmentation and list the causes for external fragmentation.

<p>External fragmentation occurs when free memory is divided into small blocks that are too small to fit new processes. Causes include variable-sized memory allocation, processes exiting before they complete, and inefficient memory management.</p> Signup and view all the answers

Explain the need for hardware I/O interface.

<p>The hardware I/O interface is needed to facilitate communication between the CPU and peripheral devices. It manages the input and output operations of the computer system.</p> Signup and view all the answers

Define the various scheduling algorithms used in operating systems.

<p>Scheduling algorithms in operating systems include First-Come, First-Served (FCFS), Shortest Job Next (SJN), Round Robin, Priority Scheduling, and Multilevel Queue Scheduling.</p> Signup and view all the answers

More Quizzes Like This

Use Quizgecko on...
Browser
Browser