CS444 HW4 Preemption: optional to implement it, but need to understand it!

uprog[123].c, running on hw4 provided files

 

GO 100100

*aaaaaa**********cccccccc*ccaaaazz*z*********AAA*AAAAAAAbb*bbSHUTTING DOWN

*bbbbbb*

EXIT CODE OF PROCESS 1: 2

*

EXIT CODE OF PROCESS 2: 4

**

EXIT CODE OF PROCESS 3: 6

*SHUTTING THE SYSTEM DOWN!

Debug log from run:

Marking kernel events as follows:

  ^a   COM2 input interrupt, a received

  ~a   COM2 output interrupt, a output

  ~e   COM2 output interrupt, echo output

  ~S   COM2 output interrupt, shutdown TX ints

  |(1z-2) process switch from 1, now a zombie, to 2

  |(1b-2) process switch from 1, now blocked, to 2

  |(0-1) process switch from 0 to 1

-----------------DEBUGLOG-------------------------------------

*0|(0-1)|(1b-2)|(2b-3)~a~a~a~a~a~a~S*3*3*3*3*3*3*3*3*3*3~c|(3b-1)|(1b-2)|(2b-0)~

c|(0-3)|(3b-1)|(1b-2)|(2b-0)~c|(0-3)|(3b-1)|(1b-2)|(2b-0)~c|(0-3)|(3z-1)|(1b-2)|

(2b-0)~c|(0-1)|(1b-2)|(2b-0)~c|(0-1)|(1b-2)|(2b-0)~c|(0-1)|(1b-2)|(2b-0)~c|(0-1)

*1|(1b-2)|(2b-0)~c|(0-1)|(1b-2)|(2b-0)~c|(0-1)|(1b-2)|(2b-0)~a|(0-1)~a~a~a~z~z*1

~z~S*1*1*1*1*1*1*1*1*1~A|(1b-2)|(2b-0)~A|(0-1)|(1b-2)|(2b-0)~A|(0-1)|(1b-2)|(2b-

0)*0~A|(0-1)|(1z-2)|(2b-0)~A|(0-2)|(2b-0)~A|(0-2)|(2b-0)~A|(0-2)|(2b-0)~A|(0-2)|

(2b-0)~A|(0-2)|(2b-0)~A|(0-2)|(2b-0)~b|(0-2)|(2b-0)~b|(0-2)|(2b-0)*0~b|(0-2)|(2b

-0)~b|(0-2)|(2z-0)*0~b~b~b~b~b~b~S*0*0*0*0*0

--------------------------------------------------------------

 

LEAVE KERNEL!

 

With preemption implemented—

GO 100100

system up

*aaaaaa****aaaazz****z****bbbbbb**ccccc*cc***bbbbcc***AAAAASHUTTING DOWN

*AAAAAc*

EXIT CODE OF PROCESS 1: 2

*

EXIT CODE OF PROCESS 2: 4

*

EXIT CODE OF PROCESS 3: 6

*SHUTTING THE SYSTEM DOWN!

Debug log from run:

Marking kernel events as follows:

  ^a   COM2 input interrupt, a received

  ~a   COM2 output interrupt, a output

  ~e   COM2 output interrupt, echo output

  ~S   COM2 output interrupt, shutdown TX ints

   %   quantum has run out, calling scheduler()

  |(1z-2) process switch from 1, now a zombie, to 2

  |(1b-2) process switch from 1, now blocked, to 2

  |(0-1) process switch from 0 to 1

-----------------DEBUGLOG-------------------------------------

*0|(0-1)|(1b-2)|(2b-3)~a~a~a~a~a~a~S*3*3*3*3%|(3-1)|(1b-2)|(2b-3)~a~a~a~a~z~z~S*

3*3*3*3%|(3-1)~z~S*1*1*1*1%|(1-2)|(2b-3)~b~b~b~b~b~b~S*3*3~c|(3b-1)~c~c~c~c*1~c~

c~S*1*1*1%|(1-2)|(2z-3)|(3b-1)~b~b~b~b~c~c~S*1*1*1~A|(1b-3)|(3b-0)~A|(0-1)|(1b-3

)|(3b-0)~A|(0-1)|(1b-3)|(3b-0)~A|(0-1)|(1z-3)|(3b-0)~A|(0-3)|(3z-0)*0~A~A~A~A~A~

c*0~S*0*0*0

--------------------------------------------------------------

 

LEAVE KERNEL!