当前位置:天才代写 > 操作系统代写 > 操作系统期中考试代做 操作系统考试代考

操作系统期中考试代做 操作系统考试代考

2023-11-25 09:50 星期六 所属: 操作系统代写 浏览:91

OS-202 midterm 2020-21 Fall(v2)

 

Please enter your answers directly in nyu classes as if this was a homework or lab. The first two problems ask you to draw diagrams. As discussed in class, draw them with pencil and paper, take a picture, convert the picture to a pdf, and attach it as you would attach a pdf for a homework. Good Luck!

 

1 (10 points).   操作系统期中考试代做

Draw the process state diagram given in the notes. This diagram contains nodes (circles) showing process states and arcs (arrows) showing the possible state transitions. Remember to label the nodes and arcs.

 

2 (10 points).

Consider a system with two processes and three resource types, A, B, and C. The system has 5 units of A, 1 unit of B, and 3 units of C. Draw a resource allocation graph for this system that represents a state that is NOT deadlocked and NOT safe.

 

3 (10 points).   操作系统期中考试代做

Define, but do NOT solve, the producer-consumer problem.

 

4 (15 points).

The processes in the table on the right are run with a round robin scheduler having a quantum q = 10ms (all times are in milliseconds).

 

操作系统期中考试代做
操作系统期中考试代做

 

A starts at t = 0ms and requires 36ms of CPU time to complete.

B starts at 8ms and requires 24ms. C starts at 16ms and requires 28ms.

A never blocks.

After B runs for 16ms, it blocks for 10ms and never blocks again.

After C runs for 20ms, it blocks for 2ms and never blocks again.

At what time does each process finish? Show your work and use our standard tie-breaking rule if ties occur.

 

5 (10 points).  操作系统期中考试代做

The program below consists of two tasks that share a common variable X. Before execution begins, X is initialized to 50. The author included the (binary) semaphore S to force each line of each task to be atomic. Unfortunately, the program still would sometimes print different answers.

 

 

What are all the possible printouts that can occur? That is, assume the program is run many times. Each run will print two lines, but the two lines will not always be the same from run to run. List all the possibilities, making clear for each possibility which line is printed first.

 

6 (35 points).

Fill in the blanks with the appropriate technical term or phrase.

i. A disadvantage of the “shortage job first” process scheduling algorithm is the possibility of____________.

ii. When the OS moves a process from the running state to ready, a has occurred ____________.

iii. The diagram used to model deadlock that contains squares, circles, and arrows is called a ____________.

iv. A program in execution is called a ____________.

v. A hardware instruction that makes solving the critical section problem easy is ____________.

vi. The coordination problem where some processes just query a datebase while other processes modify the database is called ____________.

vii. The Banker’s algorithm ensures that all processes remain in a state ____________.

 

7 (10 points).   操作系统期中考试代做

Consider a system containing 4 units of resource R and 10 units of resource S managed by the banker’s algorithm. There are three processes X, Y, and Z. X’s claim is 3 units of R and 2 units of S, written (3,2). Y’s claim is (2,8). Z’s claim is (4,8). Currently X has 1 unit of R and 2 units of S, written (1,2). Y has (0,0). Z has (0,4). There are no outstanding requests.

i What is the maximum number of units of R that X can request at this point that the banker will grant?

ii If Y instead of X makes a request for R, what is the maximum number of units that the banker will grant?

iii If Z instead of X or Y makes a request for R, what is the maximum number of units that the banker will grant? Justify your answers.

操作系统期中考试代做
操作系统期中考试代做

 

 

更多代写:cs澳大利亚final quiz代考  网上代考  英国包网课   澳大利亚研究性论文代写  北美assignment代做  python编程课业代做

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

 

天才代写-代写联系方式