» 您尚未登录:请 登录 | 注册 | 标签 | 帮助 | 小黑屋 |


发新话题
打印

[新闻] 2009年全球科技公司研发投入资金微软第一 约8倍于苹果

posted by wap, platform: BlackBerry (Bold 9000)

什么时候微软变成技术的了


TOP

posted by wap, platform: Firefox

蛋疼的转载一下老文,技术的微软做事情就是很有技术

I worked at Microsoft for ten years, most of it on the core Windows NT/2000 (hereafter referred to as NT) networking code. As such I briefly dealt with the Hotmail team, mostly to hear them complain about the lameness of the telnet daemon in NT (a valid point). I do know that when Microsoft bought Hotmail, the email system was entirely running on FreeBSD, and Microsoft immediately set about trying to migrate it to NT, and it took many years to do so. Now it seems that the transition is not complete. Well, what are you gonna do.

On the other hand, I know a lot about the TCP/IP stack that is running on NT. Here is a short history of it (some of this may also be told in the book How the Web Was Won, but I haven't read it):

The original plan for NT was that a few members of the core NT team (which numbered about 15 developers) would write all the networking code. However, in 1990 a small team was started up in the LAN Manager group at Microsoft to do some of that NT networking work. Eventually that team moved over to be a part of NT (this coincided with the IBM-OS/2 "divorce", if anyone is interested).

Microsoft's networking software at the time ran over a network protocol called Netbeui, but it was decided that TCP/IP was gaining in importance, and should be included in NT. In addition, the user-mode API associated with Netbeui, which was called Netbios, was too Netbeui-specific and couldn't be adapted to allow user-mode access to TCP/IP. As a result, the decision was made:

1) To put a TCP/IP stack in NT

2) To adapt the sockets user-mode API for NT

#1 was solved by licensing code from a company called Spider Systems. However, Spider's TCP/IP stack was written to run within an environment called STREAMS, which was a wrapper that specified how the various parts of the stack would communicate with each other (TCP/IP is really several pieces of code -- two of which are TCP and IP -- layered on top of each other. Most network protocols are like that, which is why they are referred to as "stacks". As a result, STREAMS also had to be ported to NT.

#2 involved the creation of the winsock API, which persists today.

It was recognized that using Spider's stack was a temporary measure, because nobody really wanted a stack that depended on STREAMS and its associated overhead. So, a short time after this, work was begun on a new version of TCP/IP, written entirely by Microsoft.

Along with Spider's stack came versions of various TCP/IP-related utility programs, such as ftp, rcp and rsh. Those were ported from BSD sockets to winsock (not a huge change) and bundled with NT.

Now, some of Spider's code (possibly all of it) was based on the TCP/IP stack in the BSD flavors of Unix. These are open source, but distributed under the BSD license, not the GPL that Linux is released under. Whereas the GPL states that any software derived from GPL'ed software must also be released under the GPL, the BSD license basically says, "here's the source, you can do whatever you want, just give credit to the original author."

Eventually the new, from scratch TCP/IP stack was done and shipped with NT 3.5 (the second version, despite the number) in late 1994. The same stack was also included with Windows 95.

However, it looks like some of those Unix utilities were never rewritten. If you look at the executables, you can still see the copyright notice from the regents of the University of California (BSD is short for Berkeley Software Distrubution, Berkeley being a branch of the University of California, for some reason referred to as "Berkeley" on the East Coast and "California" on the West Coast...and "Berkeley" is one of those words that starts to look real funny if you stare at it too long - but I digress).

Keep in mind there is no reason to rewrite that code. If your ftp client works fine (no comments from the peanut gallery!) then why change it? Microsoft has other fish to fry. And the software was licensed perfectly legally, since the inclusion of the copyright notice satisfied the BSD license.

I won't even swear on a stack of bibles that the "new" TCP/IP now shipping in NT/2000/XP and Windows 95/98/Me is completely free of the old code from Spider. Since I don't work there I don't have access to the source code. Certainly some parts of TCP (the checksum calculation comes to mind) are the same everywhere and once someone has written an optimized version, why rewrite it? And once again, this would be perfectly legitimate for Microsoft to do under the license.

But it is certainly misleading of the Wall Street Journal to say that BSD code is used "deep inside" the NT networking code, unless they mean the STREAMS wrapper itself, which I believe is still there in case someone wants to write a transport using it (I think there is an OSI TP4 STREAMS transport lurking somewhere out there, if anyone cares - but I just checked, nobody does). But the TCP/IP in NT certainly doesn't use STREAMS.

And implying that the TCP/IP stack uses BSD code is also false. As I said above there may be small vestiges of it in there, although I doubt it. Anyway the FreeBSD programmers who reported all this to the Wall Street Journal can't see the NT TCP/IP source either, so they can't have been referring to that.

But whatever! It isn't the first time Microsoft has been maligned by the press, and it won't be the last.

However, this history does illustrate Microsoft's view of the GPL. As you may recall, Microsoft VP Craig Mundie recently claimed that the GPL is anti-competitive, un-American, flea-infested, locust-plagued, etc. This followed up on similar claims by another VP, Jim Allchin, so it appears that this is the angle Microsoft has chosen to attack Linux.

On the face of it, Microsoft complaining about the source license used by Linux is like the event horizon calling the kettle black. Microsoft has no source license at all to speak of (for the general public anyway)! Anyway when did the source license of a piece of software become an issue for the average Joe who wants to buy it? As a former Microserf, I'll be the first to admit that Mundie's arguments make no sense for the industry in general.

Still from Microsoft's point of view, the source license of software does matter, because Microsoft might want to license the code. As it did in the case of the TCP/IP code it got from Spider, which was under the BSD license. If Spider's code had been under the GPL, Microsoft couldn't have used it. In other cases, Microsoft has licensed software from companies that were not open source at all, but Microsoft was able to negotiate a private license for its own use.

Again I'm not defending Microsoft's viewpoint. For any given piece of code, there may be five companies in the world that want to license it, 500 programmers who want to modify it, and 5 million users that want to use it. So the GPL is a good thing in general. Microsoft's main goal with the anti-GPL rhetoric is to discredit Linux, not to make it easier for it to license third-party software.

Still you can see how Microsoft's stance, from its own weird, warped perspective, almost makes some little iota of sense.



TOP

发新话题
     
官方公众号及微博