Implementation and effects of different scheduling policies

Assignment Help Operating System
Reference no: EM131312840

Programming Assignment Lab: Scheduler/Dispatcher

You are to implement a Scheduler in C, C++ and submit the source code, which we will compile and run. Both are to be delivered to the TA as source code through NYU Classes assignment. The submission must include a Makefile for building your code.

In this lab we explore the implementation and effects of different scheduling policies discussed in class on a set of processes/threads executing on a system. The system is to be implemented as a Discrete Event Simulation (DES) (https://en.wikipedia.org/wiki/Discrete_event_simulation). In discrete-event simulation, the operation of a system is represented as a chronological sequence of events. Each event occurs at an instant in time and marks a change of state in the system. This implies that the system progresses in time through defining and executing the events (state transitions) and by progressing time discretely between the events as opposed to incrementing time continuously (e.g. don't do sim_time++"). Time stamped events are removed from the event queue and new events might be created during the simulation.

A process is characterized by 4 parameters: 

Arrival Time (AT), Total CPU Time (TC), CPU Burst (CB) and IO Burst (IO).

Note, you are not implementing this as a multi-program or multi-threaded application. By using DES, a process is simply an object that goes through discrete state transitions; in the object you maintain the state and statistics of the process as the OS would do.

We make a few simplifications: 

(a) All time is based on integers not float, hence nothing will happen or has to be simulated between integer numbers;

(b) To enforce a uniform repeatable behavior, a file with random numbers is provided (see website) that your program must read in and use (note the first line defines the count of random numbers in the file) a random number is then created by using:

"int myrandom(int burst) { return 1 + (randvals[ofs] % burst); }"

You should increase ofs with each invocation and wrap around when you run out of numbers in the file/array. It is therefore important that you call the random function only when you have to, namely for transitions 1 and 3 (with noted exceptions) and the initial assignment of the static priority.

(c) IOs are independent from each other, i.e. they can commensurate concurrently without affecting each other's IO burst time. 

Deterministic Behavior:

There will be scenarios where events will have the same time stamp and you must follow these rules to break the ties in order to create consistent behavior:

(a) On the same process: termination takes precedence over scheduling the next IO burst over preempting the process on quantum expiration

(b) Processes with the same arrival time should be entered into the run queue in the order of their occurrence in the input file.

(c) Events with the same time stamp (e.g. IO completing at time X for process 1 and cpu burst expiring at time X for process 2) should be processed in the order they were generated, i.e. if the IO start event (process 1 blocked event) occurred before the event that made process 2 running (naturally has to be) then the IO event should be processed first. If two IO bursts expire at the same time, then first process the one that was generated earlier.

(d) You must process all events at a given time stamp before invoking the scheduler/dispatcher.

Not following these rules implies that fetching the next random number will be out of order and a different event sequence will be generated. The net is that such situations are very difficult to debug (see for relieve further down).

Attachment:- Assignment.rar

Reference no: EM131312840

Questions Cloud

Yield structure on corporate bonds pattern of treasury bonds : Is the yield structure on corporate bonds following the pattern of Treasury bonds? Meaning do they follow the same yeild structure? Are rates at historically low levels? Have these rates had any discernible effect on corporate investing/spending?
Approach of an organization : Analyze the manner in which a CIRT plan fits into the overall risk management approach of an organization and how it supports other risk management plans.
List the four inputs needed to value a bond : List the four inputs needed to value a bond ? When valuing a zero-coupon bond, why are semiannual periods used in discounting?
What is the npv of the replacement project : General Engine Corp. (GEC) has just finished minor renovations on their office building at a cost of $150,000. GEC originally allocated only $100,000 for this renovation. A memo from accounting suggests that the $50,000 cost overrun should be charged..
Implementation and effects of different scheduling policies : In this lab we explore the implementation and effects of different scheduling policies discussed in class on a set of processes/threads executing on a system. The system is to be implemented as a Discrete Event Simulation
Summarize the video and the main themes contained in it : Summarize the video and the main themes contained in it.Connect these themes to what we have covered and what you gave learned during the course.
Estimate the total cost for the project : Estimate the costs for the resources, and add the costs to the resource information in the Microsoft Project file. Estimate the total cost for the project, using the Microsoft Project budget or cost reports.
Difference between bonds current yield and yield to maturity : Why may a bond's price change simply because of the passage of time?.- What is the difference between a bond's current yield and its yield to maturity?
Implement the sparse life grid adt : minRange(): Returns a 2-tuple (minrow, mincol) that contains the minimum row index and the minimum column index that is currently occupied by a live cell.

Reviews

len1312840

12/15/2016 1:58:12 AM

I have a stub version with step by step introduction and I only need some detailed implementation for that. In this lab we explore the implementation and effects of different scheduling policies discussed in class on a set of processes/threads executing on a system. The system is to be implemented as a Discrete Event Simulation (DES) In discrete-event simulation, the operation of a system is represented as a chronological sequence of events. Each event occurs at an instant in time and marks a change of state in the system. This implies that the system progresses in time through defining and executing the events (state transitions) and by progressing time discretely between the events as opposed to incrementing time continuously.

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