buy CMPUT 379 homework solution alberta

buy CMPUT 379 homework solution alberta

Question – CMPUT 379 Assignment 3, Fall 2014
Due Monday, Nov 24 (submit by 11:55 pm)
Worth 20 marks (however, 5% of total course weight)
(Deadlock management, Banker’s algorithm)
Objective
In this assignment you will simulate Banker’s algorithm in a multi-processor computing
environment. Banker’s algorithm is used to avoid deadlocks in a computing environment.
Input
You would define the number and names of different types of resources available in system
as well as the number of instances each resource type has. CPU should be one type of
resource which may have more than one instance. You would also define the number and
names of the processes in the system as well as the …Read Moreir resource requirements. You would
define processes at the beginning of your simulation. So, you need to mention the arrival time
of each process (this is simulation time, not the system time, and you start simulation at
simulation time 0) at the beginning. You would also mention the total length of execution time
of each process. An example of input may be

?> Number of different resource types: 5
?> Names of each resource type: CPU A B C D
?> Number of instances of each resource type: 2 3 5 2 8

Above data mean that the computing system has 2 instances of CPU, 3 instances of A, 5
instances of B, 2 instances of C and 8 instances of D.

?> Number of processes: 5
?> Details of process-1: P1 2 2 1 1 3 10 7

Above data mention that process-1 has the name P1. During its execution it requires 2
instances of CPU, 2 instances of A, 1 instance of B, 1 instance of C and 3 instances of D.
The process would start at simulation time 10 and would have a total execution length of 7

simulation time units. For, simplicity you may only consider integer values for process starting
time and process execution time.
In this scenario, you must also have to provide details of process-2, process-3, process-4 and
process-5 in the same way.

Output
All of your output would go to the screen. You must output the status of the system (as shown
below) each time an event occurs. An event may be the starting/ending of the simulation,
the arrival of a process, the starting/ending of execution of a process. System status
would include the description of the current event as well as the status of all processes
available in the system at that time. For example, when process P1 finishes its execution you
would output the following message.

?> Simulation time: 17
?> Process P1 has just been finished.

When process P3 starts execution you would output the following message.

?> Simulation time: 20
?> Process P2 is running.
?> Process P3 has just started execution.

When a process arrives you would output the following message.

?> Simulation time: 22
?> Process P2 is running.
?> Process P3 is running.
?> Process P4 has just arrived at the system.

When the last process finishes its execution you would output the following message.

?> Simulation time: 38
?> Process P5 has just been finished.
?> No process is available for execution, system is idle.
?> Simulation is ended.

If no process is running in the system and available resources are not sufficient to start any
process that exists in the system, you would output the following message.

?> Simulation time: 28
?> Process P3 has just been finished.
?> Process P4 is idle.
?> Process P5 is idle.
?> No process is running. Available resources are not sufficient to
run any idle process or to avoid deadlocks. System is halted.
?> Simulation is ended.

Marking
This assignment will be marked out of 20 marks.
You are expected to deliver a good quality code, which is easy to read and comprehend. The
quality and style of your coding will be marked.
 15 marks – implementation of all features
 5 marks – q…


Are you overwhelmed by your class schedule and need help completing this assignment? You deserve the best professional and plagiarism-free writing services. Allow us to take the weight off your shoulders by clicking this button.

Get help

Who Will Write your Paper

Writer avatar
Tutor_Charles

Rating: 4.9/5    Reviews 377

Success rate 96%

Completed projects: 545

I am an experienced writer offering professional services across diverse fields. I provide quality work with strict adherence to the deadline.

Writer avatar
Tutor_Dr. Edith

Rating: 4.8/5    Reviews 381

Success rate 96%

Completed projects: 490

I am an experienced writer with great research and analytical skills. Original quality paper and on-time delivery are guaranteed. Let's do this!

Writer avatar
Tutor_Dr.Judy

Rating: 4.7/5    Reviews 316

Success rate 100%

Completed projects: 398

I am a professional writer with more than 8 years of experience. My mission is to provide you with high-quality paper in a timely fashion.

Writer avatar
Tutor_Ian

Rating: 4.8/5    Reviews 371

Success rate 100%

Completed projects: 432

Hi, I deliver quality papers on time following all the instructions provided. Client's satisfaction is my priority. Welcome for plagiarism-free papers.

Writer avatar
Tutor_Prof. Allan

Rating: 4.8/5    Reviews 400

Success rate 98%

Completed projects: 487

With over half a decade of academic experience, I'm committed both to efficiency and punctuality. If it's quality you're looking for, then I'm here to provide!

Writer avatar
Tutor_Prof. Gabie

Rating: 4.9/5    Reviews 447

Success rate 100%

Completed projects: 546

A quality-driven, skilled writer with over 5 years of experience in various disciplines. I deliver plagiarism-free papers and content of impeccable quality, always original and always before the deadline!

Writer avatar
Tutor_Sarah

Rating: 4.9/5    Reviews 427

Success rate 99%

Completed projects: 567

I have been a full-time freelance researcher and writer for a period of over 6 years. I have successfully completed over 1000 projects and assignments. I have had a good professional relationship with my clients. Try me today!

Writer avatar
Tutor_Stella

Rating: 4.9/5    Reviews 305

Success rate 99%

Completed projects: 404

I am a proficient writer with knowledge across a wide range of academic disciplines. I guarantee quality, timely and original content.

Writer avatar
Tutor_SylviaYoung

Rating: /5    Reviews 419

Success rate 97%

Completed projects: 506

Hi, count on me to deliver quality and exemplary papers. I will pay attention to all your instructions, and meet all your expectations.