Limiting Number of Processes

Given a uid how can I limit the number of processes it can run at once? Mainly for apache and MySQL.

 

 

 

 

Top