0 Up votes0 Down votes

143 views2 pagesSep 17, 2010

© Attribution Non-Commercial (BY-NC)

PDF, TXT or read online from Scribd

Attribution Non-Commercial (BY-NC)

143 views

Attribution Non-Commercial (BY-NC)

- Embedded System - Question Bank (BE-ECE, VII Semester, R2008)
- VMware Management With PowerCLI 5.0
- Brief Introduction to the Operating System And
- 10 Real Vignesh
- Q_bank_OS.doc
- Game.crash
- dd_netfx20UI0780
- Hudson Arch Execution
- Gambier RTCS Tutorial
- Lecture 7
- 17619-f09-rts
- Things%2Bto%2Bdo
- New Microsoft Ossffice Word Document
- Behavior Logics
- Behavior Logics
- 1
- 167590
- Operations Planning and Control1
- A Tricky Task Scheduling Technique to Optimize Time Cost and Reliability in Mobile Computing Environment
- Why and How Oracle Field Service Works

You are on page 1of 2

School of Computing

CS2106 Tutorial 5 Semester 1 10/11

1. We will not discuss this question during class. The answer to this question is given at the

end of this tutorial sheet. You should work out the answer yourself by tracing through the

algorithms.

A and B are the only two processes in the system. Both are in the ready state. A arrives

before B but the arrival time difference is negligible. A is a CPU bound process while B is

a I/O bound process. The pseudocode for A and B are as follows:

A:

repeat 2 times:

compute (takes 4 unit time)

write result to disk (takes 1 unit time)

exit (takes negligible time)

B:

repeat 2 times:

compute (takes 2 unit time)

write result to disk (takes 4 unit time)

exit (takes negligible time)

Assume that (i) I/O can be done concurrently, i.e., the time taken to write to disk will not

be prolonged if both processes write to disk at the same time; (ii) the running time of A

and B can be estimated accurately; (iii) time quantum for preemptive scheduler is 1 unit

time.

For each of the following algorithms:

(a) First Come First Serve;

(b) Shortest Job First;

(c) Round Robin;

(d) Shortest Remaining Time First;

(e) Priority Scheduling, with static priority and A has higher priority than B,

compute (i) the turnaround time for A and B, TA and TB ; (ii) the response time for A and

B, RA and RB .

2. MCQ. For each of the question below, choose the most appropriate answer and the corre-

sponding letter (A, B, C, or D) in the box provided.

If none of the answers provided is appropriate, put an X in the answer box.

If multiple answers are equally appropriate, pick one and write the chosen answer in the

answer box. Do NOT write more than one answers in the answer box.

(a) Which of the following scheduling algorithm will NOT lead to starvation?

A. Priority Scheduling (with static priority)

B. Shortest Job First

C. Shortest Remaining Time First

D. Multilevel Feedback Queue

Answer:

(b) There are five processes in a uniprocessor system. If we run each process alone in the

OS, each process would spend 60% of time waiting for I/O (in blocked state) and the

40% of time running on the CPU (in running state). Assume that overlapping I/O

operations will not prolong the I/O time.

Suppose that each process spend all 40% of time in the CPU first, followed by I/O.

If we launch these five processes at the same time, what is the maximum possible CPU

utilization?

A. 23 × 100%

B. 25 × 100%

10

C. 13 × 100%

D. 100%

Answer:

(c) Extending Part (b) above, suppose that the programmer can interleave the CPU and

I/O time in any order they want, what is the maximum possible CPU utilization?

A. 23 × 100%

B. 25 × 100%

10

C. 13 × 100%

D. 100%

Answer:

3. Argue why the Shortest Job First algorithm minimizes the average turnaround time.

4. k processes arrive in a system. Each process takes L seconds to run. The time quantum

assigned to each process is t seconds. None of the process requires I/O, and no new process

is created.

(a) Suppose the Round Robin algorithm is used for scheduling. What is the maximum

response time experienced by a process? What is the maximum turnaronud time

experienced by a process?

(b) Suppose the First Come First Serve algorithm is used for scheduling. What is the

maximum response time experienced by a process? What is the maximum turnaronud

time experienced by a process?

5. A preemptive, uni-processor, scheduling algorithm named Least Run First (LRF) always

pick the process that ran the least amount of time in the last T seconds to run next. T is

significantly larger than the time quantum.

(a) Does LRF favor CPU-bound process or I/O-bound process?

(b) Will LRF cause some process to starve?

Answer to Question 1:

Algorithm RA RB TA TB

FCFS 0 4 11 16

SJF 0 4 11 16

RR 0 1 14 15

SRTF 0 4 10 20

PS 0 4 10 20

Page 2

