Please complete the following pseudocode to implement the

Added on -2019-09-16

| 1 pages
| 229 words

Trusted by 2+ million users,
1000+ happy students everyday

Showing pages 1 to 1 of 1 pages

1.Please complete the following pseudocode to implement the semaphore abstract. Class Semaphore {//Fields - add your pseudocode// Methods - add your pseudocodevoid init(int val){// add your pseudocode}void wait(){// add your pseudocode}void signal(){// add your pseudocode}}2.Write the Pseudocode for the following problems: suppose there are three threads A, B and C. A keeps producing an item into a buffer B1 of size M, B keeps taking an item from B1, and put into another buffer B2 of size N. C keeps consuming an item from buffer B2. Please write the pseudocode for Thread A,B,C a.Using the semaphores class defined above to synchronize them. b.Using the Monitor abstract to synchronize them.3.CPU scheduling (You shall use the simulator provided on blackboard with CPU scheduling lecture notes) (40%)ProcessArrivetimeExecution time (C)Period (T)P0028P1016P2013a.Consider the above periodic process set. What is the total utilization of the given process set? What is the hyperperiod? Please draw the Gantt Charts to illustrate the schedule in hyperperiod using EDF and RMS respectively.

Found this document preview useful?

You are reading a preview
Upload your documents to download
Become a Desklib member to get accesss

Students who viewed this