You will implement a framework for job scheduling in a multiprocessor environment. You will examine three non-preemptive scheduling algorithms: First-Come-First-Served (FCFS), Priority and Shortest Job First (SJF). assume that all jobs arrive to a central scheduler and are placed into a central priority queue that contains the jobs in the order that they should be scheduled. When a multiprocessor finishes its current job, it schedules the next job by removing it from the centralized queue. Your assignment is to implement each of the three scheduling algorithms mentioned above for a multiprocessor system. Your implementation will simulate the execution of jobs. To do this, you will implement a dedicated thread for the central scheduler and a thread for each multiprocessor in the [url removed, login to view] multiprocessor thread removes a job from the centralized queue and “processes?? the job according to its time [url removed, login to view] the job has “finished?? execution, the multiprocessor thread removes the job from the system and handles another job. Call your file [url removed, login to view] The input command line format should be as follows (where sched is the name your executable): sched [-v] -[FCFS|P|SJF] ??"n[num_processors] Where the command-line flag FCFS is first-come-first-served, P is priority and SJF is shortest job first. The -v option indicates a verbose output mode. The ??"n option indicates how many processors are in the system. is the name of the input file whose format is as follows. Input Format: The first line of the file contains N, the number of total jobs in the system. All additional lines in the file (no more than 100) must contain the description of one job per line where each line has the following fields (all fields are integers, separated by the tab character) in the following order: id,arrival time,comptime,priority In the default mode (i.e., without the -v flag), the output consists of (1) the completion time of each job, and (2) the CPU utilization of each processor. In verbose mode, in addition to the above information, your program should display the complete job state transition information as in the following example (assume FCFS scheduling). At time 0 job 0 is scheduled on multiprocessor 0. At time 10 job 0 exits the system. functions: add_queue(job_node, sched) remove_queue() get_number_jobs() get_jobs() schedule_jobs() better description to follow
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 1. A README file with a brief description of your program and your synchronization strategy. In addition, the first line of the README should indicate the number of SLIP days used for this project and the number of SLIP days that you have used overall. 2. A Makefile that allows us to compile the code by typing "make all". Your Makefile should compile programs using g++ or gcc with the -Wall flag ("warn all") included. Programs should compile without error or warning with the -Wall flag. 3. Executables sched and [url removed, login to view] and any additional files that you use. 4. A short report (maximum of 5 pages) that consists of the following parts: a. Describe your testing/validation strategy. Your testing strategy should be designed to check that the simulator is producing the correct results. At a minimum, you are required to describe a simple set of input parameters and your hand-computed set of expected results, and to verify that your simulator is in fact working correctly. Additional systematic testing (as suggested above) is strongly recommended. b. Run the same input on all three schedulers using 1 processor, 2 processors, and 4 processors, respectively. Describe how processor utilizations and job waiting times are affected for each scheduler on the various number of processors. How do different arrival times affect multiprocessor utilization and job waiting times for each scheduler? c. Experiment with your scheduling system under the following conditions. Suppose you have 4 processors. Processor 0 executes a 4 time unit job in 1 time unit. Processor 1 executes a 4 time unit job in 2 time units. Processors 2 and 3 both execute a 4 time unit job in 4 time units. What is the effect of the varied computational requirements on the different schedulers? How do these different system requirements change multiprocessor utilization and job waiting times? Explicitly state any assumptions that you must make. 3) Complete ownership and distribution copyrights to all work purchased.
needs to compile on a G++ compiler in a Unix enviorment.