Threads

Question 1
A Thread is also called
A
a scheduler
B
a virtual process
C
a heavyweight process
D
a lightweight process
       Operating-Systems       Threads       KVS DEC-2017
Question 1 Explanation: 
→ A light-weight process (LWP) is a means of achieving multitasking.
→ A LWP runs in user space on top of a single kernel thread and shares its address space and system resources with other LWPs within the same process. Multiple user level threads, managed by a thread library, can be placed on top of one or many LWPs - allowing multitasking to be done at the user level, which can have some performance benefits.
Question 2
One of the disadvantages of user level threads compared to Kernel level threads is
A
If a user level thread of a process executes a system call, all threads in that process are blocked.
B
Scheduling is application dependent.
C
Thread switching doesn’t require kernel mode privileges.
D
The library procedures invoked for thread management in user level threads are local procedures.
       Operating-Systems       Threads       UGC NET CS 2017 Jan- paper-3
Question 2 Explanation: 
TRUE: If a user level thread of a process executes a system call, all threads in that process are blocked.
FALSE: Scheduling is application dependent.
FALSE: Thread switching doesn’t require kernel mode privileges.
FALSE: The library procedures invoked for thread management in user level threads are local procedures.
Advantage:
1. user-level threads package can be implemented on an Operating System that does not support threads.
2. User-level threads does not require modification to operating systems.
3. Simple Representation: Each thread is represented simply by a PC, registers, stack and a small control block, all stored in the user process address space.
4. Simple Management: This simply means that creating a thread, switching between threads and synchronization between threads can all be done without intervention of the kernel.
5. Fast and Efficient: Thread switching is not much more expensive than a procedure call.
Disadvantages:
1. User-Level threads are not a perfect solution as with everything else, they are a trade off.
2. There is a lack of coordination between threads and operating system kernel.
3. User-level threads requires non-blocking systems call i.e., a multithreaded kernel.
There are 2 questions to complete.
PHP Code Snippets Powered By : XYZScripts.com