Sega's management was piss poor and they effectively killed themselves off. Sony had something to do with it by buying exclusives but Sega had plently of good games for the Dreamcast. Also, Sony were very good at hyping up the PS2. I remember the no.1 reason for not getting a Dreamcast was "Why get a Dreamcast when in a few months you can buy a PS2?"
Having said that, I think the majority of the blame has to be placed with Sega and the mistakes they made during the Saturn era and to a lesser extent the Dreamcast era. I think by then the damage had been done.
Microsoft on the other hand can afford to make mistakes and keep making mistakes indefinately. A lot of the guys previously employed by Sega have even moved to MS. But really, one of the main reasons MS have been able to gain such a large marketshare this gen is due to the sheer number of mistakes Sony have made. $599?! second job?! wtf?!








