Apple was almost dead not so long time ago (may be not so visible in US, but outside).
DEC and SUN was evaporated.
Microsoft has made several mistakes (Windows Vista, Windows Phones 7)
Currently Apple has got its place, many years all concurrents was behind shiny iPhones, iPads and iBooks. But at the moment they are in big danger again. As "one hardware" company, they have to compete with the rest of the world. And the world is big. Recent Android phones and tablets are at least at the level of iPhones in all parameters (including the price... but there are variants when you scarify not so much and pay 3-5 times less!). I think Windows Tablets and notebooks are "back in game" with Windows 10 and recent Intel processors, you can run Sonar on $200 tablet, that is completely different experience compare to the "old" cheap netbooks under Windows 7. I do not have any statistic, but I guess the most popular OS (the number of used devices under it) in the world is.... Linux. Count not only Linux "pure" PCs and servers (that statistic exists), but also all Andorid devices and most important all devices with embedded Linux (TV, routers, NAS, etc.).
What will happened as next? We do not have the crystal ball. But we know that:
* Apple was and is "one hardware" company. There are benefits and there are consequences. One of the consequences: they can not dominate the market by definition of the strategy. There are many other hardware producers which want there place in the market, too many of them to fight for any single company.
* Android can not replace "real OS". It is just a Java machine with all consequences.
* Linux is just a core, it is not a complete OS. GNU/BSD software has to be "polished" by a strong company to be useful for end consumers
* Windows (MS) has no reason to not dominate. They have made several mistakes in the past, but they have recently shown the flexibility, the ability to recognize mistakes and fix them.