Programming Question

BookLink:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

https://csc-knu.github.io/sys-prog/books/Andrew%20S.%20Tanenbaum%20-%20Modern%20Operating%20Systems.pdf

Question1

Page 465, Problem 1:

Give an example of a deadlock taken from politics.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Question 2

Page 465, Problem 5:

The four conditions (mutual exclusion, hold and wait, no preemption and circular wait) are necessary for a resource deadlock to occur. Give an example to show that these conditions are not sufficient for a resource deadlock to occur. When are these conditions sufficient for a resource deadlock to occur?

Question 3

Use the script file “sub” discussed on the last page of this week’s handout as a template to complete the following tasks:

  1. Follow these steps:Make two more copies of file “mysedfile” as “mysedfile2” and “mysedfile3”;Create a script file, “mysedscript”, that will read the files, “mysedfile”, “mysedfile2”, and “mysedfile3”, as its inputs using a for-loop;For each file “mysedscript” reads, use sed commands to 1) remove the blank line(s), 2) insert the following record before Jerry’s record, and 3) update the files accordingly:Allen 91 83 95
  2. After making “mysedscript” an executable file, run it. Please verify if “mysedfile”, “mysedfile2”, and “mysedfile3” are updated as required

Question 4

Based on the data file “mysedfile” you created for Lab 6, please complete the following tasks:

  1. Create a sed script file “mysedprog” (see the Linux handouts for examples), that removes blank line(s), appends the following two records after Tom’s record, and sends the updated information to screen:

Cindy 85 94 92Allen 91 83 95

  1. Save the content of your “mysedprog” file, the sed command line you used, and the output.

Are you stuck with your online class?
Get help from our team of writers!

Order your essay today and save 20% with the discount code RAPID