- 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 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 |
|
Thursday, May 30, 2013
What are the various Desk Scheduling methods?
About Disk Scheduling
- User processes: The functions
of this layer including making I/O calls, formatting the I/O and spooling.
- Device independent software: Functions are naming, blocking, protection, allocating and buffering.
- Device drivers: Functions
include setting up the device registers and checking their status.
- Interrupt handlers: These
perform the function of waking up the I/O drivers up on the completion of
the I/O.
- Hardware: Performing the I/O
operations.
Algorithms for Scheduling Disk Requests
Ways to attach to a disk
Posted by
Sunflower
at
5/30/2013 01:09:00 PM
0
comments
Labels: Algorithms, device, Disk, Disk Drive, Disk Scheduling, Hardware, Input, Interrupts, Layers, Logical, Methods, Output, Performance, Process, Requests, Scheduling, Software, Time, User, Wait
![]() | Subscribe by Email |
|
Sunday, May 19, 2013
What are different types of schedulers and their workings?
Important things about Scheduler
- Throughput
- Latency inclusive of
the response time and the turnaround time
- Waiting time or the
fairness time
Types of Schedulers
Posted by
Sunflower
at
5/19/2013 09:05:00 PM
0
comments
Labels: Long-term, Memory, Middle-term, Multiplexing, Multitasking, Operating System, OS, Process, Processor, Queue, Requests, Requirements, Resources, Schedulers, Scheduling, Short-term, System, Tasks, User
![]() | Subscribe by Email |
|
Saturday, May 4, 2013
What is Context Switch?
Potential Triggers for a Context Switch
Posted by
Sunflower
at
5/04/2013 08:35:00 PM
0
comments
Labels: Context Switch, Execution, Hardware, Interrupt handling, Interrupts, Kernel, Multitasking, Operating System, Process, program, Restore, Scheduling, state, Storing, Switching, Triggers, User
![]() | Subscribe by Email |
|
Friday, May 3, 2013
What is a Dispatcher?
- Long-term schedulers
- Medium-term schedulers
- Short-term schedulers
- Switching the context
- Turning on the user code
- Making a jump to the exact location of the
program from where it has to be restarted.
Process of Dispatcher
- The program presently having
the context is executed by the processor. Things used by this program
include stack base, flags, program counter, and registers and so on. There
is a possible exception of the reserved register that is native to the
operating system. The executing program does not have any knowledge
regarding the dispatcher.
- For dispatcher a timed
interrupt is triggered. Here the program counter jumps to the address listed
in the BIOS interrupt. This marks the beginning of the execution of the
dispatch sub routine. The dispatcher then deals with the stacks and the
registers etc. of the program that raised the interrupt.
- Dispatcher like the other
programs consists of some sets of instructions that operate up on the
register of the current program. These instructions know everything of the
previously executed programs. Out of these, the first few instructions are
responsible for storing the state of the program.
- Dispatcher next determines
which program should be given the CPU next for executing. Now it deletes
all the statistics of the previously executed state and fills in the
details of the next process to be executed.
- Dispatcher jumps to the address
mentioned in the program counter and establishes a full context on the
processor.
Posted by
Sunflower
at
5/03/2013 06:00:00 PM
0
comments
Labels: Context, Control, CPU, Dispatch, Dispatcher, Execute, Location, Memory, Operating System, Process, Processor, program, Registers, Schedulers, Scheduling, Switching, Time, User, Values
![]() | Subscribe by Email |
|
Thursday, May 2, 2013
What is a CPU Scheduler?
- Throughput: It is the ratio of total number of
processes executed to a given amount of time.
- Latency: This factor can be sub – divided in
to two namely response time and the turnaround time. Response time is the
time taken from the submission of the process till its output is produced
by the processor. The latter i.e., the turnaround time is the time period
elapsed between the process submission and its completion.
- Waiting/ fairness time: This is the equal CPU
time given to each process or we can say that the time is allocated as
per the priority of the processes. The time for which the processes wait
in the ready queue is also counted in this.
Types of CPU Schedulers
Posted by
Sunflower
at
5/02/2013 05:28:00 PM
0
comments
Labels: Algorithm, Communication, CPU, CPU Scheduling, Data, Latency, Memory, Methods, Multi-tasking, Operating System, Resources, Scheduling, System, Tasks, Throughput, Transmit, Types, Waiting time
![]() | Subscribe by Email |
|
Saturday, April 20, 2013
Explain the concepts of threads and processes in operating system?
Posted by
Sunflower
at
4/20/2013 08:29:00 PM
0
comments
Labels: Access, Attributes, Concept, Location, Memory, Multi-tasking, Multi-threading, Mutants, Mutual Exclusions, Operating System, Priority, Processes, Resources, Scheduling, Synchronize, Threads, Uses
![]() | Subscribe by Email |
|
Wednesday, April 17, 2013
What are Real-time operating systems?
- The soft real –time operating system: It
produces more jitter.
- The hard real – time operating system: It
produces less jitter when compared to the previous one.
- Minimal interrupt latency and
- Minimal thread switching latency.
- Time sharing design: As per
this design, the tasks are switched based up on a clocked interrupt and events
at regular intervals. This is also termed as the round robin scheduling.
- Event – driven design: As per
this design, the switching occurs only when some other event demands
higher priority. This is why it is also termed as priority scheduling or
preemptive priority.
- Running or executing on CPU
- Ready to be executed
- Waiting or blocked for some
event
Posted by
Sunflower
at
4/17/2013 07:05:00 PM
0
comments
Labels: Algorithms, Applications, Data, Design, Events, Factors, Features, Hard, Multi-tasking, Operating System, OS, Priority, Process, Real time Operating system, Scheduling, soft, System, Tasks, Throughput, Types
![]() | Subscribe by Email |
|