Reference no: EM132797430
THEORICAL PAPER
Rules and regulations:
• Hand written documents will not be accepted
• Paper submitted only in MS word format
• Plagiarism should be less than 15 %
• Formatting line spacing 1.5, Times and new Roman, paragraph justify
• Duplicate paper will be cancelled
• Last submit Date and Time
Answer the following questions.
Q.No.1. (05)
• Does timesharing differ from multiprogramming? If so, How?
• Why API, s needs to be used rather than system calls?
• How Trashing is differing from the Cascading?
• Illustrate with an example about OS a resource Manager.
• Define the time slicing how time slicing affects the working of overall system?
• What does the CPU do when there are no user programs to run?
Q.No.2. (05)
Consider the following set of processes with their CPU burst times/Processing time (milliseconds), arrival times (milliseconds) and priorities. For example, process P1 arrives 11 milliseconds after the start of the system; process has priority (8, 6, 2, 5, 1).
Process
|
Arrival Time (ms)
|
Processing Time (ms)
|
Priority
|
P1
|
11
|
7
|
8
|
P2
|
8
|
1
|
6
|
P3
|
7
|
2
|
2
|
P4
|
4
|
3
|
5
|
P5
|
5
|
1
|
1
|
Find the average turnaround time, completion time, Response time and the average waiting time in the scheduler queue in milliseconds for this set of processes running on a system using each of the scheduling algorithms listed below? Show your work to get any or full points. Draw the Gant Chart and also write down the process execution state.
• Priority Algorithm (Non-Preemptive)
Note: each algorithm explains separately and Priority Colum just for Priority Scheduling Algorithm
Q.No.3. (05)
Consider the following set of processes with their CPU burst times/Processing time (milliseconds), arrival times (milliseconds). For example, process P1 arrives 9 milliseconds after the start of the system;
Process
|
Arrival Time (ms)
|
Processing Time (ms)
|
P1
|
9
|
13
|
P2
|
5
|
16
|
P3
|
6
|
9
|
P4
|
7
|
4
|
P5
|
1
|
3
|
P6
|
10
|
9
|
Find the average turnaround time, completion time, Response time and the average waiting time in the scheduler queue in milliseconds for this set of processes running on a system using each of the scheduling algorithms listed below? Show your work to get any or full points.Draw the Gant Chart and also write down the process execution state.
1. Round Robin scheduling algorithm (quantum = 2 millisecond).
Q.No.4.
Consider the following set of processes with their CPU burst times/Processing time (milliseconds), arrival times (milliseconds). For example, process P1 arrives 4 milliseconds after the start of the system;
Process
|
Arrival Time (ms)
|
Processing Time (ms)
|
P1
|
4
|
3
|
P2
|
5
|
6
|
P3
|
3
|
9
|
P4
|
2
|
4
|
P5
|
1
|
3
|
Find the average turnaround time, completion time, Response time and the average waiting time in the scheduler queue in milliseconds for this set of processes running on a system using each of the scheduling algorithms listed below? Show your work to get any or full points. Draw the Gant Chart and also write down the process execution state.
• Shortest Job First (preemptive).
Q.No.5
Suppose there is 2 copies of resource A, 3 copies of resource B and 3 copies of resource Suppose further that process 1 holds one unit of resources B and C and is waiting for a unit of A; that process 2 is holding a unit of A and waiting on a unit of B; and that process 3 is holding one unit of A, two unit of B and one unit of C. draw the resource allocation graph. Is the system is in deadlock state? Why or why not?
Q.No.6.
Explain what is thrashing in the context of memory. Propose a technique to reduce thrashing. Some computer system uses a virtual memory scheme with the following characteristics:
Type: Hierarchical Forward Mapped
Virtual Memory Address Width: 45 bits Page Size: 16K
Page Table Entry Size: 8 Bytes
Bits of Physical Frame Number in Page Table Entry: 40
Answer the following questions.
Q.No.1.
The description above is for binary semaphore which can take only two values 0 and 1 andensure the mutual exclusion. There is one other type of semaphore called counting semaphore which can take values greater than one.
Now suppose there is a resource whose number of instances is 4. Now we initialize S = 4 and rest is same as for binary semaphore. Whenever process wants that resource it calls P or wait function and when it is done it calls V or signal function. If the value of S becomes zero then a process has to wait until S becomes positive. For example, suppose there are 4 process P1, P2, P3, P4 and they all call wait operation on S (initialized with 4). If another process P5 wants the resource then it should wait until one of the four processes calls signal function and value of semaphore becomes positive. Show the working how the process enters into critical section and also show the working of process block state.
Q.No.2.
Considering a system with five processes P0 through P4 and three resources of type A, B, C. Resource type A has 10 instances, B has 5 instances and type C has 7 instances. Suppose at time t0 following snapshot of the system has been taken:
Show the working of Process execution and also write down the process execution state.
Q.No.3.
Suppose there is 2 copies of resource A, 3 copies of resource B and 3 copies of resource Suppose further that process 1 holds one unit of resources B and C and is waiting for a unit of A; that process 2 is holding a unit of A and waiting on a unit of B; and that process 3 is holding one unit of A, two unit of B and one unit of C. draw the resource allocation graph and also convert into the table. Show the working of Process execution and also write down the process execution state. . Is the system is in deadlock state? Why or why not?
Q.No.4.
Consider we have Six processes P0, P1, . . . P5 and three resources A, B, and C. Is theExecuting the following processes in the safe state? Show the working.