OPERATING SYSTEM
105403Module 2: Processes
Q1a. A process is moved to the ready state when its time quantum expires. (i) Blocked (ii) New (iii) Running (iv) Suspended20242m
Module 2: Processes
View this question on its own page →A process is moved to the ready state when its time quantum expires.
(i) Blocked
(ii) New
(iii) Running
(iv) SuspendedQ1b. Which of the following is also called job scheduler? (i) DMA controller (ii) Short-term scheduler (iii) CPU scheduler (iv) Long-term scheduler20242m
Module 2: Processes
View this question on its own page →Which of the following is also called job scheduler?
(i) DMA controller
(ii) Short-term scheduler
(iii) CPU scheduler
(iv) Long-term schedulerQ1c. Scheduling a process from ready Queue to CPU is done by (i) Short term scheduler (ii) Midle term scheduler (iii) Long term scheduler (iv) Dispatcher20232m
Module 2: Processes
View this question on its own page →Scheduling a process from ready Queue to CPU is done by
(i) Short term scheduler
(ii) Midle term scheduler
(iii) Long term scheduler
(iv) DispatcherQ1c. Define jacketing.20222m
Q1d. Which process can be affected by other processes executing in the system? (i) Independent process (ii) Co-operative process (iii) Dependent Process (iv) child process20242m
Module 2: Processes
View this question on its own page →Which process can be affected by other processes executing in the system?
(i) Independent process
(ii) Co-operative process
(iii) Dependent Process
(iv) child processQ1f. ______ is a technique of improving the priority of process waiting in queue for CPU allocation. (i) starvation (ii) Ageing (iii) Revocation (iv) Relocation20232m
Module 2: Processes
View this question on its own page →______ is a technique of improving the priority of process waiting in queue for CPU allocation.
(i) starvation
(ii) Ageing
(iii) Revocation
(iv) RelocationQ1g. The processes that are residing in main memory and are ready and waiting to execute are kept on a list called (i) job queue (ii) ready queue (iii) execution queue (iv) process queue20192m
Module 2: Processes
View this question on its own page →The processes that are residing in main memory and are ready and waiting to execute are kept on a list called
(i) job queue
(ii) ready queue
(iii) execution queue
(iv) process queueQ1i. Fork is used to (i) dispatch a task (ii) create a new job (iii) create a new process (iv) increase the priority of a task20232m
Module 2: Processes
View this question on its own page →Fork is used to
(i) dispatch a task
(ii) create a new job
(iii) create a new process
(iv) increase the priority of a taskQ1i. When the event for which a thread is blocked occurs? (i) Thread moves to the ready queue (ii) Thread remains blocked (iii) Thread completes (iv) A new thread is provided20222m
Module 2: Processes
View this question on its own page →When the event for which a thread is blocked occurs?
(i) Thread moves to the ready queue
(ii) Thread remains blocked
(iii) Thread completes
(iv) A new thread is providedQ1j. Waiting Time is calculated as (i) Turnaround Time - Burst Time (ii) Turnaround Time - Arrival Time (iii) Completion Time - Arrival Time (iv) Completion Time - Burst Time20242m
Module 2: Processes
View this question on its own page →Waiting Time is calculated as
(i) Turnaround Time - Burst Time
(ii) Turnaround Time - Arrival Time
(iii) Completion Time - Arrival Time
(iv) Completion Time - Burst TimeQ2a. Define Thread? List some of the benefits of multithreading. Demonstrate the three methods to implement Threads.20247m
Module 2: Processes
View this question on its own page →Define Thread? List some of the benefits of multithreading. Demonstrate the three methods to implement Threads.
Q2a. Explain the concept of a process. With the help of a state transition diagram, discuss the various process states.20237m
Module 2: Processes
View this question on its own page →Explain the concept of a process. With the help of a state transition diagram, discuss the various process states.
Q2a. What is process control block?20197m
Q2b. Explain the difference among short-term, medium-term and long-term scheduling.20197m
Module 2: Processes
View this question on its own page →Explain the difference among short-term, medium-term and long-term scheduling.
Q2b. Describe the differences among short term, medium-term, and long-term scheduling.20237m
Module 2: Processes
View this question on its own page →Describe the differences among short term, medium-term, and long-term scheduling.
Q2b. Assume the following workload in a system: | Process | Arrival Time | Burst Time | | :--- | :--- | :--- | | P0 | 1 | 3 | | P1 | 0 | 6 | | P2 | 3 | 2 | | P3 | 4 | 7 | | P4 | 2 | 8 | | P5 | 6 | 5 | Illustrating the execution of these job using Round Robin Scheduling algorithm calculate when given Time Quantum=3 : (i) Average Turn Around Time (ii) Average Waiting Time20247m
Module 2: Processes
View this question on its own page →Assume the following workload in a system:
Process Arrival Time Burst Time P0 1 3 P1 0 6 P2 3 2 P3 4 7 P4 2 8 P5 6 5 Illustrating the execution of these job using Round Robin Scheduling algorithm calculate when given Time Quantum=3 :
(i) Average Turn Around Time
(ii) Average Waiting TimeQ3. Consider the following process: | Process | Arrival Time | Burst Time | | :--- | :--- | :--- | | P1 | 0.0 | 7 | | P2 | 2.0 | 4 | | P3 | 4.0 | 1 | | P4 | 5.0 | 4 | Considering non-preemptive and preemptive SJF algorithm, find out average waiting time and average turnaround time in both cases.201914m
Module 2: Processes
View this question on its own page →Consider the following process:
Process Arrival Time Burst Time P1 0.0 7 P2 2.0 4 P3 4.0 1 P4 5.0 4 Considering non-preemptive and preemptive SJF algorithm, find out average waiting time and average turnaround time in both cases.
Q3a. Differentiate between: (i) User level Thread and Kernel level Thread. (ii) Preemptive scheduling and Non-preemptive scheduling (iii) Contiguous and Indexed allocation method20249m
Module 2: Processes
View this question on its own page →Differentiate between:
(i) User level Thread and Kernel level Thread.
(ii) Preemptive scheduling and Non-preemptive scheduling
(iii) Contiguous and Indexed allocation methodQ3a. Including the initial parent process, how many processes are created by the program shown below? ``c #include<stdio.h> #include<unistd.h> int main() { /*fork a child process */ fork(); /* fork another child process*/ fork(); /* and fork another*/ fork(); return 0; } ``20227m
Module 2: Processes
View this question on its own page →Including the initial parent process, how many processes are created by the program shown below?
#include<stdio.h> #include<unistd.h> int main() { /*fork a child process */ fork(); /* fork another child process*/ fork(); /* and fork another*/ fork(); return 0; }Q3b. Describe the differences among short-term, medium-term, and long-term scheduling.20227m
Module 2: Processes
View this question on its own page →Describe the differences among short-term, medium-term, and long-term scheduling.
Q4a. What are the differences between user-level threads and kernel-level threads? Under what circumstances is one type better than the other?20235m
Module 2: Processes
View this question on its own page →What are the differences between user-level threads and kernel-level threads? Under what circumstances is one type better than the other?
Q4a. An airline reservation system, using a centralized database service, processes user requests concurrently. Is it preferable to use threads rather than processes in this system? Give reasons for your answer.20227m
Module 2: Processes
View this question on its own page →An airline reservation system, using a centralized database service, processes user requests concurrently. Is it preferable to use threads rather than processes in this system? Give reasons for your answer.
Q4b. What resources are used when a thread is created? How do they differ from those used when a process is created?20235m
Module 2: Processes
View this question on its own page →What resources are used when a thread is created? How do they differ from those used when a process is created?
Q4b. Consider a system running ten I/O-bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue an I/O operation once for every millisecond of CPU computing and that each I/O operation takes 10 milliseconds to complete. Also assume that the context-switching overhead is 0.1 millisecond and that all processes are long-running tasks. Describe the CPU utilization for round-robin scheduler when: (i) the time quantum is 1 millisecond; (ii) the time quantum is 10 milli-seconds.20227m
Module 2: Processes
View this question on its own page →Consider a system running ten I/O-bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue an I/O operation once for every millisecond of CPU computing and that each I/O operation takes 10 milliseconds to complete. Also assume that the context-switching overhead is 0.1 millisecond and that all processes are long-running tasks. Describe the CPU utilization for round-robin scheduler when:
(i) the time quantum is 1 millisecond;
(ii) the time quantum is 10 milli-seconds.Q4c. Describe the actions taken by a kernel to context switch between kernel-level threads.20234m
Module 2: Processes
View this question on its own page →Describe the actions taken by a kernel to context switch between kernel-level threads.
Q6. Five batch jobs, A through E, arrive at a computer center at essentially the same time. They have an estimated running time of 15, 9, 3, 6 and 12 minutes, respectively. Their (externally defined) priorities are 6, 3, 7, 9 and 4, respectively, with a lower value corresponding to a higher priority. For each of the following scheduling algorithms, determine the waiting time for each process and the average waiting for all jobs. Ignore process switching overhead. Explain how you arrived at your answers. In the last three cases, assume that only one job at a time runs until it finishes and that all jobs are completely processor bound: (a) Priority scheduling (b) FCFS (run in order 15, 9, 3, 6 and 12) (c) Shortest job first202214m
Module 2: Processes
View this question on its own page →Five batch jobs, A through E, arrive at a computer center at essentially the same time. They have an estimated running time of 15, 9, 3, 6 and 12 minutes, respectively. Their (externally defined) priorities are 6, 3, 7, 9 and 4, respectively, with a lower value corresponding to a higher priority.
For each of the following scheduling algorithms, determine the waiting time for each process and the average waiting for all jobs. Ignore process switching overhead. Explain how you arrived at your answers. In the last three cases, assume that only one job at a time runs until it finishes and that all jobs are completely processor bound:
(a) Priority scheduling
(b) FCFS (run in order 15, 9, 3, 6 and 12)
(c) Shortest job firstQ6a. What is a thread?20195m
Q6b. How is thread different from a process?20195m
Q6c. What resources are used when a thread is created?20194m
Module 2: Processes
View this question on its own page →What resources are used when a thread is created?
Q9d. Write short note on: Process Control Block20237m