Professional Documents
Culture Documents
Assignment No. 2: Instructions
Assignment No. 2: Instructions
Assignment No. 2: Instructions
INSTRUCTIONS:
I. All questions are compulsory.
II. There are total five questions.
III. The paper is closed book.
Answer:
Question#2: What are two differences between user level threads and kernel level
threads? Under what circumstances is one type better than the other?
Answer:
Client level strings are obscure by the bit, while the bit knows about bit strings.
On frameworks utilizing either M:1 or M:N planning, client strings are booked by the
string library and the portion plans bit strings.
Piece strings need not be related with an interaction though every client string has a
place with a cycle. Portion strings are for the most part more costly to keep up than
client strings as they should be addressed with a bit information structure.
Question#3: Describe the actions taken by a kernel to context switching between kernel
level threads.
Page 1 of 2
%
Enrollment Number: 01-134191-081
Answer:
Setting exchanging between bit strings regularly requires saving the estimation of the CPU
registers from the string being changed out and reestablishing the CPU registers of the new
string being planned.
Question#4: What resources are used when a thread is created? How do they differ from
those used when a process is created?
Answer: Since a string is more modest than an interaction, string creation commonly utilizes
less assets than measure creation. Making a cycle requires allotting an interaction control
block (PCB), an enormous information structure. The PCB incorporates a memory map,
rundown of open documents, and climate factors. Designating and dealing with the memory
map is regularly the most tedious movement. Making either a client or part string includes
apportioning a little information construction to hold a register set, stack, and need.
Question#5: Can a multithreaded solution using multiple user level threads achieve
better performance on a multiprocessor system than on a single processor system?
Explain.
Answer: Certainly. On a single-core system, the one core has no choice but to timeslice itself
among the ready-to-execute threads, whereas in a multi core system there can be multiple
threads executing simultaneously, up to the number of available cores, without incurring a
penalty for having to divide a single core’s available time.
Page 2 of 2