Given the following batch jobs Calculate the mean turnaround time (MTT) using the Shortest Job First non-preemptive scheduling algorithm. Answer with a number. For example “3.45” or “3”. Priority 0 is the lowest priority.
Blog
For each of the following, select True or False: 1. Deadlock…
For each of the following, select True or False: 1. Deadlocks cannot occur with the flagging interest approach to busy waiting because each process indicates its interest in entering the critical region by setting a flag. [flag] 2. By combining the ideas of alternating turns and flagging interest, the Peterson Solution to busy waiting avoids deadlocks. [peterson] 3. When using a mutex, the process will block and yield the CPU if it cannot acquire the lock, rather than spinning. [mutex] 4. Mutual exclusion via message passing is limited to processes on the same machine. [message]
For each of the following statements regarding procedure cal…
For each of the following statements regarding procedure calls, mark true or false: 1. Parameters can be passed by name, using a variable’s name directly. [varName] 2. Procedure calls are named code. [nameCode] 3. A pointer to entry/return is typically found in a procedure call. [Pointer] 4. Procedure calls never contain local variables. [local]
Select which of the following are true for kernel space thre…
Select which of the following are true for kernel space threads: Processes running in user space may spawn kernel threads without making a system call. [1] Kernel threads may be blocked individually. [2] Implementations of kernel threads are OS specific. [3] A thread table in user space contains information about kernel threads. [4] Both system and procedure calls may manage kernel threads [5]
Mark true or false regarding Critical Regions: 1. Critical R…
Mark true or false regarding Critical Regions: 1. Critical Regions are regions of code that we must protect (e.g. from interruptions.) [1] 2. Issues related to race conditions can be solved by identifying critical regions. [2] 3. We must have some atomic operations (indivisible) or at least equivalency to define/implement critical regions. [3] 4. Locking and Unlocking are operations that help define critical regions. [4]
Select which scheduler corresponds to each statement: 1. The…
Select which scheduler corresponds to each statement: 1. The goal is to maximize throughput [1] 2. One of its constraints involves being lightweight [6] 3. Also called the memory scheduler[3] 4. Decided what remains in memory and what gets placed back into storage[4] 5. Generally not used in interactive operating systems [2] 6. Decide which process gets to be executed next in the CPU[5]
Preemptive scheduling is typically used with interactive ope…
Preemptive scheduling is typically used with interactive operating systems. Match these classic scheduling algorithms: Shortest Remaining Time First, Round Robin, Preemptive Priority, and Compatible Time-Sharing System with their definitions.
Consider the following pseudocode for threads that communica…
Consider the following pseudocode for threads that communicate using a Linux pipe (message passing). What is the order that the functions (e.g. horse(), cat(), etc) run in? Note that, with Pipes, the receiving operation blocks the thread until the message is received. pipe pipe1 = new Pipe(); pipe pipe2 = new Pipe(); void thread1() { receive_from_pipe(pipe1); zebra(); horse(); write_to_pipe(pipe2, “msg1”); receive_from_pipe(pipe1); waterfall(); write_to_pipe(pipe1, “msg3”); receive_from_pipe(pipe1); } void thread2() { cat(); write_to_pipe(pipe1, “msg2”); receive_from_pipe(pipe2); dog(); write_to_pipe(pipe1, “msg4”); }
For each question about Processes, choose True or False: 1….
For each question about Processes, choose True or False: 1. In the process model, a process has independence of execution. A process does not depend on any other processes executing. [1] 2. Processes are created by System initialization (“init”) or by Process request, which is technically called “spoon”. [2] 3. Another process signaling the termination of the current process is a voluntary Normal Exit [3] 4. All processes have memory areas for the stack, the heap, the pipes, and text while running [4]
Given the following batch jobs Calculate the mean turnaroun…
Given the following batch jobs Calculate the mean turnaround time (MTT) using the Shortest Job First non-preemptive scheduling algorithm. Answer with a number. For example “3.45” or “3”. Priority 0 is the lowest priority.