- Embedded System - Question Bank (BE-ECE, VII Semester, R2008)Uploaded byDr. N.Shanmugasundaram
- VMware Management With PowerCLI 5.0Uploaded byeru01
- Brief Introduction to the Operating System AndUploaded byUllas Kumar
- 10 Real VigneshUploaded byvicky3924
- Q_bank_OS.docUploaded byDiana Arun
- Game.crashUploaded byGheorghe Prodaniuc
- dd_netfx20UI0780Uploaded byWilliams Delson
- Hudson Arch ExecutionUploaded byartur198719877711
- Gambier RTCS TutorialUploaded bymickef82
- Lecture 7Uploaded bylogesh88
- 17619-f09-rtsUploaded bybkit_n_hai
- Things%2Bto%2BdoUploaded byMuhammad Enam ul Haq
- New Microsoft Ossffice Word DocumentUploaded bykarpaga prasanna
- Behavior LogicsUploaded byAnonymous 8erOuK4i
- Behavior LogicsUploaded byAnonymous 8erOuK4i
- 1Uploaded bysuraj_14
- 167590Uploaded byPradeep Joshi
- Operations Planning and Control1Uploaded byBidyut Ray
- A Tricky Task Scheduling Technique to Optimize Time Cost and Reliability in Mobile Computing EnvironmentUploaded byInternational Journal of Research in Engineering and Technology
- Why and How Oracle Field Service WorksUploaded byrameshg2020
- Content Caching and Scheduling in Wireless Networks With Elastic and Inelastic TrafficUploaded byLOGIC SYSTEMS
- cse 316.pdfUploaded bySahil Chopra
- LO UPDATEUploaded byMani Kandan
- Mine PlanningUploaded byTam Worku
- Scheduler OracleUploaded byyerzal
- 206_SCHEDULING_PROBLEMS.docxUploaded byNirmal Jain
- Ec6703 Rejinpaul IqUploaded byuday
- tinyos.pdfUploaded byH
- OS.docxUploaded byAysha Safdar
- Assignment Os NewUploaded bySupriya Kumar

- CS2106 Lec5 IPC IIUploaded byweitsang
- CS2105 Assignment 2Uploaded byweitsang
- CS2105 DIY Exercise 3Uploaded byweitsang
- CS2105 DIY Exercise 2Uploaded byweitsang
- CS2106 Tutorial 8Uploaded byweitsang
- CS2105 Assignment 1Uploaded byweitsang
- CS2105 DIY Exercise 1Uploaded byweitsang
- CS2105 Problem Set 1Uploaded byweitsang
- Lab 6: Ho Tian ShunUploaded byweitsang
- Lab 6: Lee Kang JunUploaded byweitsang
- Lab 6: Teo Swee KiatUploaded byweitsang
- CS2106 Lab 10Uploaded byweitsang
- CS2106 Tutorial 10Uploaded byweitsang
- CS2106 Tutorial 09Uploaded byweitsang
- CS2106 Lab 09Uploaded byweitsang
- CS2106 Lab 8Uploaded byweitsang
- CS2106 Lab 07Uploaded byweitsang
- CS2106 Tutorial 7Uploaded byweitsang
- CS2106 Lab 6Uploaded byweitsang
- Cs2106 Lec7 DeadlockUploaded byweitsang
- CS2106 Tutorial 6Uploaded byweitsang
- CS2106 Lec6 SchedulingUploaded byweitsang
- CS2106 Lec4 IPC IUploaded byweitsang
- CS2106 Lec3 ProcessUploaded byweitsang
- CS2106 Lec2 ConceptUploaded byweitsang
- CS2106 Lec1 IntroUploaded byweitsang
- CS2106 Lab 05Uploaded byweitsang
- CS2106 Lab 4Uploaded byweitsang
- CS2106 Tutorial 4Uploaded byweitsang

- lp.pdfUploaded byRichster Lofranco
- Sp12 Midterm1 SolutionsUploaded byChandan Bagai
- Bhn Kuliah 9 - Backtracking and SearchingUploaded byRisky Arisandy
- Lesson 3-CHE 358Uploaded bypercydziks
- Alg-of-Inf-1Uploaded bytamirat
- Pre Flow Push algUploaded byAleksandar
- Lab3Uploaded byTrang Pham
- Note7 s2z TransformUploaded byjricardo01976
- Transportation Assignment 3Uploaded byKenneth Rono
- 3 Chart ParsingUploaded byStergios Chatzikyriakidis
- art3Uploaded bydamaya1701
- AesUploaded byRavdeep Singh
- Fast Fourier transform for nonequispaced data : A tutorialUploaded byIzemAmazigh
- Polynomial InterpolationUploaded byrodwellhead
- Exam II 2013_SolutionUploaded bysuperman136
- ShortestPathsUploaded byShivam Pandey
- DSA- Answer KeyUploaded bysouvik samanta
- ch03Uploaded byfleebt
- 131473648-Neural-and-Fuzzy-Logic.pdfUploaded byApoorvagiri
- LWDFUploaded byAnonymous 1aqlkZ
- remezUploaded bymmaher844
- An Intuitive Guide to Numerical Methods HeinoldUploaded bySharad Kumar Kaushal
- Speech Coding Techniques.pptUploaded byjenny butil
- adaptive equalizationUploaded bycommunicationriders
- Latex Presentation SampleUploaded byMarco André Argenta
- Data StructureUploaded bySubathra Devi Mourougane
- courant number.pdfUploaded byUday Joshi
- Discrete Fourier TransformUploaded bydustinguzman17
- Vkandandan LecUploaded byokoroglu84
- BAB 1 ODE ( Predictor Corrector)Uploaded byAnita Andriani

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.