Implementation of algorithms for process management
Course:- Operating System
Reference No.:- EM13206

Assignment Help
Assignment Help >> Operating System

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.


- 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.

Put your comment

Ask Question & Get Answers from Experts
Browse some more (Operating System) Materials
1. A rectangular window with 25 terms is used to design a low pass FIR filter. The pass band edge is located at 2 kHz and the pass band gain is about 0 dB. For a samplin frequ
Describe how implementation of a RAID Level 2 system would be beneficial to a university payroll system. In your own words, describe the disadvantages of such a system, if a
Consider the following scenario involving a functional system used by the Lynx Company. The Lynx Company uses a functional system for their sales system. Identify five reaso
ABC Corporation is a small but growing manufacturing corporation with revenues of approximately $25 million. Until now, the corporation has had a single headquarters and produ
Suppose that a computer pre-fetches 20 instructions in advance. However, on the average, four of these are conditional branches, each with a probability of 90% of being pred
Compare and contrast open-source and closed-source mobile operating systems (OSs), and explain the main reasons why you would consider utilizing one (1) of these types of OS
It is now time to move forward with future coursework or graduation. Create a farewell speech that includes good memories from class and well wishes for your classmates.
Learn the commands that allow you to handle file system security -  UNIX model for file-system security - Argue that the model used by UNIX systems from the 60s is sufficient