Explain how a “lightweight process” can be used to obtain more control over thread scheduling than simple kernel level threads. (Assume, for your answer, that the OS doesn’t not have priorities for individual threads)
A lightweight process or user-level threads are the single sequence streams within a process. They are used to perform different tasks within the same process. Threads are used to improve the running of a program by implementing concurrency and lesser context switching.
Thread scheduling is the process of allowing a thread which is in a ready state to be executed by the CPU.
Simple kernel-level threads are kernel entities like interrupt handlers. It is an entity that is handled by the system scheduler. It may be referenced by any other thread in the system but a programmer has no direct control over them.
A user-level thread is handled by the programmer and it allows the programmer to control multiple flows fo the program. The scheduling of this is independent of the system scheduler hence much faster.
The system scheduler is responsible for scheduling threads as well as processes, hence each kernel-level thread requires TCB, which increases the complexity of context switching.
Hence using user-level threads over kernel-level threads gives a programmer more freedom to schedule threads
Explain how a “lightweight process” can be used to obtain more control over thread scheduling than...
Memory Management Explain how kernel level threads in the same process are able to have shared memory. Be specific in terms of process layout and memory map. Give a possible approach for a user-level threads package to support memory needed for multiple threads without OS support. Include what parts of memory are unique per thread and what parts are shared by all threads.
1. a. (True/False) A single process can have more than 2 threads. d. (True/False) Every thread has its own virtual address space. f. (True/False) A process may have 0 threads. g. (True/False) Threads belonging to separate processes cannot share memory. h. (True/False) Like function ‘fork’ in the process API, function ‘pthread_create’ creates a clone of the current thread. i. (True/False) Condition variables can be implemented using locks as the only available synchronization primitive. j. (True/False) Dekker’s mutual exclusion algorithm does...
12a Explain briefly (without giving any code) how threads can be used to simplify code that performs asyn- chronous operations such as communicating with an IO controller. 12b Explain briefly the difference between uthread_yield and uthread_block. 12c Is it possible for a thread to unblock itself? Explain your answer. 12d Consider a system in which there is at least one thread on the ready queue when a thread unblocks. What happens to the unblocked thread? Explain.
Describe how an attacker can obtain the one-time pad that is used to encrypt a message, given both the message and the ciphertext, and explain why your method works. Suppose that two equal-sized messages M1 and M2 are encrypted with the same one-time pad and let C1 and C2 be the resulting ciphertexts. Suppose further that an attacker captures both ciphertexts C1 and C2, and knows one of the two messages, say M1. Based on Part a), describe how the...
Description In this homework, you are asked to implement a multithreaded program that will allow us to measure the performance (i.e, CPU utilization, Throughput, Turnaround time, and Waiting time in Ready Queue) of the four basic CPU scheduling algorithms (namely, FIFO, SJE PR, and RR). Your program will be emulating/simulating the processes whose priority, sequence of CPU burst time(ms) and I'O burst time(ms) will be given in an input file. Assume that all scheduling algorithms except RR will be non-preemptive,...
Explain the process of brainstorming and how it can be used in to identify opportunities for performance improvement. Create a brainstorming diagram with example information to support your explanation.
Poisson process can be used to represent the occurrence of structural loads over time. Suppose the mean time between occurrences of loads is 0.59 year. (a) How many loads can be expected to occur during 5.08 3 year period? (b) What the probability that more than five loads occur during a 3 year period? (c) How long must a time period be so that the probability of no loads occurring during that period is at most 0.10? X year
Poisson...
some of these choices can be used more than once. please
explain each answer
Choices: rRNA, TRNA, miRNA, mRNA Typically forms internal base pairs to form a "cloverleaf" structure The primary transcript is larger than the final, mature form Associates with proteins to form the ribosome Rrosha is needed to process this form of RNA Contains protein-coding regions This form of RNA contains the largest variety of nucleotide modifications SNORNAs are used to guide modifications of this form of RNA...
Please explain how to do part (b), (c) and (d) only
The PID control architecture might be popular, but that does not mean it can be used for everything. This question explores when the PID controller is (in)sufficient: when it is too much, when it is "goldilocks", and when it is not enough. Consider a plant given by P'(s)-SaAs n increases, so does the order of the system. (sta)" Let's consider three orders and how PID controller design works for...
An article suggests that a Poisson process can be used to represent the occurrence of structural loads over time. Suppose the mean time between occurrences of loads is 0.5 year. (a) How many loads can be expected to occur during a 2-year period? loads (b) What is the probability that more than seven loads occur during a 2-year period? (Round your answer to three decimal places.) (c) How long must a time period be so that the probability of no...