Question: Question 1: Operating System ( Examine 1.1 CLO) [ ] /0.5 M arks Question: Answer the following Question: The issue of resource utilization shows up
| Question 1: | Operating System ( Examine 1.1 CLO) | [ ] /0.5 Marks |
| Question: Answer the following Question: | ||
The issue of resource utilization shows up in different forms in different types of operating systems. List what resources must be managed carefully in the following settings:
a. Mainframe or minicomputer systems
b. Workstations connected to servers
c. Handheld computers
|
|
|
|
| ||
| Question 2: | Process ( Examine 2.1 in CLO) | Minutes [ ] / 1.5 Marks | |||
| Question: Answer the following Questions | |||||
- What is the output of the following program? Assume that the actual id for the parent process is 1000, and for the child process is 2000. (2 marks 0.5 for each correct answer)
| #include #include #include
int main() { pid_t id1, id2;
id1 = fork(); if (id1 < 0) { fprintf(stderr, "Fork Failed"); return 1; } else if (id1 == 0) { id2 = getpid(); printf("child: id1 = %d",id1); printf("child: id2 = %d",id2); } else { id2 = getpid(); printf("parent: id1 = %d",id1); printf("parent: id2 = %d",id2); wait(NULL); } return 0; }
|
Answer:
Child: id1 = 0
Child: id2 = 2000
Parent: id1 = 1000
Q2) How many processes are created by the following program, including the initial process. (1 Marks)
| #include #include
int main() { int i; for (i = 0; i < 5; i++) fork(); return 0; }
|
Answer: 25 = 32.
|
|
|
|
| ||
| Question 3: | CPU Scheduling( Examine 2.1 in CLO) | Minutes [ ] / 3 Marks | |||
| Question: Consider the following set of processes, with the length of the CPU burst given in milliseconds:
| |||||
Process Burst Time Priority
P1 2 2
P2 1 1
P3 8 4
P4 4 2
P5 5 3
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.
- Draw Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: SJF, nonpreemptive priority ( Highest number indicates higher priority)
(2.5 Marks 0.25 for each correct answer (correct Process in correct order with correct time))
- What is the waiting time of each process for each of these scheduling algorithms?
( 2.5 Marks 0.25 for each correct waiting time)
- Which of the algorithms results in the minimum average waiting time (over all processes)?
( 1 Mark )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
