DOC PREVIEW
CORNELL CS 414 - CS 414 Review Session

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1414/415 Review SessionEmin Gun SirerTrue/False• Multiprogramming offers increased response time• Instructions to access a raw disk device need to be protected • Setting the system mode bit to “kernel” needs to be a protected instruction• Threads in the same address space share their code, data and stacks.• Name three fields likely to be found in a TCBTrue/False• User-level threads would be a good choice for a process which is providing a file service.• The resource allocation graph approach to detecting deadlocks takes O(N2) time on average where N is the number of processes in the system.• TCP is a better choice than UDP for a server which streams video to clients.• External fragmentation can lead to poor memory usage in page-based memory management systems.True/False• Given a static (well-known) job load, shortest job first scheduling gives the lowest average waiting time.• Reducing the time quantum in a preemptive OS reduces the average turnaround time of processes.• The minithreadpackage implements kernel threads.• Semaphores and condition variables are interchangeable synchronization primitives.• Route discovery in DSR takes time O(N2) where N is the number of hosts in the network.2True/False• Every sending machine on a CSMA-CD bus is guaranteed to send the message it wants to send.• A domain name service (DNS) provides names for users on the Internet.• IP is a transport-level protocol.• IP addresses are used in the Ethernet protocol to address packets to hosts.• Virtual memory is limited by the amount of RAM a system has.Essay Questions• Can the following code, when executed by multiple threads concurrently, lead to deadlock ? Why or why not ?• A hardware designer argues that he has enough transistors on thechip to provide 1024 integer registers and 512 floating point registers. You have been invited as the operating system guru to give opinion about the new design. – What is the effect of having such a large number of registers on the operating system? – What additional hardware features you would recommend added to the design above ?P(sema1);a++;P(sema2);v++;V(sema2);V(sema1);Essay Questions• Write an implementation of a semaphore using a monitor. The monitor should export two procedures P and V.• You are given primitivessendmsg(dest, buffer, bufferlen) andrecvmsg(buffer, int *bufferlen) for communicating unreliably over a communication network. You are asked to write a protocol for an application that requires reliable message sending and receiving. Your protocol can use the sendmsg and recvmsg primitives given above. Briefly describe the issues you think your protocol needs to deal with, to achieve reliability over these primitives. Can your protocol guarantee reliable delivery ? You don't need to write any pseudocode.Essay QuestionsFor the following sequence of page requests in a virtual memory system, show the progress of the following algorithms for the page replacement (on a main memory with 3 empty frames).• a) FIFO b) LRU c) OPTIMAL d) MRU (Most Recently Used) • Sequence : 1,0,7,2,1,7,5,2,0,1,7,0,3,4,0,1,7,2,3 • Identify the four criteria which are required to hold in order for a system to be able to deadlock. Discuss how preventing each characteristic of deadlock might be done, and how feasible it is to do so.3Essay Questions• It is uncommon to see RPC systems implemented on top of TCP. Explain what features of TCP make it unsuitable as a foundation for RPC.• Complete the following sentence: in ourminithreads implementation, we need to occasionally disable interrupts because ______________.• Write code to synchronize a factory floor for making cars, wheretwo separate pipelines bring together the chassis and the body. Each pipelineis an independent process that calls chassis_ready or body_ready when a chassis or body is ready. You have a staging area which holds at most one chassis and one body (if you bring in a chassis when there is already one there, the factory breaks down). When both an engine and a chassis are in the staging area, you can put together the car and empty the staging area (call car_ready() when this is the case). Write the code for chassis_ready() and body_ready().• Other synchronization problems / banker’s algorithm / deadlock


View Full Document

CORNELL CS 414 - CS 414 Review Session

Documents in this Course
Security

Security

49 pages

Processes

Processes

24 pages

Deadlocks

Deadlocks

57 pages

Threads

Threads

5 pages

Threads

Threads

29 pages

Deadlocks

Deadlocks

36 pages

Load more
Download CS 414 Review Session
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CS 414 Review Session and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS 414 Review Session 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?