1(a)A web server accepts client requests for web pages. The server
can be designed as a single process or as a process with multiple
threads. Which method is more efficient and why?
(b) If a web server is running Solaris, and the server thread
responsible for processing a request for a web page blocks, what will
be the effect on kernel thread, and user thread, i.e. the status of
the request?
2.. We discussed two variants of thread cancellation asynchronous
and deferred cancellation
a) Explain the problem when using asynchronous cancellation
b) In the Java code-snippet shown below describing how to implement
deferred cancellation, a thread polls a variable to determine if it
should stop. Describe what would happen if the statement // do some
work is where a thread is performing a blocking operation (for I/O as
an example).
b) What type of multiprocessing architecture will be suitable for
multiplication of matrices, and for scheduling of processes by the
kernel on multiple processors, Give reasons for your answer.
3. To implement the soft real-time systems, one condition that is
required is small dispatch lagency, what are two ways by which system
calls can be made preemptible?
4. Explain why spinlocks are not appropriate for uniprocessor systems
you may be suitable for multiprocessor systems.
5. What is the meaning of the term busy waiting? What other kinds of
waiting are there in an operating system? Can busy waiting be avoided
altogether? Explain your answer.
6. Suppose we want to execute the statements S1, S2 and S3 in
sequence, but that S2 has to be executed exclusively for one process
at a time. Write the code needed using semaphores. |