click below
click below
Normal Size Small Size show me how
0. Midterm
Operating Systems: Midterm
| Problem | Solution |
|---|---|
| Draw the process state diagram from the notes. This diagram contains nodes labeled with possible states for a process. It also contains arrows showing the various state transitions possible. Label the nodes and arcs. | [] |
| SJF/PSF have very favorable property. What is it? Why are they impractical for general OS? Even if practical, also have unfavorable property making them unsuitable purpose systems. What is it? What would you add to alleviate this unfavorable property. | |
| Some arcs change the NUMBER of processes in the system. Which arcs are these and what system calls do they correspond to. | |
| Define, but do NOT solve the Readers Writers problem. | |
| Some systems simply treat the readers writers problems as critical section problems and hence the implementation simply use P and V. What requirement of the Readers Writers problem does this implementation not satisfy? | |
| RR SCHEDULING PROBLEM | RR SCHEDULING PROBLEM |
| Draw a resource allocation graph (also called a reusable resource graph) that represents a deadlock state. Your graph must contain at least two resources and at least two tasks. Each resource must contain 3 units. | RESOURCE ALLOCATION PROBLEM |
| When execution started there were no arcs in RA graph. Give scenario ending in the graph you gave. Tell what requests and releases occur and in what order. Assume a naive resource manager that grants every request as soon as it can. | RESOURCE ALLOCATION PROBLEM |
| Banker’s algorithm for resource allocation never enters deadlocked state like part A. Consider scenario for B. Indicate first request Banker’s algorithm refuses to grant what optimistic manager did. Claims of each process are important. | RESOURCE ALLOCATION PROBLEM |
| Draw a reusable resource graph that represents an UNsafe state that is NOT deadlocked | RESOURCE ALLOCATION PROBLEM |
| A already written, requests printer, plotter, tape drive, and the robotic arm (in order). Develop processes B and C. Both need the printer and the arm, B needs the tape drive, and C needs the plotter. What order should the requests be made? Why? | RESOURCE ALLOCATION PROBLEM |
| Consider system of 12 units resource R and 24 units resource S managed by the banker’s algorithm. Claims: P1 (0,12). P2 (8,15). P3 (8,20). Possession: P1 (0,4). P2 (8,0). P3 (0,8). No outstanding requests. Largest # S-units P1 can request/be granted? | |
| Consider system of 12 units resource R and 24 units resource S managed by the banker’s algorithm. Claims: P1 (0,12). P2 (8,15). P3 (8,20). Possession: P1 (0,4). P2 (8,0). P3 (0,8). No outstanding requests. Largest # S-units P2 can request/be granted? | |
| Consider system of 12 units resource R and 24 units resource S managed by the banker’s algorithm. Claims: P1 (0,12). P2 (8,15). P3 (8,20). Possession: P1 (0,4). P2 (8,0). P3 (0,8). No outstanding requests. Largest # S-units P3 can request/be granted? | |
| When a linker converts a relative address to the corresponding absolute address, we say it is __________ the relative address. | |
| A program in execution is called __________. | |
| The processor scheduling algorithm resulting in the smallest average waiting time is __________. | |
| A directed graph with processes represented as circles, resources represented as squares, and requests and allocations represented as arcs is called __________. | |
| The Banker’s algorithm ensures that the system is always in __________. |