0

It is correct that ideally preemption of task by other task is allowed by only RTOS systems, while in non RTOS system a task can be preempted by an Interrupt or ISR and not another task.

Also the below statement is correct for preemptive kernel, is it also applicable to preemptive tasks.

"most operating systems do not allow this but it is required for certain applications such as in real time systems"

Anuj Priyadarshi
  • 347
  • 4
  • 16
  • You asked more-or-less the same question a few days ago and accepted the answer. What was not clear about that answer? If it was not clear why did you accept it? Your last paragraph is in quotes, but there is no citation. It is also not true, Windows, Linux, OSX (and other Unix OSs), are all preemptive operating systems that are not RTOSes (as explained in the accepted answer to your previous near identical question). – Clifford Jun 11 '16 at 14:16
  • Possible duplicate of [Is interruption between task is possible in Non RTOS system](http://stackoverflow.com/questions/37518975/is-interruption-between-task-is-possible-in-non-rtos-system) – Clifford Jun 11 '16 at 14:19

1 Answers1

0

RTOS stands for Real Time Operating Systems.

You must compare various scheduling algorithms like FCFS,SJF,Priority Scheduling,Round-Robin Multiple queue, etc . Each have there pros and cons. Then you can figure out why we use priority preemptive in rtos. Because thats the need. Example Vxworks has priority preemtive but when two tasks of same priority comes it goes for round robin.

"most operating systems do not allow this but it is required for certain applications such as in real time systems". This isn't true as most modern operating systems are preemptive for better performance.

Check the comments. Informational link

sourav punoriyar
  • 830
  • 8
  • 18
  • Thanks. The question here is whether non rtos systems use prioirty preemptive or not. If not not then is it correct to say that only ISR can interrupt a task and not other tasks. – Anuj Priyadarshi Jun 10 '16 at 04:49
  • But it is not even true; most modern operating systems *are* preemptive. – Clifford Jun 11 '16 at 14:17
  • @Clifford Yes most operating systems are preemptive for better performance. Preemption can also be a problem if the kernel is busy implementing a system call ( e.g. updating critical kernel data structures ) when the preemption occurs .Most modern UNIXes deal with this problem by making the process wait until the system call has either completed or blocked before allowing the preemption this makes it nondeterministic.This can be problem for rtos. Also since "TIME" is the major factor in "RTOS" . We cannot expect delays So Priority Preemptive suits it. Correct me if i am wrong. – sourav punoriyar Jun 13 '16 at 05:15
  • 1
    I made all those points in the duplicate question (asked by the same person, just days before). But here the question was whether preemption occurs *only* in an RTOS, and you have not been clear on that - in fact you have not really answered it at all. The question also had an unattributed quote (the untrue part) that you repeated without criticism. – Clifford Jun 13 '16 at 06:56
  • @Clifford You gave a very clear answer. I also got some of my doubts clear. I just wanted him to research it out . Thanks – sourav punoriyar Jun 13 '16 at 07:27