LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Processes in linux (https://www.linuxquestions.org/questions/linux-newbie-8/processes-in-linux-884103/)

g.phanibabu 06-02-2011 04:55 AM

Processes in linux
 
Hi all,

I have a doubt regarding processes in linux. I am using centOS5.5. Will there be a process for KeyBoard && Mouse in linux?? I mean are the KeyBoard and Mouse interpreted as processes in Linux??


Thanks in Advance !!

G.Phani Babu.

chrism01 06-02-2011 05:36 AM

Indeed; try the 'top' cmd and you'll see such processes as kpsmoused

g.phanibabu 06-02-2011 06:03 AM

Linux processes
 
Ok, what about the Keyboard dude? And can we get the idle time of a process??

onebuck 06-02-2011 08:44 AM

Hi,

Welcome to LQ!

Check out 'man top'.

FYI: I suggest that you look at 'How to Ask Questions the Smart Way' so in the future your queries provide information that will aid us in diagnosis of the problem or query.

Just a few links to aid you to gaining some understanding;



1 Linux Documentation Project
2 Rute Tutorial & Exposition
3 Linux Command Guide
4 Bash Beginners Guide
5 Bash Reference Manual
6 Advanced Bash-Scripting Guide
7 Linux Newbie Admin Guide
8 LinuxSelfHelp
9 Utimate Linux Newbie Guide
10 Linux Home Networking
11 Virtualization- Top 10

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!


"Knowledge is of two kinds. We Know a subject ourselves, or we know where we can find information upon it."- Samuel Johnson

beyondaymk 06-02-2011 10:01 AM

I think the Keyboard and Mouse are just devices, not processes.
Of course, there should be drivers running with them and those drivers programs should be processes.

MrCode 06-02-2011 10:41 AM

Quote:

Of course, there should be drivers running with them and those drivers programs should be processes.
I thought drivers were part of the kernel, not user-mode processes…? (Linux uses a monolithic design where drivers are essentially compiled into kernel AFAIK).

In any case, you're right that the keyboard/mouse are just seen as devices. Try cat /dev/input/mouse0 as root, move the mouse around, and you should see what I mean. (/dev/input/mouse0 is, AFAIK, the default device node file for incoming character data from the mouse driver. ;))

onebuck 06-02-2011 01:46 PM

Hi,

Your correct! The OP should have looked at 'man top', within reference to 'ps'. Some leg work for the OP to understand the reasoning behind 'top' & 'ps'. Then references that were given to the OP that would provide good definition(s) to understand basic operations.

In checking '/dev' you will have either a block or character devices;
Quote:

excerpt from Rute Tutorial & Exposition
18.2 Block and Character Devices


Hardware devices can generally be categorized into random access devices like disk and tape drives, and serial devices like mouse devices, sound cards, and terminals.
Random access devices are usually accessed in large contiguous blocks of data that are stored persistently. They are read from in discrete units (for most disks, 1024 bytes at a time). These are known as block devices. Running an ls -l /dev/hda shows a b on the far left of the listing, which means that your hard disk is a block device:
The manner in which the device is handled is up to the 'interrupt handler' or as some say 'interrupt service handler'. Device driver is triggered by the interrupt thus servicing the device. API will control the information from the driver via the scheduler (completely fair scheduler).

Look at Kernel Map to get a basic understanding.

frieza 06-02-2011 02:00 PM

another command would be the 'ps' command, though it simply creates an output and exits, it doesn't run in real time like top does
keyboard/mouse however are devices that are used by processes, not processes themselves.

chrism01 06-03-2011 01:09 AM

The k in kpsmoused refers to the kernel ....


All times are GMT -5. The time now is 06:47 PM.