Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#121332 - 16/10/2002 21:53 bash experimentation = errors
Anonymous
Unregistered


I've been trying to figure out how to use linux so I can start putting programs on my player.

I was playing around at the bash prompt....doing stuff like running 'player' then interrupting it and starting it again then suspending it and starting it again and trying to run it in the background (which it apparently won't do). Anyways, it seemed like it was starting to get confused. (like hanging at reboot)

But now when I drop to the bash prompt and type 'ps aux' I get this:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
#0 1 1.5 0.5 240 80 ? S 16:42 0:09 init
#0 2 0.0 0.0 0 0 ? SW 16:42 0:00 [kflushd]
#0 3 0.0 0.0 0 0 ? SW 16:42 0:00 [kupdate]
#0 4 0.0 0.0 0 0 ? SW 16:42 0:00 [kpiod]
#0 5 0.0 0.0 0 0 ? SW 16:42 0:00 [kswapd]
#0 88 2.0 7.5 1988 1124 ttyS1 S 16:52 0:00 -bash
#0 89 0.0 4.6 2268 692 ttyS1 R 16:52 0:00 ps aux


Are those first 5 processes supposed to be there when normally drop to the shell? Because I am pretty sure they weren't there before. I only saw them there before when I would press ctrl-z to suspend the player and then type 'ps aux'.

Top
#121333 - 16/10/2002 22:06 Re: bash experimentation = errors [Re: ]
jaharkes
enthusiast

Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
They should be there. Init is the first userspace program that is started, it is responsible for actually mounting /drive0 and /drive1 and starting the player application. It also wait for the player to exit and then starts the shell that you are currently using, and when the shell exits it restarts the player, ad infinitum.

All those [kXXX] processes are in fact kernel threads, which is why they don't have a VSZ or RSS. All of those threads are used to write dirty data back to the disk, so normally the empeg wouldn't really use them.

i.e. kswapd writes dirty anonymous memory pages (f.i. stuff allocated with malloc) to swap, kupdate writes modified inodes (file metadata), and kflushd writes modified file data. I'm not entirely sure about what kpiod does but is has a similar function.

If you look at the process list of recent 2.5 development kernels it is clear that some people took the kernel-thread idea a bit too far.
_________________________
40GB - serial #40104051 gpsapp

Top
#121334 - 16/10/2002 23:52 Re: bash experimentation = errors [Re: jaharkes]
Anonymous
Unregistered


Alright, good. For a while there, I was afraid I had f*cked it up by playing around. Thanks for the info.

Top
#121335 - 17/10/2002 07:13 Re: bash experimentation = errors [Re: jaharkes]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
    Init is the first userspace program that is started, it is responsible for actually mounting /drive0 and /drive1 and starting the player application.
Unless I'm mistaken, the player app actually mounts the filesystems, but it's not like it makes any functional difference, anyway.
_________________________
Bitt Faulk

Top
#121336 - 17/10/2002 07:21 Re: bash experimentation = errors [Re: wfaulk]
jaharkes
enthusiast

Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
why would it, then it has to detect if they are already mounted when the player is restarted, while for init it would be straightforward. And why else would the init binary contain these messages,


Tried to mount /proc but got error %d
Mounting first music partition
Tried to mount /dev/hda4 as reiserfs but got error %d
Tried to mount /dev/hda4 as ext2 but got error %d

_________________________
40GB - serial #40104051 gpsapp

Top
#121337 - 17/10/2002 07:24 Re: bash experimentation = errors [Re: jaharkes]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Fair enough. I could have sworn that one of the empeg guys had posted that tidbit of info at one point.
_________________________
Bitt Faulk

Top
#121338 - 17/10/2002 08:53 Re: bash experimentation = errors [Re: wfaulk]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
The player app is what remounts the filesystems during a sync from what I remember

- Trevor

Top
#121339 - 17/10/2002 10:37 Re: bash experimentation = errors [Re: tman]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
That's definitely true, and probably what I was thinking of.
_________________________
Bitt Faulk

Top