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

  How would you address accessibility issues in a multimedia

How would you structure a questionnaire to discover how usable a web-site is? What would your criteria be and why?

  Question about affiliate programs

Many companies are using affiliate programs to drive traffic to their Web sites. explain what an affiliate program is and how it works.

  Question 1athe salaries of employees of a firm are found to

question 1athe salaries of employees of a firm are found to be follow a normal distribution of mean rs 13 500 and

  Calculate effective access time of system

Assuming fetches to main memory are started in parallel with look-ups in cache, calculate the effective (average) access time of this system.

  Demonstrate various page replacement algorithms

Demonstrate various page replacement algorithms - Calculate the number of page faults and display an output

  What is the overall big-o of this algorithm?

What is the overall Big-O of this algorithm?

  Differentiating internal and external fragmentation

Explain the difference between internal fragmentation and external fragmentation. Which one occurs in paging system? Which one occurs in system using pure segmentation?

  Business continuity planning

Business continuity planning is important for large and small company. Explain briefly the importance of a business continuity plan under the given heads.

  Install a wireless lan network in an organization

Discuss and explain reasons that might make it favorable or unfavorable to install a Wireless LAN network in an organization over a traditional wired network.

  Assignment on cloud computing

Summarize a paper on cloud computing.

  What scheme does the kernel in unix system v follow

What scheme does the Kernel in Unix System V follow while choosing a swap device among the multiple swap devices? 2) What is a Region?

  Find the solution x mod 45 to the equations

Simplified Chinese remainder theorem:-  Find the solution x mod 45 to the equations x = 3 mod 5 and x = 1 mod 9.

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