Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

I.

Evaluation/Assessments/Student’s Activities/Worksheets

Project Preliminaries Module Week 4

WORKSHEET ACTIVITY/IES:

Student’s Name: Jayvee Bugay Score:


Year and Section: BSIT-2A Date:

Answer the following questions on the spaces provided.

Reference – Check NESO Academy on youtube.com

1. Compare and contrast a process and a thread.


A thread is an execution of a program that is driven by the environment of a process,
whereas a process is an execution of a program that is driven by the environment of a
process. Another significant distinction between process and thread is that processes are
isolated from one another, whereas threads share memory or resources.

2. Five jobs arrive nearly simultaneously for processing and their estimated CPU cycles are,
respectively: Job A = 12, Job B = 2, Job C = 15, Job D = 7, and Job E = 3 ms.
a. Using FCFS, and assuming the difference in arrival time is negligible, in what
order would they be processed? What is the total time required to process all five
jobs? What is the average turnaround time for all five jobs?

Job A Job B Job C Job D Job E


0 12 14 29 36 39

The order is Job A to E. The total time required is 26 and the average turnaround time is 24.

b. Using SJN, and assuming the difference in arrival time is negligible, in what order
would they be processed? What is the total time required to process all five jobs?
What is the average turnaround time for all five jobs?

Job B Job E Job D Job A Job C


0 2 5 12 24
39

The order is Job B, E, D, A, C. The total time required is 16.4 and the average turnaround time is
14.4.

1|Page
3. Using FCFS, in what order would jobs be processed?
a. Compute for Average Waiting Time (AWT) and Average Turn Around Time
(ATT)
Jobs Arrival Time Burst Time
Job A 4 5
Job B 6 4
Job C 0 3
Job D 6 2
Job E 5 4

Job A Job B Job C Job D Job E


0 4 10 10 16
21

The Average Waiting time is 1.4 and The Average turn Around Time is 10.2

AWT = 4+3+0-1+1/5 = 1.4


AAT = 4+9+8+13+17/5= 10.2

4. Using Shortest Job First, in what order would jobs be processed?


a. Compute for Waiting Time for each Jobs and AWT
Jobs Arrival Time Burst Time
Job A 0 12
Job B 2 4
Job C 3 6
Job D 8 5

Job A Job B Job C Job D


0 0 2 5
13

The Average Waiting time is 6.25 and The Average turn Around Time is 2.5.

ATT = 0+10+13+2/4
AAT=0-1+0+2+9

2|Page

You might also like