Docsity

CSci 430/530 Homework 2: Process Management Issues and Solutions - Prof. Derek Harter, Assignments of Operating Systems

Toggle sidebar
bg1
CSci 430/530 HOMEWORK 2 (60 points, Due on Fri Mar 4)
Problem 1: (20 points) In textbook, procedure chprio contains a serious design
flaw if the process (whose priority is being changed) is in the ready queue.
(a) Find the design flaw, describe its consequences, and propose solution to
fix it.
(b) If the process (whose priority is being changed) is in another state
(other in the ready state), is there any problem. Justify your answer.
Problem 2: (15 points) Global variable numproc tells the number of active
processes. Considering the code in kill can you tell whether the count in
numproc should include the null process or not? A brief justification is
required as a part of the answer.
1
pf2

Partial preview of the text

Download CSci 430/530 Homework 2: Process Management Issues and Solutions - Prof. Derek Harter and more Assignments Operating Systems in PDF only on Docsity!

CSci 430/530 HOMEWORK 2 (60 points, Due on Fri Mar 4)

Problem 1 : (20 points) In textbook, procedure chprio contains a serious design flaw if the process (whose priority is being changed) is in the ready queue. (a) Find the design flaw, describe its consequences, and propose solution to fix it. (b) If the process (whose priority is being changed) is in another state (other in the ready state), is there any problem. Justify your answer. Problem 2 : (15 points) Global variable numproc tells the number of active processes. Considering the code in kill can you tell whether the count in numproc should include the null process or not? A brief justification is required as a part of the answer.

Problem 3 : (25 points)

Process Management

Suppose the ready queue of the running Xinu system contains the following list of processes.

process id priority

(a) (15 points) Assume that N PROC = 10. Complete the snapshot of the running Xinu Q array as shown below.

key next prev

10 MININT 1 -

11 MAXINT -1 4

rdyhead  100 MININT -

rdytail  101 MAXINT -

(b) (10 points) From the above table, can you determine the current process? If yes, what is the currently running process? Explain your answer in either case.