the earliest you can apply for ilr is when you've been in the uk 2yrs - (upto 28 days)
so if you arrived on 20th 8 2009 + 2yrs is 20th 8 2011
20th 8 2011 - 28 days is 23 07 2011.
so earliest you can apply is 23 july 2011 and the latest is a few days b4 your visa expires ( i take it your visa is valid for 27 months ?)

you need to have passed the life in uk test,

guidance notes are here http://www.ukba.homeoffice.gov.uk/se...ormset%28m%29/
application form is here http://www.ukba.homeoffice.gov.uk/si...etm0420091.pdf

thou there could be changes that will effect you in July next year. so check the UKBA website before you apply to see what the changes are ..