LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-29-2004, 01:35 AM   #1
ttianhuat
LQ Newbie
 
Registered: Jan 2004
Posts: 1

Rep: Reputation: 0
Some Question on linux process management..


Hi!~

I face some problem when researching the red hat linux 8.0...Hope somebody can help...
1)What is the Linux default time slice?
2)Linux is preemptive or non preemptive?
**3)How to list out all running process in Red Hat Linux 8.0?
4)What is the linux scheduler?(priority,round robin etc....)...and can it be improved any way, or just is perfect?

Thanks a lot for answering
 
Old 01-29-2004, 01:44 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Re: Some Question on linux process management..

Quote:
Originally posted by ttianhuat
1)What is the Linux default time slice?
Sorry, don't know (never cared).

Quote:
2)Linux is preemptive or non preemptive?
Pre-emptive.

Quote:
**3)How to list out all running process in Red Hat Linux 8.0?
ps -A (pretty much any distro).

Quote:
4)What is the linux scheduler? (priority,round robin etc....)...and can it be improved any way, or just is perfect?
It's actually perfect :} ... there are patches to modify
the behaviour, though, like even pre-empt kernel
level activities to make desktops even more responsive.

You can re-prioritse tasks using nice (man nice for details).



Cheers,
Tink
 
Old 01-29-2004, 05:20 AM   #3
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
linux 2.4.* and lower are non preemtive, only 2.5.(i 4got when but its a development brach so we dont care ) and up are preemtive built in, there are patches to amke it preemtive in 2.4.* (in fact i use a preemtive kernel patch in 2.4.20 for my laptop works nicly), virtyaly everyhitng in the kernel has a patch to modify it, so what whatever one u want, but i think the process managment is proority driven, "nicer" prosees get better stuff i think it was, im not sure, lol il stop rambling here
 
Old 01-29-2004, 10:22 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Userspace (non-kernel-level) tasks have always
been pre-empted in Linux.

What you're talking about is the patch to
pre-empt the kernel that I've been talking
about anyway :}


Cheers,
Tink
 
Old 01-29-2004, 11:35 PM   #5
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 48
Also, the 2.5.x dev kernel became 2.6.x production some time ago--and, as Tink says, it's fully pre-emptive.
Default timeslice (from kernel/sched.c) is 100 mseconds (I can only assume thats microseconds). Minimum is 10, max is 200.
Tink knows the scheduler isn't perfect. . . It's a priority/round-robin. That is, if a process has a high priority, then it will be given priority, but at specific priority levels, they're in a round-robin. Here, this says it better:

Quote:
/*
* If a task is 'interactive' then we reinsert it in the active
* array after it has expired its current timeslice. (it will not
* continue to run immediately, it will still roundrobin with
* other interactive tasks.)
Quote:

/*
* BASE_TIMESLICE scales user-nice values [ -20 ... 19 ]
* to time slice values.
*
* The higher a thread's priority, the bigger timeslices
* it gets during one round of execution. But even the lowest
* priority thread gets MIN_TIMESLICE worth of execution time.
*
* task_timeslice() is the interface that is used by the scheduler.
*/
The scheduler could be improved, but it depends on what you want to be "snappy". If you want the desktop response to be quick and noticable, then you probably want to give priority to interactive tasks all the time, and you would probably want to be able to assign specific tasks to highest interactive priority (mouse, X11, etc.). The default right now is to have a nice compromise between the interactive and non-interactive tasks (you don't want your updatedb to hang while you post to LQ, do you?). Somewhere on the kernel mailing list archives is a long discussion of how to do the scheduler for 2.5.x/2.6.x. . . You can look it up if you care.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Process Management Utility Rv5 Programming 6 10-18-2004 12:22 AM
Process Management in Linux rjmendez Linux - General 5 08-11-2004 04:05 AM
Process Management Jose Muņiz General 4 10-12-2003 09:14 AM
Process management, bg, fg, CNTL-Z markf424 Linux - Software 3 07-24-2003 05:19 AM
process management nagna Linux - General 1 11-10-2001 11:00 AM


All times are GMT -5. The time now is 03:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration