S23_CS_350_Exam_2_

.pdf

School

Binghamton University *

*We aren’t endorsed by this school

Course

350

Subject

Computer Science

Date

May 12, 2024

Type

pdf

Pages

8

Uploaded by SargentKnowledgeWren156 on coursehero.com

CS 350: Operating Systems Fall 2022 Midterm 2 Date: 11/21/2022 Time Limit: 1 Hour Name: 1. This exam contains 5 Questions across 8 total pages. Question point values add up to 100 total points. 2. This exam is closed book and closed note . 3. Remember: Less is more. Keep answers concise and to the point. Grading Table (for instructor’s use only) Question Points Possible Points Awarded Q1 20 Q2 20 Q3 16 Q4 20 Q5 24 Total 100
1. (20 points) Scheduling: Please use the following figures to answer questions about process scheduling. The table describes 5 processes arrival times, burst times, and priorities. The figure shows an example Gantt diagram. Process Arrival Time Burst Time Priority P1 0 6 3 P2 2 10 4 P3 7 1 2 P4 12 6 0 P5 17 5 2 (a) (5 points) Draw the Gantt diagram for preemptive shortest job first with the processes in the table starting at arrival time 0. (b) (5 points) For part (a), what is the turnaround time for each of the 5 processes and what is the average turnaround time? (c) (5 points) Now use the table to draw the Gantt diagram for round robin scheduling with time slices of size 3. (d) (5 points) What is the average wait time for the processes in (c)? Page 2
2. (20 points) Paging and Page Tables: Let’s consider a multi-level paging scheme for a 32-bit architecture with two levels of paging and 2KB pages. Assume we have a page directory table (PDT) whose PTEs take up 8 bytes. We also have a second level page table whose entries also take up 8 bytes. (a) Let’s also assume that the PDT fits into exactly TWO pages. How many entries are there in the PDT? (b) How many bits are used to index into the PDT? (c) How many bits are used to index into the second level page table? With the 2-level paging scheme described above, answer the following questions based on this hexadecimal memory address: 0xFF 0F F7 01 (d) In binary , what is the index into the PDT for the memory address 0xFF 0F F7 01 ? (e) In binary , what is the index into the second-level page table for memory ad- dress 0xFF 0F F7 01 ? (f) In binary , what is the offset for the byte of memory stored in the memory address 0xFF 0F F7 01 . Page 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help