The shortest job next sjn algorithm queues processes in a

Assignment Help Operating System
Reference no: EM13346323

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. Shortest remaining time rst algorithm (SRT) is used in real-time process management in operating systems.

Hints:

- You need to assume a list of processes that have di erent length (For the purpose of demonstration, the length may need to set to very large. You can generate the pro- cesses either manually or using random functions within your chosen programming language)

- You need to arrange the processes become ready at di erent times for the SRT algorithm.

- You need to construct a READY Queue to hold both newly arrived and the sent- back processes in the case of the SRT algorithm.

You are required to

Task 1) Produce a flowchart for the algorithm

Task 2) Implement the algorithm in a programming language that you are familiar with (e.g.C or C++).

Task 3) Run your program with three cases (each having at least ve processes) for the two algorithms.

- Each case should be run for both algorithms in order for you to make a comparison of the average turnaround time.? Record your input and output for each of the three runs (It would be preferred to display your results on computer screen.).

- Inputs should include case speci c information such as the arival time of the process and the number of CPU cycles the process takes to run to completion.

The single important output is the average turnaround time for case speci c inputs (although a repesentation of the order of processes may be useful for debugging).

Task 4)

A brief report covering your diagrams, source code, input and output for each run of your program, and a short conclusion of the algorithm including a comparison of the average turnaround times for the cases tested for the two algorithms. Also make comment on preemptive and nonpreemptive algorithms.

Reference no: EM13346323

Questions Cloud

1 solve the following linear programming problem : 1. solve the following linear programming problem graphicallymaximize 2x1 3x2subject to x1 le
Ahat is a ventures present value does the past matter : a.what is a ventures present value? does the past matter? what is meant by the statement if you are not using
1 the degreev of a pendant vertex may be either one or : 1. the degreev of a pendant vertex may be either one or zero.nbspnbspnbspnbspnbsp tnbsp ornbsp fnbsp2. a tree is any
Explain the construction of different types of power : explain the construction of different types of power transformer 1. explain with the aid of diagrams the following in
The shortest job next sjn algorithm queues processes in a : the shortest job next sjn algorithm queues processes in a way that the ones that use the shortest cpu cycle will be
A review full headers of a sample email message you : a. review full headers of a sample email message you received in your gmail account create one if you dont have one
Problem consider a trapezoidal piece of polymer film as : problem consider a trapezoidal piece of polymer film as shown below. the parallel sides of the trapezoid are insulated
Emergency planning - canadian disaster assignment topic : emergency planning - canadian disaster assignment topic edmonton tornado 1987research and write a paper on a
1 which of the following are easy to trace to individual : 1. which of the following are easy to trace to individual jobs?nbsp a. direct materials and overheadb. direct materials

Reviews

Write a Review

Operating System Questions & Answers

  Drawbacks and benefits of a peer to peer network

Describe to Champions the drawbacks and benefits of a peer-to-peer network. What can be shared between hosts?

  Determine largest value for which system is schedulable

Assume that four events need 35,20,10, and x me=sec of CPU time, respectively. Determine the largest value of x for which system is schedulable?

  Identify the differences in the code samples

Coding style is a very important part for those entering the technology field. Here are two model Java programs that do exactly the same thing according to the user.

  One page document describing security

Analyze the Internet and construct a one page document describing how security is maintained while transacting business over the Internet.

  Whenever a computer is idle

Whenever a computer is idle, we can either put it in stand by (where DRAM is still active) or we can let it hibernate. Assume that, to hibernate

  What is the internal data that allows the os to superwise

What is the internal data that allows the operating system to supervise and control the process? Be specific about what it includes.

  Describe the processes involved in the management

Identify and describe the processes involved in the management of the services, disk quotas and security of both Windows and UNIX operating systems.

  What is the predication about of the next run time?

1). An aging algorithm with a = 1/2 is used to predict run times. The previous four runs, from oldest to most recent, are 30, 10, 20, 40 msec. what is the predication about of the next run time? You may use regular arithmetic or binary with bit shift..

  Provide reasons for a slow lan

Provide possible reasons for a slow LAN, fill in why each reason causes a slow LAN and provide your solution. Each reason will take a minimum of 150 words to address thoroughly.

  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.

  How many page faults are generated using lru replacement

How many page faults are generated by the following arrayinitialization loops, using LRU replacement, and assuming page frame 1 has the process in it, and the other two are initially empty.

  Selecting correct information system for trading futures

Discuss some of the many considerations in choosing the correct information system to use for trading futures and stocks?

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