Jump to content

How much of Win-9x kernel API and VMM is 16-bit code?


98 Guy

Recommended Posts

How much content from this web page:

http://www.radsoft.net/resources/rants/20000321,00.shtml

is true regarding Win-9x (specifically Win-98se) and it's use of 16-bit code in the kernel, API and VMM?

Some of those same claims are made here:

http://www.microsoft.com/technet/archive/n...h.mspx?mfr=true

Near the bottom of that page under the title "Differences Between Windows 9x and Windows NT".

(note that the author of that page is NOT a microsoft employee, so it's not clear to me how much he really knows about the source code of win-9x system files)

Link to comment
Share on other sites


It is true that Win9x was built on top of Win 3.x. It is also true that there's 16 bits code in Win9x. But to claim that it only uses 16 bits? Nonsense. In fact, the article contradicts itself on that point.

The rest sounds like some things I heard in the past, of which parts may be true.

Link to comment
Share on other sites

What do you think about it ?

Well, when you've people saying things like this:

"User interface thread: This type of thread creates its own window so it receives windows messages. It can respond to the user via its own window hence the name. This type of thread is subject to Win16 Mutex rule which allows only one user interface thread in 16-bit user and gdi kernel. While a user interface thread is executing code in 16-bit user and gdi kernel, other UI threads cannot use the service of the 16-bit user and gdi kernel. Note that this Win16 Mutex is specific to Windows 95 since underneath, Windows 95 API functions thunk down to 16-bit code. Windows NT has no Win16 Mutex so the user interface threads under NT work more smoothly than under Windows 95. "

http://win32assembly.online.fr/tut15.html

Then you wonder if it's really true. Especially this: "Windows 95 API functions thunk down to 16-bit code". Do they mean ALL functions?

I thought the Win-95 API was very similar to NT4.

Was the Win-98se API improved? Does it thunk as much as Win-95?

Then you have statements like this:

"The difference between Win3.11 and Windows95 is that, Windows 95 had a lot of improvements. Its was a 32 bit OS but had some 16 bit code. Windows95 had preemptive multi-tasking whereas the earlier OS was co-operative multi-tasking. Microsoft did want to have a single kernel based on WindowsNT, however for the consumer it would mean an very expensive PC. Hence they developed the Windows95 kernel as a intermediate step to bide their time till hardware became fast enough and inexpensive enough for the average consumer to run a WinNT kernel. "

http://talkback.zdnet.com/5208-11515-0.htm...amp;start=-9956

So if the NT kernel (and API?) had (no?) 16-bit code, but the Win-95 kernel and/or API did, then didn't thunking take some performance away from Win-95 - which was presumably running on less-expensive hardware and could least afford such a performance hit?

Link to comment
Share on other sites

What do you think about it ?

Well, when you've people saying things like this:

"User interface thread: This type of thread creates its own window so it receives windows messages. It can respond to the user via its own window hence the name. This type of thread is subject to Win16 Mutex rule which allows only one user interface thread in 16-bit user and gdi kernel. While a user interface thread is executing code in 16-bit user and gdi kernel, other UI threads cannot use the service of the 16-bit user and gdi kernel. Note that this Win16 Mutex is specific to Windows 95 since underneath, Windows 95 API functions thunk down to 16-bit code. Windows NT has no Win16 Mutex so the user interface threads under NT work more smoothly than under Windows 95. "

http://win32assembly.online.fr/tut15.html

Then you wonder if it's really true. Especially this: "Windows 95 API functions thunk down to 16-bit code". Do they mean ALL functions?

I thought the Win-95 API was very similar to NT4.

Was the Win-98se API improved? Does it thunk as much as Win-95?

Then you have statements like this:

"The difference between Win3.11 and Windows95 is that, Windows 95 had a lot of improvements. Its was a 32 bit OS but had some 16 bit code. Windows95 had preemptive multi-tasking whereas the earlier OS was co-operative multi-tasking. Microsoft did want to have a single kernel based on WindowsNT, however for the consumer it would mean an very expensive PC. Hence they developed the Windows95 kernel as a intermediate step to bide their time till hardware became fast enough and inexpensive enough for the average consumer to run a WinNT kernel. "

http://talkback.zdnet.com/5208-11515-0.htm...amp;start=-9956

So if the NT kernel (and API?) had (no?) 16-bit code, but the Win-95 kernel and/or API did, then didn't thunking take some performance away from Win-95 - which was presumably running on less-expensive hardware and could least afford such a performance hit?

Do some 32bit programming, the guys who designed win9x imho were what we called in the old days computer engineers, these chaps had to provide both backward compatibilty i.e dos etc but also produce a system capable of compatabilty for the new guys brought in by ms to develop winnt,hence catered for by the 9x guys in ntkern.vxd.The engineers had to produce a system that would then work with minimal specifications but also have future proofing inbuilt, wdm,ntkern, hence it being around nearly some 20 years later for 98. The 9x system attuned via assembly programming had such performance to cater for all of this, also the reason why early editions of nt being targetted to businesss machines due to the additional system requirements,ram ,cpu and being programmed in c etc.Today Win9x is more than capable of moving 64bits around if drivers are rewritten and more besides,unfortunately today people are of the misapprehension that newer is better, create websites to justify their arrogance and produce smoke screens to satisy running dual cores to do the same things we take for granted every day. Youll find in you system directory numerous 32 suffixed dlls,exes etc and will have no trouble accessing the win32 api.

All the best

To clarify things further win9x will thunk to access 16bit dlls,exes under the win32 api, when such functions are not present in its 32bit equivalent. I would imagine an easy way of seeing if the frequency of thunking has been reduced between win95,98 or me might well be inidicated by the file size differences in the 32bit dlls.

Sorry had to edit post add reply button refuses to work

Edited by oscardog
Link to comment
Share on other sites

Hello, 98 !

regarding Win-9x (specifically Win-98se) and it's use of 16-bit code in the kernel, API and VMM?

The VMM and VxDs comprising the Operating System proper underneath Windows 95/98/ME are 32-bit code. These provide memory and device management, ressource allocation etc.

As for the main Windows modules (Windows is a presentation layer, not an OS!):

The Windows 95/98 kernel is 32-bit. Of course there is a 16-bit kernel module for use by 16-bit code, but this one calls ('thunks') into the 32-bit Kernel32.

The GDI is 16-bit. The above for compatibility applies, only in the reverse direction ;=)

Finally the User module is mixed, about half 16 and half 32 bit code with thunking in both directions.

This is well known and easily verifiable by anyone armed with a (kernel) debugger and some programming skills.

HTH

--

Ninho

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...