Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CSCI 430 please try do all question thank you Overview this written problem set you will be given a simple problem that should elp illustrate
CSCI 430 please try do all question thank you
Overview this written problem set you will be given a simple problem that should elp illustrate the concepts of interleaving of processes, and the problems of oncurrency that can occur from such interleavings. This material should omplement and be done in parallel with your reading and review of Chapters and 6 of our textbook. earning Objectives Understand and explore the concept of interleaving . See what problems of concurrency occurs if we don't enforce proper mutual exclusion. Understand what a race condition is, and how improper concurrent execution causes race conditions. ubmission ou are to submit the assignment by the deadline posted for this submission. submission folder has been created in My LeoOnline for your use. This ssignment has 2 problems, both requiring a written description. So you nay submit your answer as a plain text comment, or as an attachment of a lain text file, or a word or open office document. Problem #1 onsider a concurrent program with two processes, p and q, defined as sllows. A, B, C, D, and E are arbitrary atomic (indivisible) statements. Assume that the main program (not shown) does a parbegin of the two processes void po { A; B; C; void qo { D: E: } } Questions Show all the possible interleavings of the execution of the proceeding two processes. Show this by giving execution traces" in terms of the atomic statements e.g. A,B,C,D,E. Remember that p() or qo can be chosen to run first, and that a running program can be interrupted in between the execution of any of the atomic statements. Problem #2 Given the following state for the Banker's Algorithm. 6 processes Po through P5 4 resource types A (15 instances); B (6 instances) C (9 instances): D (10 instances and the following snapshot at time TO: Available A B C D 6 3 5 4 Current Allocation D PO 2 0 2 1 P1 0 1 1 1 P2 4 1 0 2 P3 1 0 0 1 P4 1 1 0 P5 1 0 1 1 Maximum dem and PO P1 P2 P3 P4 P5 9 5 2 2 7 5 3 3 5 2 4 1 D 5 5 3 3 4 4 3 2 2 1 4 4 Questions 1. Verify that the Available array has been calculated correctly, 2. Calculate the Need matrix 3. Show that the current state is safe, that is show a safe sequence of pro- cesses. In addition, to the sequence show how the Available (working array) changes as each process terminates 4. Given the request (3, 2, 3, 3) from Process P5, should this request be granted? Why or why notStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started