[Solved]Question 1 20 Marks Consider Following Set Processes Length Cpu Burst Given Milliseconds Q37135615
![Question 1 [20 Marks]. Consider the following set of processes, with the length of the CPU burst given in milliseconds Proces](https://media.cheggcdn.com/media%2Fa84%2Fa840a5e4-a9a1-40ae-8c48-1f9b2140592e%2Fimage.png)
Question 1 [20 Marks]. Consider the following set of processes, with the length of the CPU burst given in milliseconds Process Burst Time Priority Arrival Time P1 P2 P3 P4 P5 0 4 10 4 4 a) [5 Marks] Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SRTF, non-preemptive priority (a smaller priority number implies a higher priority), and RR (quantum 2) b) [5 Marks] What is the turnaround time of each process for each of the scheduling algorithms in part a? c) 5 Marks] What is the waiting time of each process for each of the scheduling algorithms? d) 5 Marks] Which of the algorithms results in the minimal average waiting time (over all processes):? Question 2 [20 marks]. The provided zipped file contains an executable Java program that implements two page-replacement algorithms which were studied in class and presented in Section 10.4 of the textbook. There is a README.txt file that explains how to run the Test.java” code with a reference page sequence. Study the source code in different java files and experiment with different cases: (1) Have your program initially generate a random page- reference string where page numbers range from 0 to 9. (2) Apply the random page-reference string to each algorithm and record the number of page faults incurred by each algorithm. (3) Pass the number of page frames to the program at startup Question 3 [20 Marks]. Below the sketch of the Unix facilities for file system calls is shown onsisting of: two tables; table entries; and primitive operations that work on these tables. Tables: – SysT: System wide file-table – PerT Per-process file-table – SysT: Perl RDfileName) # Read the directory information for a file from # the disk, and put them in a Table above # Write back the information of a file from Tables # to the disk # Search a Table for file name and return the Table # entry number for that file (ifile exists in Table) # Delete the Table entry by giving its entry number – WD fileName) SF(Table, fileName) DT(Table, entryNun) Tasks to do: A. [6 Marks] Fill the fields of the Tables with file attributes: file name; owner name; type: location in disk; size; access control; time/date; read/write pointer; file open count B. [6 Marks] Explain where is a file descriptor “fd” in the above operations and why the operating systems use file descriptors to handle file operations. C. [8 Marks] Use the above primitive operations, and also modify Table fields above for a file to perform the following file system calls. i. create-file(fileName) ii. open-file(fileName, Read-and-Write) iii. write-filelfd, Buffer, 100) iv. close-filelfd) v. delete-file fileName) # Note: create-file does not open the file Show transcribed image text Question 1 [20 Marks]. Consider the following set of processes, with the length of the CPU burst given in milliseconds Process Burst Time Priority Arrival Time P1 P2 P3 P4 P5 0 4 10 4 4 a) [5 Marks] Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SRTF, non-preemptive priority (a smaller priority number implies a higher priority), and RR (quantum 2) b) [5 Marks] What is the turnaround time of each process for each of the scheduling algorithms in part a? c) 5 Marks] What is the waiting time of each process for each of the scheduling algorithms? d) 5 Marks] Which of the algorithms results in the minimal average waiting time (over all processes):? Question 2 [20 marks]. The provided zipped file contains an executable Java program that implements two page-replacement algorithms which were studied in class and presented in Section 10.4 of the textbook. There is a README.txt file that explains how to run the Test.java” code with a reference page sequence. Study the source code in different java files and experiment with different cases: (1) Have your program initially generate a random page- reference string where page numbers range from 0 to 9. (2) Apply the random page-reference string to each algorithm and record the number of page faults incurred by each algorithm. (3) Pass the number of page frames to the program at startup
Question 3 [20 Marks]. Below the sketch of the Unix facilities for file system calls is shown onsisting of: two tables; table entries; and primitive operations that work on these tables. Tables: – SysT: System wide file-table – PerT Per-process file-table – SysT: Perl RDfileName) # Read the directory information for a file from # the disk, and put them in a Table above # Write back the information of a file from Tables # to the disk # Search a Table for file name and return the Table # entry number for that file (ifile exists in Table) # Delete the Table entry by giving its entry number – WD fileName) SF(Table, fileName) DT(Table, entryNun) Tasks to do: A. [6 Marks] Fill the fields of the Tables with file attributes: file name; owner name; type: location in disk; size; access control; time/date; read/write pointer; file open count B. [6 Marks] Explain where is a file descriptor “fd” in the above operations and why the operating systems use file descriptors to handle file operations. C. [8 Marks] Use the above primitive operations, and also modify Table fields above for a file to perform the following file system calls. i. create-file(fileName) ii. open-file(fileName, Read-and-Write) iii. write-filelfd, Buffer, 100) iv. close-filelfd) v. delete-file fileName) # Note: create-file does not open the file
Expert Answer
Answer to Question 1 [20 Marks]. Consider the following set of processes, with the length of the CPU burst given in milliseconds P… . . .
OR

