Question

In: Computer Science

Name one advantage of associating user threads with kernel thread? Suggest an advantage and disadvantage of...

  1. Name one advantage of associating user threads with kernel thread?
  2. Suggest an advantage and disadvantage of using mailboxes over shared memory for inter-process communication.

Solutions

Expert Solution

<A> Advantage of associating user threads with kernel thread :

The kernel knows and manages the threads.

In this case no runtime system is needed. rather than thread table in each process, the kernel has a thread table that always keeps track of all threads in the system.

Also, the kernel maintains the "traditional process table "to keep track of processes.

Operating Systems kernel provides system call to create and manage threads(s).

<B> Advantage and disadvantage of using mailboxes over shared memory for inter-process communication :

# Advantages :

@ Sender and receivers can be on different machines(s).

@ It is relatively secure :Receiver can inspect the messages it has received before processing them,which increases the security .

# Disadvantages:

@ It is difficult to use : Each and every data transfer requires a " send() " and a " receive() " which is a drawback.

@ Receiving process must also expect the send() : This  might require forking a special thread ,which is not good.


Related Solutions

Threads: Assume a multithreaded application using user level threads mapped to a single kernel level thread...
Threads: Assume a multithreaded application using user level threads mapped to a single kernel level thread in one process (Many to one model). Describe the details of what happens when a thread (i.e. thread 1) executes a blocking system call (5 points). Describe what happens when thread 1 yields control to another user level thread, namely thread 2, in the same process. (NOTE: include the following in your description: what state is saved?, where is it saved? What state is...
1. Why there needs to be user thread and kernel thread? 2. What are the advantages...
1. Why there needs to be user thread and kernel thread? 2. What are the advantages and disadvantages of writing an operating system in a highlevel language, such as C? 3. What is a critical section problem? Demonstrate that with an example. 4. With an example, show how critical section can led to dead locks. 5. Write two differences between a network OS and a distributed OS. 6. Identify the following environments as hard, firm or soft real time. Give...
Which of the methods used to map user threads to kernel threads can exploit a multiprocessor...
Which of the methods used to map user threads to kernel threads can exploit a multiprocessor environment? Justify your answer
Which of the methods used to map user threads to kernel threads can exploit a multiprocessor...
Which of the methods used to map user threads to kernel threads can exploit a multiprocessor environment? Justify your answer.
Name an advantage and a disadvantage of giving a medication orally ?
Name an advantage and a disadvantage of giving a medication orally ?
Thread Programming (C Programming) Objective Develop threads: thread and main. Functionality of Threads: The main program...
Thread Programming (C Programming) Objective Develop threads: thread and main. Functionality of Threads: The main program accepts inputs from the user from the console. The user can provide the following two types of input: add num1 num2 mult num1 num2 Here, num1 and num2 are two integer numbers. E.g., the user may input add 1 2. The threads receive the command along with the number, and performs the appropriate arithmetic operation and returns the results to main program. The main...
In a system with threads, is there normally one stack per thread or one stack per...
In a system with threads, is there normally one stack per thread or one stack per process? Explain.
What are one advantage and one disadvantage of allowing the modification of loop variables in the...
What are one advantage and one disadvantage of allowing the modification of loop variables in the loop body?
DO THIS IN JAVA Write a complete Java program. the program has two threads. One thread...
DO THIS IN JAVA Write a complete Java program. the program has two threads. One thread prints all capital letters 'A' to'Z'. The other thread prints all odd numbers from 1 to 21.
One advantage and one disadvantage of minimum wage with respect to poverty and inequality, and give...
One advantage and one disadvantage of minimum wage with respect to poverty and inequality, and give one example of each one?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT