Simulating the cpu scheduling for a computer architecture

Assignment Help Operating System
Reference no: EM13347212

Simulating the CPU scheduling for a computer architecture with 64K of memory and 3 I/O devices. Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

The data will be a list of processes. For each process, you will be given the job number, the amount of memory required to run the process, the time the process arrives into the long-term scheduling queue, the number of the I/O device to be used and the CPU and I/O bursts for the process. All values will be integer values. The first line of data will contain the job number, the memory requirements, the arrival time and the I/O device number. After those values, the CPU and I/O bursts will be given and will be terminated by a value of -1.

Note the bursts will be alternating between CPU and I/O bursts, and the first and last bursts will always be CPU bursts. The following is an example of data for a single process:

2 18 4 2

5 16 6 9 2 12 4 8 2 15 6 -1

The above process has job number 2, requires 18K of memory, arrives at time 4, uses I/O device number 2, has 6 CPU bursts (of length 5, 6, 2, 4, 2 and 6) and 5 I/O bursts (of length 16, 9, 12, 8 and 15). You may assume that any process will have fewer than 100 total bursts (CPU and I/O bursts combined). The times are in milliseconds. The data will be given so the processes are sorted by arrival time.

Your program must directly read the data from the file "mp1.data" that will be in the same directory as the program. While the program is running, you are to print information about the system on the screen. This information must include your name, the current time of the simulation, the amount of available memory, a list of processes that have been submitted but have not been selected by the long term scheduler (call this the job pool), the processes currently using the CPU and each of the I/O devices and the processes waiting for the CPU and each of the I/O devices. After all processes have completed, you are to print out the following information for each process: the arrival time of the process, the time the process is selected by the long-term scheduler, the time the process terminates, the turnaround time for the process and the wait time for the process. After this has been printed, you are to print the average wait time for all processes. This information is to be directly printed to the file "mp1.report" that will be in the same directory as your program.

Your simulation is to assume that no time is spent to execute the various scheduling algorithms and no time is spent switching to a wait queue. The assignment is expected to be the result of team work.

Your program must be able to run in two modes: automatic mode and step mode. Automatic mode will allow your program to continuously run through the simulation without any interference/interaction from the user. When the program starts, ask the user If they wish to enter automatic mode of step mode.

Reference no: EM13347212

Questions Cloud

Write a two page paper based on the movie high plains : write a two page paper based on the movie high plains drifter by clint eastwood.the paper should be a reflection of the
Question 1if your goal was to construct a network in which : question 1if your goal was to construct a network in which all points were connected and the total distance between
Case study law firm mobile device security managementbull : case study law firm mobile device security managementbull access documents during deposition amp hearing on smart
Question 1the current yield on a 5000 8 percent coupon bond : question 1the current yield on a 5000 8 percent coupon bond selling for 4000 is5.8.10.20.none of the above.question
Simulating the cpu scheduling for a computer architecture : simulating the cpu scheduling for a computer architecture with 64k of memory and 3 io devices. simulate the long-term
Prepare a presentation on information systems and : prepare a presentation on information systems and organizational changesfirst it is important to understand what
Article review financial statements financial planning and : article review financial statements financial planning and growth time value of moneydiscounted cash flow valuation
Executive summary the report analyzes the love canal : executive summary the report analyzes the love canal disaster case of in niagara falls new york. love canal used by the
Assignment write a term paper on role of the government in : assignment write a term paper on role of the government in the financial markets or analysis of the federal

Reviews

Write a Review

Operating System Questions & Answers

  Show the bitmap

Show the bitmap after:a) File B is written, using 3 blocks b) File A is deleted. c) File C is written, using 4 blocks

  Design virtual memory system for new operating system

You are asked to design the virtual memory system for a new operating system working on small mobile devices. The memory operates at 333 MHz with a word size of 4 bytes.

  Direct mapped cache- word, block, tag

Think about a byte addressable computer with twenty-four bit addresses, a cache capable of storing a total of 64KB of data, and blocks of 32 bytes.

  Integrity without confidentiality

Determine the difference between message confidentiality and message integrity? Can you have confidentiality without integrity?

  What is average rotational latency if seek time is given

5 Disk, seek time, latency, sector, request Single-platter disk rotation speed: 7200 rpm number of tracks on one side of platter. What is avg rotational latency?

  Consider a web server with one cpu that serves web requests

Consider a web server with one CPU that serves web requests; each web request requires 3 (time) units of CPU processing and 9 (time) units to read data from disk.

  Globalization effect on culture

There is a host of sociological and cultural analysis that paints a robust picture of the effects of globalization on culture.

  Combining global variables and functions

The parameter list is the normal means to supply values to a function. Global variables are an alternate means for a function to have access to values.

  Organization institutionalizes policies

The answer gives the learner with an understanding of management's role in the development and enforcement of data security policies, standards, practices, precess and guidelines.

  C language code that reads a lowercase

Required some guidance writing a program in C code that reads a lowercase string of characters from a text document named "data.txt",

  A data structure call the gold pile and d gold-diggers

Consider a computer game that is played as follows. You have G gold-makers each of which at random times produce one unit of gold and adds it to a data structure call the goldpile and D gold-diggers each of which can grab one unit of gold from the go..

  Value of semaphore before entering into critical section

Give a solution using Monitor that is starvation-free. What would be value of semaphore before entering into Critical Section and after leaving it.

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