Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Operating System Expert

Operating Systems Assignment

Processor Scheduling

Processor scheduling is aimed to assign processes to be executed by the processor (or processors) in order to achieve certain operating system objectives, such as response time, turnaround time, throughput, and processor efficiency. Scheduling generally affects the overall performance of a system as it determines which process should wait and which process should proceed for execution. Hence, scheduling algorithms are designed to manage queues of processes with the purpose to minimise the queing delay and to optimise the system performance.

The aim of this assignment is to implement and simulate the performance of three different scheduling algorithms and to observe the effects of each of these scheduling algorithms on the overall system performance.

All the programs should be implemented on the Unix operating system with either C or Python language.

Running your program with an input file

For each program implemented for the tasks below, it should take an input file as a command line input. You may name the input file as processes.txt, for example.

Note that the input file should have the following structure: the first column contains the process ID; the second column indicates the arrival time (in seconds) of each process in the Ready queue; and the last column refers to the total processing time (in seconds) required for the corresponding process. Assume that all these processes are processor- bound only (i.e. no I/O operations are involved).

P1

0

3

P2

1

6

P3

4

4

P4

6

2

Task 1: First-Come-First-Served Scheduling

In the first task, you will implement the simplest scheduling algorithm that based on the first-come-first-served (FCFS) approach. With this strict queuing scheme, the process that first arrives in the Ready queue is the first to be allocated with the processor for execution. In other words, when the currently running process completes its execution, the next process to be selected for execution is the one that has been in the Ready queue for the longest. This is a non-preemptive algorithm.

Your implementation for the FCFS scheduling should compute and output the following:

• Turnaround time and waiting time for each process
• Average turnaround time and average waiting time for all the processes
• Overall throughput of the system (i.e. the number of processes completed per second)

Task 2: Round Robin Scheduling

For the second task, you will implement a pre-emptive scheduling algorithm that based on the Round Robin (RR) approach. Processes in the Ready queue are still scheduled on the first-come-first-served basis; however, each process is assigned with a fixed time quantum for execution. Upon the given time quantum elapsed, the currently running process is preempted by the scheduler and placed to the end of the Ready queue. The next process in the Ready queue will be selected for execution; and this continues until all jobs complete its execution. (For the purpose of this assignment, assume that the time quantum is set to 2 seconds.)

As in Task 1, your implementation for the RR scheduling should compute and output the following:

• Turnaround time and waiting time for each process
• Average turnaround time and average waiting time for all the processes
• Overall throughput of the system (i.e. the number of processes completed per second)

Task 3: Shortest Remaining Time Scheduling

The third scheduling algorithm that you will implement is based on the Shortest Remaining Time (SRT) concept. With this algorithm, the process with the shortest expected remaining processing time is always chosen by the scheduler. For each new process that arrives in the Ready queue, it may have a shorter remaining time than the currently running process. As such, the scheduler may preempt the currently running process and promote the newly arrived process for execution. (If two processes shared the same shortest remaining processing time, the FCFS approach is used for breaking the tie.)

Your implementation for the SRT scheduling should again compute and output the following:

• Turnaround time and waiting time for each process
• Average turnaround time and average waiting time for all the processes
• Overall throughput of the system (i.e. the number of processes completed per second)

Task 4: Discussion

For this final task, based on the results presented by each scheduling algorithm, discuss what you may observe on the overall system performance. For example, which algorithm gives a shortest waiting time or a shortest turnaround time on average, or with a better system throughput?

Other discussion may include which algorithm is in favour of either the shorter processes or the longer processes.

Important Notes

Commenting your code is essential as part of the assessment criteria. You should also include comments at the beginning of your program file, which specify your name, your Student ID, the start date and the last modified date of the program, as well as a high- level description of the program. In-line comments within the program are also part of the required documentation.

Submission

There is NO hard copy submission required for this assignment. You are required to submit your assignment as a .zip file named with your Student ID. For example, if your Student ID were 12345678 then you would submit a file named 12345678_A3.zip. Marks will be deducted if this requirement is not strictly complied with.

Deliverables

Your submission should contain the following:

• A completed Assignment Cover Sheet. This document is available for download from the Assignment Section of the FIT2070 Moodle website.

• A documentation in MS Word or PDF format, stating:

1. Clear and complete instructions on how to install and run your programs.
2. Discussion on the system performance with different scheduling algorithms (i.e. Task 4).

• Electronic copies of ALL your files that are needed to run your programs.

Marks will be deducted for any of these requirements that are not strictly complied with.

Operating System, Computer Science

  • Category:- Operating System
  • Reference No.:- M92079200

Have any Question?


Related Questions in Operating System

Question research hex editors available for mac os and

Question : Research hex editors available for Mac OS and Linux. Based on the documentation, how easy would validating these tools be? Select at least two hex editors for each OS, and discuss what you would do to validate ...

Question 1answer the following questions 10 marks a

Question 1 Answer the following questions: 10 marks a. Consider the following page reference string: 3, 1, 4, 1, 2, 3, 5, 3, 2, 1, 2,5, 4, 3, 5, 2, 4,2, 5,3 Using the above page reference string display the contents of t ...

Question students working at individual pcs in a computer

Question : Students working at individual PC's in a computer laboratory send their files to be printed by a server that spools the files on its hard disk. Under what conditions may a deadlock occur if the disk space for ...

Question description of lasa in this assignment you will

Question: Description of LASA: In this assignment, you will select a real-world operating system (can be for a PC, server, tablet, handheld, or embedded device). You will introduce the operating system and its components ...

Taskyour job in this assignment is to create two virtual

Task Your job in this assignment is to create two Virtual machines each running a different but the latest distribution of Linux e.g. Ubuntu Server and CentOS. Each of these VM's is to offer services to a user base. The ...

Question note apa format 250 words and three reference

Question: Note: APA format 250 words and three reference without plagarism Computerized Operating Systems (OS) are almost everywhere. We encounter them when we use out laptop or desktop computer. We use them when we use ...

State the required answer precisely and then provide proper

State the required answer precisely and then provide proper explanation. It is not enough to provide one- word or one-line answers. Briefly describe the following concepts and indicate how they are related in the context ...

State the required answer precisely and then provide proper

State the required answer precisely and then provide proper explanation. It is not enough to provide one- word or one-line answers. Consider a computer embedded in the control of a manned spacecraft. Would it require an ...

Discussion question this research assignment will give

Discussion Question : This research assignment will give further information on the nature and workings of multi-tasking and multi-processing operating systems. All information reported in this assignment is to be in the ...

Foundation of information technologyresearch types of

Foundation of Information Technology Research types of operating systems that are currently available and provide a scenario in which the operating system you chose would be appropriate to be used in this situation. Expl ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As