S23_CS_350_Exam_2_
.pdf
keyboard_arrow_up
School
Binghamton University *
*We aren’t endorsed by this school
Course
350
Subject
Computer Science
Date
May 12, 2024
Type
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
Related Questions
Description: There are 5 philosophers sitting around a table and try to eat from the center of the table. 5 chopsticks also lay on the table. Let us call the 5 philosophers in clockwise P1, P2, ...P5. There also 5 chopsticks clockwise S1, S2, ..., S5 on the table. There are only one chopstick between every two philosophers. Every right hand chopstick will have the same index as the philosopher. For example, on the right hand side of P1, the chopstick is called S1. And every left hand side chopstick number is 1+number of the philosopher.
A philosopher spend random time to think, then he feel hungry and try to eat.
The middle dish can provide enough food for everyone at the same time.
But a philosopher only can start to eat when he picked up two chopsticks from left hand side and right hand side to form a pair of chopsticks.
If a philosopher take one chopsticks, he will try to fight with neighbours to get another one, and never back off to put down the one in his hand.
Once the…
arrow_forward
First you should ask for the number of tasks to perform.
Then you should create a list of tasks with that many entries.
Ask the user if they have completed each task.
Report the tasks that have yet to be completed.
arrow_forward
Only correct answer will be appreciated , otherwise downvoted.
arrow_forward
Simulation parameters:
• Define a step size h. Try something small like 0.001 seconds.
• Define a length for the simulation-perhaps 10 seconds for now, but feel free to adjust it as
you see fit.
• Create a list of times that begins at 0 and goes up to the simulation length in steps of h. The
actual simulation only cares about the step size, so we won't use this in the simulation but we'll
use it for plotting at the end.
• Calculate the length of the list created in the previous step and assign it to a variable n.
Data arrays:
• Create a list r of length n that is all zeros (np.zeros could come in handy here).
• Create a list s of length n that is all zeros.
Initial conditions:
• Set the first entry of r to be some initial height of your choosing.
• Set the first entry of s to be some initial velocity of your choosing.
First-order equations:
• We need to define a function that calculates the derivative of r. Since Eq. 2.14 says that r' s,
this is fairlv simply. We iust have to return c…
arrow_forward
THIS IS NOT A GRADED ASSIGNMENT. THIS IS PRACTICE QUESTIONS.
arrow_forward
Incorrect downvote be sure in concept. Previous .
arrow_forward
Overdue tasks are highlighted in
Select an answer:
green
yellow
orange
red
arrow_forward
PLEASE HELP WITH THIS QUESTION, ONLY CORRECT ANSWERS WOULD BE UPVOTED
arrow_forward
Correct and detailed answer will be Upvoted else downvoted. Thank you
arrow_forward
16th question in the below picture.
arrow_forward
Good afternoon, please help with this task starting from the 3rd point.
arrow_forward
No need long answer.
Keep it short and step by step:
arrow_forward
Favorite Color
Rank the following colors according to your preference with 1 being the most preferred and 5 the least preferred color.
Survey Result: (50 respondents)
Favorite Color Ranking
1st
2nd
3rd
4th
5th
Blue
8
7
9
15
11
Red
16
9
7
9
9
Yellow
11
14
11
5
9
Violet
4
11
17
10
8
Green
11
9
6
11
13
Instructions: Create a preference schedule for the rankings cast by your respondents.
arrow_forward
question in the image below
arrow_forward
Note: write a lot of information about the questions in the picture and please do not handwritten.
arrow_forward
By default, the first item to be shown in the drop-down list is
Pick a college :
Choose a college
Richfield
PC Training
Select one:
a. college
O b. Choose a college
O c. PC Training
O d. Richfield
arrow_forward
Help. Correct answer will be appreciated otherwise downvoted.
arrow_forward
Four in a row is a game in which players take turns adding tokens to the columns on the game board.
Tokens fall to the lowest position in the chosen column that does not already have a token in it. Once one of the players has placed four of their tokens in a straight line (either vertically, horizontally, or diagonally), they win the game
If the board is full and no player has won, then the game ends in a draw.
TASK
Using the following class descriptions, create a UML diagram and a version of Four in a row game
The game must allow for a minimum of two and maximum of four players
The game must allow each player to enter their name(duplicate names should not be accepted)
The game should give the players the ability to choose how many rows (between four and ten), and how many columns (between four and ten) the game board should have.
The code uses several classes, including "Player", "Board","Game" and exceptions for handling errors such as invalid moves and full columns.…
arrow_forward
Read the question carefully Please answer correctly.
arrow_forward
Problem #1: How much should I study outside of class? Issue: Your fellow students liked the previous version of study hour’s application and want to expand it again by adding the features listed below.
Minimum Study Hours per Week per Class Grade15 A12 B9 C6 D0 F
Project Specifications:
The program asks the user their name, employee id, and department. The program also asks the user who they are creating the report for, their employee id, and the department they work in. (hint #1 & 2 are instances of a class – A class must be created and used within the program)The menu driven program has the following options:Determine Hours to StudyDetermine Grade Display Averages and TotalsQuit
The user can select any menu option in any order they want. For example:The user can start the program run option A, then option C, then option B, then option D. They restart the program, run option C, then D. They restart the program, run option A, then D. They restart…
arrow_forward
Fill in the blank question- Only answer without explanation
Q. The ____ operator puts command to the background and releases the terminal for other task.
arrow_forward
Q: It is always challenging to decide when to stop testing. Testing exit criteria can be decided either formally or informally.You are required to write a minimum of 2500 words on testing exit criteria.Note: Attach plagiarism report with it and the percentage of plagiarism must be less than 15%.
arrow_forward
Correct answer will be appreciated.else downvoted.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Related Questions
- Description: There are 5 philosophers sitting around a table and try to eat from the center of the table. 5 chopsticks also lay on the table. Let us call the 5 philosophers in clockwise P1, P2, ...P5. There also 5 chopsticks clockwise S1, S2, ..., S5 on the table. There are only one chopstick between every two philosophers. Every right hand chopstick will have the same index as the philosopher. For example, on the right hand side of P1, the chopstick is called S1. And every left hand side chopstick number is 1+number of the philosopher. A philosopher spend random time to think, then he feel hungry and try to eat. The middle dish can provide enough food for everyone at the same time. But a philosopher only can start to eat when he picked up two chopsticks from left hand side and right hand side to form a pair of chopsticks. If a philosopher take one chopsticks, he will try to fight with neighbours to get another one, and never back off to put down the one in his hand. Once the…arrow_forwardFirst you should ask for the number of tasks to perform. Then you should create a list of tasks with that many entries. Ask the user if they have completed each task. Report the tasks that have yet to be completed.arrow_forwardOnly correct answer will be appreciated , otherwise downvoted.arrow_forward
- Simulation parameters: • Define a step size h. Try something small like 0.001 seconds. • Define a length for the simulation-perhaps 10 seconds for now, but feel free to adjust it as you see fit. • Create a list of times that begins at 0 and goes up to the simulation length in steps of h. The actual simulation only cares about the step size, so we won't use this in the simulation but we'll use it for plotting at the end. • Calculate the length of the list created in the previous step and assign it to a variable n. Data arrays: • Create a list r of length n that is all zeros (np.zeros could come in handy here). • Create a list s of length n that is all zeros. Initial conditions: • Set the first entry of r to be some initial height of your choosing. • Set the first entry of s to be some initial velocity of your choosing. First-order equations: • We need to define a function that calculates the derivative of r. Since Eq. 2.14 says that r' s, this is fairlv simply. We iust have to return c…arrow_forwardTHIS IS NOT A GRADED ASSIGNMENT. THIS IS PRACTICE QUESTIONS.arrow_forwardIncorrect downvote be sure in concept. Previous .arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage