- Internally defined
priorities: These priorities make use of some quantities that can be
measured for computing a process’s priority. These quantities include
memory requirements, time limits, ration of the I/O burst and CPU burst,
number of files and so on.
- Externally defined
priorities: These priorities are defined by some criteria that are
external to the operating system. Such factors include political factors,
department leading the work; importance of the process, amount of money
paid and so on.
Wednesday, June 19, 2013
Explain the Priority CPU scheduling algorithm
Posted by
Sunflower
at
6/19/2013 01:18:00 PM
0
comments
Labels: Algorithm, CPU, Execution, Non-preemptive, Operating System, Preemptive, Priority, Priority CPU Scheduling Algorithm, Process, Processor, Resources, Schedule, Scheduling, Shortest Job First, Waiting
|
| Subscribe by Email |
|
Monday, June 17, 2013
Explain the Round Robin CPU scheduling algorithm
How to implement Round Robin CPU scheduling algorithm
- The ready queue is maintained as the FIFO
(first in first out) queue of the processes.
- Addition of new processes is made at the rear
end of the ready queue and selection of the process for execution by the
processor is made at the front end.
- The process first in the ready queue is thus
picked by the CPU scheduler. A timer is set that will interrupt the
processor when the time slice elapses. When this happens the process will
be dispatched.
- In some cases the CPU burst of some processes
may be less than the size of the time slice. If this is the case, the
process will be voluntarily released by the CPU. The scheduler will then
jump to the process next in the ready queue and fetch it for execution.
- While in other cases the CPU burst for some
processes might be higher than the size of the time slice. In this case
the timer set will send an interrupt to the processor, thus dispatching
the process and putting it at the rear end of the ready queue. The
scheduler will then jump to the next process in the queue.
Posted by
Sunflower
at
6/17/2013 04:47:00 PM
0
comments
Labels: Algorithm, Conditions, CPU, Implementation, Operating System, Preemption, Processes, Processor, Queue, Ready, Round Robin, Scheduling, Scheduling algorithm, System, Time, Time sharing, Waiting
|
| Subscribe by Email |
|
Saturday, June 15, 2013
What is Process State Diagram?
Process States
Posted by
Sunflower
at
6/15/2013 09:36:00 PM
0
comments
Labels: CPU, Diagram, Events, Input, Memory, Multiple, Multitasking, Operating System, Primary, Process, Process Sate Diagram, Processors, Queue, Ready, Secondary, States, Time, Transition, Waiting
|
| Subscribe by Email |
|
What is CPU Scheduling Criteria?
What Criteria is used by algorithms for Scheduling?
Below mentioned are some of the criteria used by these algorithms for scheduling:
1. CPU utilization:
- It is a property of a good system to keep the CPU as busy as possible all the time.
- Thus, this utilization ranges from 0 percent to 100 percent.
- However, in the systems that are loaded lightly, the range is around 40 percent and for the systems heavily loaded it ranges around 90 percent.
2. Throughput:
- The work is said to be done if the CPU is busy with the execution of the processes.
- Throughput is one measure of CPU performance and can be defined as the number of processes being executed completely in a certain unit of time.
- For example, in short transactions throughput might range around like 10 processes per second.
- In longer transactions this may range around only one process being executed in one hour.
3. Turnaround time:
- This is an important criterion from the point of view of a process.
- This tells how much time the processor has taken for execution of a processor.
- The turnaround time can be defined as the time duration elapsed from the submission of the process till its completion.
4. Waiting time:
- The amount of time taken for the process for its completion is not affected by the CPU scheduling algorithms.
- Rather, these algorithms only affects the time when the process is in waiting state.
- The time for which the process waits is called the waiting time.
5. Response time:
- The turnaround is not a good criterion in all the situations.
- The response time is favorable in the case of the interactive systems.
- It happens many a times that a process is able to produce the output in a fairly short time compared to the expected time.
- This process then can continue with the next instructions.
- The time taken for a process from its submission till production of the first response is calculated as the response time and is another criterion for the CPU scheduling algorithms.
All these are the primary performance criteria out of which one or more can be selected by a typical CPU scheduler. These criteria might be ranked by the scheduler depending up on their importance. One common problem in the selection of performance criteria is the possibility of conflict ion between them.
For example, increasing the number of active processes will increase the CPU utilization but at the same time will decrease the response time. This is often desirable to produce reduction in waiting time and turnaround time also. In a number of cases the average measure is optimized. But there are certain cases also where it is more beneficial to optimize the maximum or the minimum values.
It is not necessary that a scheduling algorithm that maximizes the throughput will decrease the turnaround time. Out of a mix of short and long jobs, if a scheduler runs only the short jobs, it will produce the best throughput. But at the same time the turnaround time for the long jobs will be so high which is not desirable.
Posted by
Sunflower
at
6/15/2013 09:22:00 AM
0
comments
Labels: Algorithms, CPU, Criteria, Input, Load, Multiprocessor, Multitasking, Output, Performance, Processes, Response, Schedule, Scheduling, System, Throughput, Time, Transaction, Turnaround, Utilization, Waiting
|
| Subscribe by Email |
|
Saturday, May 11, 2013
What is meant by Deadlock? List the necessary conditions for arising deadlocks?
Conditions for a Deadlock to arise
- Mutual exclusion: There has
to be at least one resource that cannot be shared. So that only one
process would use at any given time.
- Resource holding (or hold
and wait): There should be at least one resource held by a process that in
turn should be request more resources that are being held by other
processes.
- No preemption: Once the
resources have been allocated, they should not de-allocated by the
operating system. The condition is that the process holding the resource
must release it voluntarily.
- Circular wait: A circular
chain of processes must be formed as explained in the earlier example.
- Ignoring deadlock
- Detection
- Prevention
- Avoidance
Posted by
Sunflower
at
5/11/2013 09:48:00 PM
0
comments
Labels: Actions, Approaches, Arise, Avoid, Compete, Conditions, Deadlock, Detection, Operating System, OS, Preemption, Processes, Resources, Situation, System, Threads, Wait, Waiting
|
| Subscribe by Email |
|