Explain how the processes are scheduled

Assignment Help Operating System
Reference no: EM131917287

Assignment: Operating Systems

Answer the following:

1. Consider a preemptive priority scheduling algorithm based on dynamically changing priorities. Greater priority numbers imply higher priority. When a process is waiting for the CPU (in the ready queue, but not running), its priority changes at a rate R; when it is running, its priority changes at a rate E. All processes are given a priority of 0 when they enter the ready queue. Explain how the processes are scheduled (that is, how they are ordered, or, what type of scheduling algorithm is this) when R < E < 0. Explain your answer.

2. Measurements of certain system have shown that the average process runs for a time R before blocking for an I/O. If processes on the system are scheduled using the round-robin algorithm with quantum time Q, where Q < R, then derive an expression for CPU efficiency. It is known that the context-switch time on the system is X (which is < Q).

(Hint: CPU efficiency can be calculated as actual execution time/total time, where total time includes all context switch overheads and execution.)

3. Consider the following codes of two processes sharing a variable turn that is initialized to 1.

a. Does this satisfy mutual exclusion condition? Explain.
b. Is it a good solution to critical region problem? Explain.

Process P0

Process P1

/* other code */
while (turn != 0){  } /* wait */
update();  /* critical region */
turn = 0;
/* other code */

/* other code */
while (turn != 1){  } /* wait */
update();  /* critical region */
turn = 1;
/* other code */

4. Suppose there are two processes - i and j, sharing variables turn and flag[2]. Consider the following code for process i. Process j has similar code.

do {
flag[i] = true;
while (flag[j]) {
if (turn == j) {
flag[i] = false;
while (turn == j); /* do nothing */
flag[i] = true;
}
}

critical_task(); /* critical region */

turn = j;
flag[i] = false;

other_tasks(); /* remainder section */
}while (true);

Explain whether the above solution satisfy all conditions of critical region problem for two processes.

Reference no: EM131917287

Questions Cloud

Aqueous potassium hydroxide solution : What is the pH at the equivalence point in the titration of a 22.1 mL sample of a 0.390 M aqueous acetic acid solution
Determine the ph change : Determine the pH change when 0.090 mol KOH is added to 1.00 L of a buffer solution that is 0.384 M in HCN and 0.385 M in CN-.
Balance sheet is financial statement that : An intangible asset is. A balance sheet is a financial statement that:
Identify a multinational firm that conducts business : Identify a multinational firm that conducts business with suppliers in developing countries. Find its code of vendor conduct on its website.
Explain how the processes are scheduled : Explain how the processes are scheduled (that is, how they are ordered, or, what type of scheduling algorithm is this) when R
Write a three page reflection on the experience : Analyze a religious ritual, to infer the role of art and artistic expression in the event. Explain issues involved in inter-religious conflict, dialogue .
What type of solution does jasmine have : a. What type of solution (Saturated, unsaturated, supersaturated does mack have?
Why globalization is a catalyst for bringing world peace : Thomas Friedman in his 2005 book, The World Is Flat: A Brief History of the TwentyFirst Century, argues that countries with connected manufacturing supply.
Rephrase the content of magazine : They also implement the WiFi Library solution, which available at certain shopping malls in Singapore to allow consumers to access easily.

Reviews

Write a Review

Operating System Questions & Answers

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd