Grid plugin for Compiz does exactly this. By default you press ctrl+alt+[a respective keypad number key] depending on desired configuration. For example ctrl+alt+5 maximises the window and ctrl+7 puts the window to upper left corner. Press latter again and to cycle between 1/9, 1/4 and 2/9 of screen.
In Ubuntu 10.04 Grid plugin is contained within compiz-fusion-plugins-extra package. This can be installed using System > Administration > Synaptic. After installation a restart is needed. Grid can be activated in System > Preferences > CompizConfig (contained in compizconfig-settings-manager package). Instructions for compiling the source in Ubuntu 8.10 are mentioned on Grid home page.
UPDATE4: updated for 10.04 lucid lynx
UPDATE3: found proper video, embedded
UPDATE2: works on 9.10 as well
UPDATE: some Ubuntu 9.04 update broke installation, went back to compiz grid sources and did
make installto solve the problem