What is the difference between preemptive scheduling and time slicing

Under preemptive scheduling, the highest priority task executes until it enters the waitingor dead states or a higher priority task comes into existence. Under time slicing, a taskexecutes for a predefined slice of time and then reenters the pool of ready tasks. Thescheduler then determines which task should execute next, based on priority andother factors.

Showing Answers 1 - 4 of 4 Answers

ramu

  • Mar 10th, 2006
 

1.    Pre-emptive Scheduling.

Ways for a thread to leave running state -

?         It can cease to be ready to execute ( by calling a blocking i/o method)

?         It can get pre-empted by a high-priority thread, which becomes ready to execute.

?         It can explicitly call a thread-scheduling method such as wait or suspend.

 

?         Solaris JVM?s are pre-emptive.

?         Windows JVM?s were pre-emptive until Java 1.0.2

 

2.    Time-sliced or Round Robin Scheduling

?         A thread is only allowed to execute for a certain amount of time. After that, it has to contend for the CPU (virtual CPU, JVM) time with other threads.

?         This prevents a high-priority thread mono-policing the CPU.

?         The drawback with this scheduling is ? it creates a non-deterministic system ? at any point in time, you cannot tell which thread is running and how long it may continue to run.

 

?         Mactinosh JVM?s

?         Windows JVM?s after Java 1.0.2

  Was this answer useful?  Yes

SANDEEP YADAV (AEC,AGRA)

  • Oct 1st, 2011
 

1:Under preemptive scheduling,the highest priority job is executed first whereas in non preemptive scheduling priority does not require and executed as order of entry.
2:preemptive scheduling require extra hardware to design means costly(like timer) whereas nonpreemptive scheduling does not require extra hardware.
3:primitive scheduling construction require change in operating system kernel structure whereas kernel structure does not require to change in case of nonpreemptive scheduling.



SANDEEP YADAV
ANAND ENGG. COLLEGE , AGRA(U.P)

  Was this answer useful?  Yes

Tejas Chavan

  • Oct 18th, 2011
 

preemptive Scheduling:- the highest priority thread executes First that means when one thread is in running state that time the highest priority interrupt enters then this interrupt will executes first & the the Idle thread will run & executes

Time Scaling:- In the time Slicing the time will assigned to the thread to execute. After the one thread executed then the next thread will get in running state.

  Was this answer useful?  Yes

Madhuri Hasure

  • Sep 27th, 2012
 

Preemptive scheduling enables the highest priority task execution until waiting or dead states entered. It also executes, until a higher priority task enters.

Time slicing allows a task to execute for a stipulated time slice and then reenters the pool of ready tasks. At that time the scheduler determines the executable task, based on the priority and various other tasks.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions