Questions for Operating system Lab 2009

prettybadelyngeSoftware and s/w Development

Nov 18, 2013 (3 years and 9 months ago)

130 views

ד"סב

Questions for Operating system Lab 2009

4
.

Exercise


4.1

Provide two programming examples in which multithreading provides better performance
than a single
-
threaded solution.

4.2

What are two differences between user
-
level threads and kernel
-
level t
hreads? Under what
circumstances is one type better than the other?

4.3

Describe the actions taken by a kernel to context switch between kernellevel threads.

4.4

What resources are used when a thread is created? How do they differ from those used when
a
process is created?

4.5

Assume an operating system maps user
-
level threads to the kernel using the many
-
to
-
many
model and the mapping is done through
LWP
s. Furthermore, the system allows developers to
create real
-
time threads. Is it necessary to bind a re
al
-
time thread to an
LWP
? Explain.

4.6

APthread program that performs the summation function was provided in Section 4.3.1.
Rewrite this program in Java.

the

exactly once

semantics for execution of
RPC
s?

4.7

Provide two programming examples in which mu
ltithreading does not provide better
performance than a single
-
threaded solution.

4.8

Describe the actions taken by a thread library to context switch between user
-
level threads.

4.9

Under what circumstances does a multithreaded solution using multiple ker
nel threads
provide better performance than a single
-
threaded solution on a single
-
processor system?

4.10

Which of the following components of program state are shared across threads in a
multithreaded process?


a.

Register values


b.

Heap memory


c.

Globa
l variables


d.

Stack memory