operating systems question:
a)What scheduling algorithm(s) provide a bound on response
time?
b)How is this bound implemented? (Explain)
Explain each with a few sentences
a)
b)
With this method,process which request first,that process will get the cpu first.The execution of the FCFS policy is easily managed with a FIFO queue. As a process enters the ready queue, its Process Control Block is linked with the tail of the queue. When the CPU gets free, it is assigned to the process at the head or start of the queue.
Example :-
Consider the following set of processes/jobs which arrive at time 0, with the length of the CPU burst that is given in milliseconds:
| process list | Burst-Time |
| P1 | 24 |
| P2 | 3 |
| P3 | 3 |
When the processes arrive in the order - P1, P2, P3 and is served using FCFS method, you get the outcome as given in the below mentioned Gantt chart:
| P1 | P2 | P3 |
0 24 27 30
A diverse approach to CPU scheduling is the technique of shortest-job-first (SJF) scheduling algorithm which links with each process the length of the process's next CPU burst. If the CPU is available, it is assigned to the process that has the minimum next CPU burst. If the subsequent CPU bursts of two processes become the same, then FCFS scheduling is used to break the tie.
Example :-
An example of SJF scheduling, with the given set of processes below, and the length of the CPU burst in milliseconds:
| Process List | Burst time |
| P1 | 6 |
| P2 | 8 |
| P3 | 7 |
| P4 | 3 |
| P4 | P1 | P3 | P2 |
0 3 9 16 24
A priority is related and assigned with each process, and the CPU gets assigned to the process with the maximum priority. Equal priority processes get scheduled using FCFS method. An SJF algorithm is purely a priority algorithm wherein the priority (P) is the opposite of the (predicted) subsequent CPU burst. The better the CPU burst, the lower the priority is and vice versa.
The round-robin (RR) scheduling technique is intended mainly for time-sharing systems. in this technique,A small unit of time which is termed as a time quantum or time slice has to be defined. A 'time quantum' is usually from 10 to 100 milliseconds. The ready queue gets treated with a circular queue. The CPU scheduler goes about the ready queue, allocating the CPU with each process for the time interval which is at least 1-time quantum.
Another form of scheduling technique has been designed for situations where processes are simply classified into different groups. A multi-level queue scheduling technique partitions or divides the ready queue into many separate queues. The processes get permanently assigned to one queue, usually based on some property of the process, such as the size of the memory, process priority and/or type of process. Each queue got its scheduling algorithm which works at the multilevel form.
operating systems question: a)What scheduling algorithm(s) provide a bound on response time? b)How is this bound...
Given CPU-bound tasks and a choice between FIFO and Round-Robin scheduling algorithms, choose the best algorithm for each of the following systems and specify why you chose the algorithm. 1) multiprogrammed batch system: 2) Interactive, time-sharing system: * CPU Scheduling
The SRPT scheduling policy is important because it minimizes mean response time. Runting suggests that the problem with SRPT is that it picks jobs with the shortest remaining time, whereas to minimize mean slowdown we want to choose jobs that have both short remaining time and also small original size. Runting proposes that we use the RS algorithm, which computes the product of a job's current remaining size (R) and its (original) size (S), and then runs that job whose...
OPERATING SYSTEMS QUESTION: In what kernel data structure is process context stored? explain in a few sentences
1.Six processes A, B, C, D, E, F are run under an operating system which uses priority scheduling. The arrangement is to decrement the priority of a process after it has run for a quantum. In the case of equal priorities, the process suspended for the longest time is chosen to run. The priorities assigned to the processes are 20, 11, 15, 12, 18, 14 respectively, and are all long CPU-bound processes. If the quantum is 100 ms, then how...
a) (25 pts) In round-robin scheduling, explain what size time quantum should be given to CPU bound and I/O bound processes. b) (25 pts) When using the Banker’s algorithm for resource allocation, if the system is in an unsafe state, will that always lead to deadlock? Explain your answer! c) (25 pts) Name and explain at least one difference between a mutex and binary semaphore. d) (25 pts) What is a race condition? Provide sample pseudo-code to illustrate your answer
Briefly explain how the Shortest Remaining Time scheduling algorithm differs from Shortest Job Next.
operating systems question: Below is a set of processes with CPU burst times listed in milliseconds. Assume all processes arrive at time 0 in the order shown. Process CPU burst A 10 ms B 3 ms C 6 ms D 8 ms E 5 ms a) Create a Gantt chart for the Shortest Job First scheduling algorithm. Assume no preemption. Label the ending times of each process. Use this format for your Gantt chart: | W | X | Y...
Operating Systems Questions (Please help if you can) 1. A computer has cache, main memory, and a disk used for virtual memory. If a referenced word is in the cache, 20ns are required to access it. If it is in main memory but not in the cache, 60ns are required to load it into the cache (this includes the time to originally check the cache), and then, the reference is started again. If the word is not in main memory,...
This assignment requires you to create simulations for different
scheduling algorithms commonly employed by operating systems to
achieve multiprogramming. All problems in this assignment assume
the following:
The simulations you will be creating are for a uniprocessor
system (single CPU).
Processes in these simulations will require CPU bursts of one or
more time units followed by I/O bursts of one or more time units.
For simplicity’s sake, when more than one process is executing its
I/O burst at the same...
OPERATING SYSTEMS QUESTION: Given the code below: int main() { pid_t pid; int value = 10; pid = fork(); if (pid == 0) { /* child */ value += 8; printf(“CHILD: value = %d\n”, value); /* Line A */ exit(0); } else { /* parent */ value += 5; wait(NULL); \ printf(“PARENT: value = %d\n”, value); /* Line B */ exit(0); } } What is printed at Line B? Explain why in a few sentences.