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

  Discussion on operating systems

In recent computer trend sources, it has been discussed that the OS are likely to become more user friendly, voice driven, stable, and even will repair themselves when required.

  Describe the fundamental components of a distributed system

Compare and contrast the advantages and disadvantages of at least 2 distributed system architectures.

  Point to point and end to end security models

Argue differences in point to point and end to end security models and security problems they address. Are they redundant?

  Determine values of it industry certifications

Discuss briefly how IT certification works. What business arenas are IT certifications needed, security, or what technical problem is IT certification designed to solve?

  Roles of network managers

In Many development companies and universities network managers must oversee a network that has several computers connected to it that are used through developers for design and product development reason.

  Creating the source code and flowchart

Construct a C program that displays a title, "Hello World." Insert comments in the event to document the program internally. Attach a design flow chart.

  Clock drift results in error

Think about a frame being sent using synchronous transmission. Suppose that samples are taken at the middle of the bit period and that the clocks are synchronized at the starting of each frame.

  Write a short report on page replacement algorithms

Select one of two possible short reports,  Subject 1. Page Replacement Algorithms and Block Caching,  Subject 2. Storing Blocks and Remembering Where You Stored Them

  Show the contents of a single environment variable

CIS 240 - What command would you use to remove job number 5 from your default print queue and what is the absolute pathname of the file which defines aliases available to ALL users?

  Describe how to prevent race condition from occurring

Function and wife calls deposit (). Explain how a race condition is possible and what might be done to prevent race condition from occurring.

  Write program to simulate operations of an operating system

Your team programming assignment is to write a program to simulate the operations of an Operating System as it processes a stream of incoming processes.

  Question about backbone structure

Suppose you have been hired by a mail order firm to install a backbone structure that will connect four LANs and provide a connection to the Internet.

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