The project will consist of creating a simulation of an operating system scheduler handling multiple threads or processes. The student will create a program that launches 6 - 10 worker threads simulating a processor bound, I/O bound and an intermediate of the two types. The program will schedule the tasks using the First-Come, First-Served (FCFS), Shortest Job First, and Round Robin scheduling algorithms. The Program should be written in Java and the Round Robin algorithm should employ the suspend() and resume() thread methods.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

import java.util.*;

public class CPUBound {

    * @param args the command line arguments

    public static void main(String[] args) throws InterruptedException {
       // TODO code application logic here
       HandlingQueue hq = new HandlingQueue();
       System.out.println("First come first served algorithm");
       System.out.println("Creating threads");
       hq.mode = 0;
       for (int i = 0; i < 6; i++)
            ThreadClient threadClient = new ThreadClient();
            threadClient.ID = i;
            threadClient.executionTime = (6 - i) * 100000000;
            System.out.println("Thread " + i + " created.");
       while (hq.mode != 3)
            //System.out.println("mode = " + hq.mode);
$25.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Operating Systems Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats