Will 2GB ram run Yosemite smoothly cant upgrade my 2009 iMac 2009 20" with 2GB for a few months but need to upgrade to 10.9.4 to install Yosemite.

I am currently running 10.8.1 as a fresh install of Mountain Lion which runs fine, but I dont want to install Yosemite and have OS hang and beach ball on me.

Not running anything to intensive, at most; Sublime, Spotify, terminal, Firefox
A friend of mine recently upgraded his MacBook5,1 (2009 core 2 duo) with 2GB to Mavericks. It wasn't the most pleasant thing, but it actually didn't work out too bad for him and he even thinks there was a slight performance increase (I'm assuming due to the memory compression stuff being a touch faster than swap). I'm assuming that Yosemite isn't going to be much more stressful than Mavericks, so you can probably get away with it.

That being said, 2GB is absolutely too little these days if you're going to run more than one application. You are going to get beach balls, but perhaps slightly less than what you did with Mountain Lion. Again, I'm assuming this because of the memory compression introduced in Mavericks works faster than swapping to disk and with that little RAM you will be swapping out (or compressing) pages.