Man, I would be happy if my 2011 MBA 13" (1,7 Ghz i5, 4 GB RAM) would be only "abandoned" after 4 years, like your good old 2007-2008 MacBooks... 🙁
But looking at Apple's latest hardware requirements for some new features, thinking about that I could still install the newest OS X in 2015... only a dream 😀
I also wouldn't be surprised if the poor MBA owners who went with 2 GB ram were left behind next year. So I really hope Mountain Lion will be a stabile and smoothed out OS, as I'm seeing myself and a lot of other people stuck with it... 😱 I cannot afford buying a new Mac after every 2-3 years (let alone every year 😀).
I don't think Apple will cut off support for 2 GB MBAs that quickly.
A little historical analysis (back as far as 10.3)...
In general, most Mac models are supported by major new OS X versions that are released within four years of that Mac model being discontinued, with Snow Leopard being a major exception (three years in that case).
Apart from Snow Leopard's major cull, the following Mac models got less than four years of OS upgrades after they were discontinued:
800 MHz iBook G4 was not officially supported by 10.5 (3 years, 6 months).
Late 2006 Mac Mini was not able to run 10.7 (3y11m).
Mountain Lion's victims younger than four years are the original MacBook Air (3y9m), early 2008 MacBook (3y9m), late 2008 MacBook (3y6m), 2008 Xserve (3y6m), and mid 2007 Mac Mini (3y4m).
Assuming an absolute minimum three year support window (matching AppleCare for the last machines sold new for that generation), all mid 2011 MacBook Airs (discontinued in June 2012) must be supported by new OS versions released prior to mid 2015, are at some risk of being dropped by a mid to late 2015 OS upgrade, and likely to be dropped by a 2016 or later OS upgrade.
Since the mid 2011 MacBook Air was available in a configuration with 2 GB of RAM, all OS X versions released prior to mid 2015 must be able to work on a minimum of 2 GB of RAM, at least for a MacBook Air.
Even if a mid to late 2015 OS requires a minimum of 4 GB, it might still work on a 4 GB mid 2011 MacBook Air, only dropping support for those with 2 GB.
I expect your 4 GB mid 2011 MBA will be supported with OS updates until at least mid 2015, possibly mid 2016. Even once you can't upgrade to the latest OS, you will get at least another year of security and other minor updates, hopefully more than one year.