Everyone blasts Apple for their pricing. But a 2011 iPhone 4s just got the latest iOS 9 update. Each supported generation also gets updates instantly.
It remains to be seen how long MS will support their Nokia phones.
Google really needs to take Android control away from the manufacturers. Instead require manufactures of phones to submit drivers to Google. Then Google can make an updater that installs Android with all drivers and delete those the phone does not use. Also make a similar updater for running an update through a PC if the Android device has insufficient memory. Make the updater give an option for a clean install for device owners that want a vanilla Android experience.
That way a phone will be supported until the drivers are obsolete or it simply doesn't have the RAM or storage to handle the latest version.