0% found this document useful (0 votes)
7 views4 pages

Assigment 3 Specification

This assignment requires the implementation of five CPU scheduling algorithms: FCFS, SJF, SRT, RR, and PS, using a menu-driven application that reads process information from an input.txt file. Students must compute and display waiting and turnaround times for each process, as well as average times for all processes, while adhering to a specified folder structure for submission. Deliverables include source code, a statically-linked executable, a Makefile, and a README.txt with team information and execution instructions.

Uploaded by

usairashahbaz152
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Assigment 3 Specification

This assignment requires the implementation of five CPU scheduling algorithms: FCFS, SJF, SRT, RR, and PS, using a menu-driven application that reads process information from an input.txt file. Students must compute and display waiting and turnaround times for each process, as well as average times for all processes, while adhering to a specified folder structure for submission. Deliverables include source code, a statically-linked executable, a Makefile, and a README.txt with team information and execution instructions.

Uploaded by

usairashahbaz152
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Assignment 3: Implementation of CPU

Schedulers

References for this Assignment Implementation


You are provided with a detailed Assignment Specification Document, an Instructional Video, and Sample
Executable(s) to help you understand the implementation requirements for this assignment. Please follow
these guidelines carefully:

1. Your implementation must strictly adhere to this Assignment Specification Document, which serves as
the primary reference for this assignment.

2. Your implementation should precisely replicate the functionality, input handling, and output behavior
demonstrated in the instructor-provided Sample Executable(s) and explained in the Instructional
Video.

3. If you are unable to run the Sample Executable(s) for any reason, you must refer to this Assignment
Specification Document and Instructional Video to fully understand the assignment requirements.

Overview
This assignment focuses on implementing the following 5 key CPU process scheduling algorithms:

First-Come, First-Served (FCFS)

Shortest Job First (SJF) - Nonpreemptive

Shortest Remaining Time (SRT) - Preemptive

Round Robin (RR)

Priority Scheduling (PS) - Nonpreemptive

The implementation should read the process information from the input.txt file for each scheduler. Your
implementation must be menu-driven, as demonstrated in the instructor’s Sample Executable and
Instructional Video.

Your menu-driven scheduler application will continuously prompt the user to select different scheduling
algorithms for the same input until the user enters 0 to exit the application. This feature allows for a direct
comparison of the efficiency of different schedulers based on Average Turnaround Time and Average
Waiting Time. Your implementation must compute and print the following:

Waiting Time of each process

Turnaround Time of each process

Average Turnaround Time of all the processes

Average Waiting Time of all the processes

A skeleton code is provided, which you may use to complete your project by filling in the missing code. Please
note that the skeleton code is provided as a reference only. You are encouraged to follow a modular
approach in your implementation and are not required to strictly adhere to the provided structure.
Objectives
By completing this assignment, you will be able to:

1. Understand the role of CPU scheduling

2. Implement the following key CPU scheduling algorithms:

3. Analyze various CPU scheduling performance metrics such as Turnaround Time, Waiting Time, Response
Time, CPU Utilization, Throughput

4. Assess the impact of different scheduling criteria on overall system performance

5. Justify the choice of an appropriate scheduling algorithm based on workload characteristics

6. Differentiate between preemptive and non-preemptive scheduling policies

Testing
You must thoroughly test your implementation using various inputs. A good starting point would be the
examples provided in the textbook and lecture slides, particularly those with different arrival times.

Please adhere to the specified format of input.txt , as this function skips the first two lines, which are
meant for user readability.

Important Points:
1. Your implementation will be tested with the exact same input.txt file, following the same format,
where the first two lines must be skipped. The four columns in the file represent:

Process ID

CPU Burst Time

Process Priority

Process Arrival Time

2. Only the Priority Scheduling - Nonpreemptive algorithm should consider the Process Priority
from input.txt . All other scheduling algorithms must ignore it!

Deliverables
Submit a single A3_Deliverables.zip file containing the following:

1. A CODE Folder

The CODE folder must include:

Source Code

All .c files and any optional .h header files used in your project.

Statically-Linked Executable

Provide statically-linked executable for your scheduler implementation that is ready to be run.

If you are using non-Linux computer, explore ways to generate a statically-linked executable by
compiling your final source files on a Linux computer. For example:
gcc scheduler.c -static -o scheduler -lm

Alternatively, explore online C compilers capable of generating statically-linked executables.


Make file

Provide a Makefile that supports the following commands:

make : Compiles the project and generates one executable file named scheduler for your
implementation.

make clean : Removes all object files, executable, and any temporary files generated during the
build process.

2. A README.txt File

The README.txt file must include:

Team Member Information

Section Name, Full Name, PID, FIU email of all team members.

Compilation and Execution Instructions

Include any specific guidelines, notes, or considerations about the project implementation.

*** Please refer to the course syllabus for additional assignment submission requirements and guidelines.

Deliverables Folder Structure


You are required to strictly adhere to the following structure for the A3_Deliverables.zip file when
submitting the assignment.

A2_Deliverables.zip
|-- CODE/
| |-- *.c # All .c source files
| |-- *.h # Any optional header files
| |-- Makefile # Makefile with commands: make and make clean
| |-- executable # Statically linked executable files ‘client’ and ‘server’ of your implementation.
|-- README.txt # Includes team details and any specific compilation instructions

Grading Rubric
Criteria Marks

No Makefile 0

No Menu Driven Implementation 0

Cannot Generate/Run Executables 0

Cannot Read and Process Process Data from input.txt in the same format 0

Partial Implementation (Based on completeness) 0 - 70


Detailed Breakdown of 100 Marks

Category Functionality Marks

(1). Scheduler Implementations FCFS 15

SJF 15

SRT 25

RR 20

PS 15

Total of (1) 90

(2). Code Quality, Documentation, README Total of (2) 10

Guidelines and Important Notes


Thoroughly refer to the Assignment Specification Document, Instructional Video, and Sample
Executables to understand the required implementation details.

Use debugging tools like gdb to effectively identify and troubleshoot issues.

Consult man pages ( man <command> ) for detailed information and usage of library functions.

Additional Resources
1. GDB (GNU Debugger):

Official GDB Documentation

2. Strace

strace Project Page

You might also like