ps command input

Hi,
When we issue a ps command we get some output.
From where does this ps command take the input from?

Thanks in advance.

Depends on the OS. On Linux it's the /proc pseudo-fs, on HP-UX it's through the pstat_get* kernel interface functions.