Bug 103189 - SETSCHEDULER man page is unclear about FIFO scheduling
SETSCHEDULER man page is unclear about FIFO scheduling
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: man-pages (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-27 11:23 EDT by Sitsofe Wheeler
Modified: 2007-04-18 12:57 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-04-16 10:29:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Sitsofe Wheeler 2003-08-27 11:23:34 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.5a) Gecko/20030801
Mozilla Firebird/0.6.1

Description of problem:
The man page for sched_setscheduler is unclear as to how a running SCHED_FIFO'd
process responds when a process which has also been SCHED_FIFO'd of the same
priority comes along.

The man page contains the following description:
"When a SCHED_FIFO process becomes runnable, it  will be inserted at the end of
the list for its priority. A call to sched_setscheduler  or  sched_setparam 
will  put  the  SCHED_FIFO  (or SCHED_RR)  process identified by pid at the
start of the list if it was runnable.  As a consequence, it may preempt the
currently running  process  if  it  has the same priority."

Later it goes on to say:
"A SCHED_FIFO process runs until either it is blocked by an I/O request, it is
preempted by a higher priority process, or it calls sched_yield."

As such it is not wholely clear what happens if I set up one process with a
scheduler of SCHED_FIFO and another process with the same scheduler priority
also with SCHED_FIFO. Does the second preempt the first (as the first quote
suggests) or does the second remained queued until the first blocks or yields
(as the second quote suggests)? Does preemption only happen when the scheduler
for the the second process is changed?

Version-Release number of selected component (if applicable):
man-pages-1.53-3

How reproducible:
Always

Steps to Reproduce:
1. man sched_setscheduler
2. Read the chapter titled SCHED_FIFO: First In-First Out scheduling
3. Try to work out whehther a a running SCHED_FIFO task will be preempted by
another SCHED_FIFO task of the same priority and if so when it will happen.

Actual Results:  !cONFusioN

Expected Results:  Clarity.

Additional info:
Comment 1 Eido Inoue 2004-04-16 10:29:13 EDT
According to man-pages-1.66, the sentence in between your two
sentences says "No other events will move a process scheduled ... in
the wait list ... with equal static priority." and it says that POSIX
1003.1 says the process with go to the end of the list. So the answer
is no, it will no be pre-empted if you later add a process of the same
priority, which goes to the bottom of the list.

Note You need to log in before you can comment on or make changes to this bug.