Instruction: i. Odd roll nos. are assigned odd no. question: i.e.
Q1 and Q3
ii. Even roll nos. are allocated even question no.: i.e. Q2 and Q4
Simulation Based Assignment 1
You are a computer systems engineer working at a large technology company. Your manager has
tasked you with creating a simulation program to test the performance of the Round Robin scheduling
algorithm. The simulation program should generate a set of "processes" with random arrival times and
CPU burst times, and should run the Round Robin algorithm for a set amount of time (e.g. 100 time
units). The program should record the average waiting time and turnaround time for each process, and
should compare the results with the ideal scenario of a perfect scheduler.
Your manager is interested in the results of the simulation to evaluate how well the Round Robin
algorithm would perform in a real-world scenario, and to identify any potential issues that need to be
addressed. She has given you one week to complete the simulation and to prepare a report of your
findings and conclusions. As a computer systems engineer, you will need to:
a) Design and implement the simulation program using a programming language of your choice.
b) Generate a set of "processes" with random arrival times and CPU burst times using a random
number generator.
c) Implement the Round Robin scheduling algorithm in the simulation program.
d) Have the simulation program run for a set amount of time (e.g. 100 time units) and record the
average waiting time and turnaround time for each process.
e) Compare the results of the simulation with the ideal scenario of a perfect scheduler.
f) Write a report of the findings and conclusion with the comparison of the results of the round
robin scheduling algorithm with other scheduling algorithms such as First Come First Serve
(FCFS)
Simulation Based Assignment 2
You are a computer systems engineer working at a large technology company. Your manager has
tasked you with creating a simulation program to test the performance of the Shortest Job First
scheduling algorithm. The simulation program should generate a set of "processes" with random
arrival times and CPU burst times, and should run the Shortest Job First scheduling algorithm for a set
amount of time (e.g. 100 time units). The program should record the average waiting time and
turnaround time for each process, and should compare the results with the ideal scenario of a perfect
scheduler.
Your manager is interested in the results of the simulation to evaluate how well the Shortest Job First
scheduling would perform in a real-world scenario, and to identify any potential issues that need to be
addressed. She has given you one week to complete the simulation and to prepare a report of your
findings and conclusions. As a computer systems engineer, you will need to:
a) Design and implement the simulation program using a programming language of your choice.
b) Generate a set of "processes" with random arrival times and CPU burst times using a random
number generator.
c) Implement the Shortest Job First scheduling algorithm in the simulation program for both pre-
emptive and non-pre-emptive processes.
d) Have the simulation program run for a set amount of time (e.g. 100 time units) and record the
average waiting time and turnaround time for each process using both pre-emptive and non-
pre-emptive processes.
e) Compare the results of the simulation with the ideal scenario of a perfect scheduler.
f) Write a report of the findings and conclusion with the comparison of the results of the
Shortest Job First scheduling algorithm with other scheduling algorithms such as First Come
First Serve (FCFS) and Round Robin.
Simulation Based Assignment 3
Student to implement a simulation program that simulates a computer's memory management system.
The program should include a memory manager that uses a specific memory allocation algorithm (e.g.
First-Fit, Best-Fit, or Worst-Fit) to allocate blocks of memory to processes. The students should also
include a mechanism for de-allocating memory when a process completes. The simulation should run
for a set amount of time and record the average amount of fragmentation and the number of wasted
memory blocks at the end of each time unit. The below mentioned outcomes are expected:
a. Memory allocation: The program should demonstrate the ability to allocate blocks of memory
to processes using the chosen memory allocation algorithm (e.g. First-Fit, Best-Fit, or Worst-
Fit).
b. Memory de-allocation: The program should include a mechanism for de-allocating memory
when a process completes, such as a "garbage collector" or a "free list."
c. Fragmentation: The program should record the average amount of fragmentation at the end of
each time unit. Fragmentation occurs when there are small, unused blocks of memory
scattered throughout the memory space.
d. Wasted memory: The program should also record the number of wasted memory blocks at the
end of each time unit. Wasted memory refers to blocks of memory that are no longer being
used by any processes.
e. Simulation results: The program should run the simulation for a set amount of time and
display the results, including the average amount of fragmentation and the number of wasted
memory blocks, at the end of each time unit. The students should also experiment with
different input scenarios and algorithms to compare the results and see how different factors
affect the performance of the memory manager.
Simulation Based Assignment 4
Scenario: A company has a large number of employees who work on various projects and create
different types of files such as documents, spreadsheets, and images. The company wants to
implement a new file system that can manage the disk space efficiently and handle the high volume of
file operations.
Problem: Create a simulation program that simulates a file system for the company. The program
should include a file system manager that uses a specific file allocation algorithm (e.g. Contiguous
Allocation or Linked Allocation) to allocate space for files on a simulated disk. The students should
also include a mechanism for deleting, renaming and moving files. The simulation should run for a set
amount of time and record the average amount of fragmentation and the number of wasted disk blocks
at the end of each time unit. The students should also consider the following factors in their
simulation:
• The employees will be creating and editing different types of files (e.g. documents, spreadsheets,
images) with varying file sizes.
• The employees will be frequently adding and deleting files.
• The company wants to minimize the amount of wasted disk space. At the end of the simulation, the
students should provide a report on their findings and observations, including the performance of the
file system under different scenarios and the trade-offs involved in the different file allocation
algorithms.
Expected outcomes:
a) File allocation: The program should demonstrate the ability to allocate space for files on a
simulated disk using the chosen file allocation algorithm (e.g. Contiguous Allocation or
Linked Allocation).
b) File deletion and renaming: The program should include a mechanism for deleting and
renaming files.
c) Disk fragmentation: The program should record the average amount of fragmentation at the
end of each time unit. Fragmentation occurs when there are small, unused blocks of disk
space scattered throughout the disk space.
d) Wasted disk space: The program should also record the number of wasted disk blocks at the
end of each time unit. Wasted disk space refers to blocks of disk space that are no longer
being used by any files.
e) Simulation results: The program should run the simulation for a set amount of time and
display the results, including the average amount of fragmentation and the number of wasted
disk blocks, at the end of each time unit. The students should also experiment with different
input scenarios and algorithms to compare the results and see how different factors affect the
performance of the file system