COCS 361 solve
Assignment 2 Second Semester Session 1445/1446 AH Student Name : Student ID : Student Signature : Department : Department of Computer Science Course Code : COCS 361 Course Name Due Date : Operating Systems : Thursday, May 09, 2024 Time : 11:59 P.M. Total Marks 10 Number of Exam Page (s) : 5 Marks Outcome 1 /0 (0 Marks) Outcome 2 /10 (0 Marks) Total Marks (In Figure) Signature: ___________________________ Total Marks (In Words) Name of the Examiner : Maram Alwagdani 1 of 5 / 10 Marks Outcome 2 Design, implement and evaluate a computing-based solution to meet a given set of computing requirements in the context of the program’s discipline. Question 1 (2.2: / 1.5 marks) Consider a set of 5 processes whose arrival time (in milliseconds), CPU burst time (in milliseconds), and the priority are given below: Process P1 P2 P3 P4 P5 Arrival Time 0 1 3 6 7 Burst Time 3 2 7 5 3 Priority 3 4 5 1 2 Draw three Gantt Charts that illustrate the execution of these processes and then calculate average turnaround time, average waiting time, and average response time using the following scheduling algorithms: a. SJF (preemptive) b. Priority (preemptive) c. Round Robin (time quantum = 2) 2 of 5 Question 2 (2.2: / 4 marks) Consider the following snapshot of a system with 4 processes and 4 resource types A (6 instances), B (5 instances), C (6 instances), and D (5 instances): Allocation P0 P1 P2 P3 A 1 2 1 1 B 2 1 0 0 C 1 2 1 0 D 0 0 2 1 Max A 3 3 2 3 B 3 3 1 2 C 2 2 6 2 Available D 3 2 3 2 A B C D 1 2 2 2 Answer the following questions using the Banker’s algorithm: a. Write the content of the Need matrix? b. Write if the system is in a safe state or not? If yes, write the safe sequence. If not, justify your answer. c. If a request from process P1 arrives for (1,0,1,0), write if the request can be granted immediately? Justify your answer. d. If a request from process P3 arrives for (0,3,0,2), write if the request can be granted immediately the request be granted immediately? Justify your answer. e. If a request from process P0 arrives for (0,0,0,2), write if the request can be granted immediately the request be granted immediately? Justify your answer. 3 of 5 Question 3 (2.2: / 2 marks) Given five memory partitions of 200K, 400K, 600K, 800K, and 900K (in order), write how would each of the First-fit, Best-fit, and Worst-fit algorithms place processes of 418K, 519K, 232K, and 640K,324K (in order)? Then, write which of these algorithms makes the most efficient use of memory and illustrate why. a. First-fit b. Best-fit c. Worst-fit 4 of 5 Question 4 (2.2: / 2.5 marks) Consider a logical address space of 8 pages; each page is 2048 byte long, mapped onto a physical memory of 64 frames. Solve the following questions: a. What are the sizes of the logical and physical spaces? b. How many bits are there in the logical address and how many bits are there in the physical address? c. A process of size 6284 bytes will be loaded in some of the available frames= {10, 8, 40, 25, 3, 15, 56, 18, 12, 35}. Write how many pages needed for this process and then display the contents of the process’s page table. d. What is the size of the internal fragment? e. Convert the following logical addresses 2249 and 10512 to physical addresses. Good Luck 5 of 5
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
