Question for Experts !
Question for Experts !
I was wondering that when a new chip is introduced (16bit/32bit/64bit…) (single core/dual core/quad core), what fraction of an operating system has to be rewritten ?
Doesn’t the core functionality, and user interface remain pretty much the same ?
(addition of an additional feature is of course logical).
Theoretically, can a well written os have longevity ?
From what I understand, Win98, Me, 2000, XP are all NT based.
What (other than profits) drives a company to ‘create’ another os that is so drastically different, that huge man-hours are required (to produce it), and the user is forced to migrate ?
Let us keep the device drivers out of this. A third party is responsible for that. (that doesn’t mean that the third parties don’t experience pressure to create compatible drivers).
Doesn’t the core functionality, and user interface remain pretty much the same ?
(addition of an additional feature is of course logical).
Theoretically, can a well written os have longevity ?
From what I understand, Win98, Me, 2000, XP are all NT based.
What (other than profits) drives a company to ‘create’ another os that is so drastically different, that huge man-hours are required (to produce it), and the user is forced to migrate ?
Let us keep the device drivers out of this. A third party is responsible for that. (that doesn’t mean that the third parties don’t experience pressure to create compatible drivers).
Re: Question for Experts !
To change from 16/32/64 bit you need to change re-assemble the instructions to the new length. Though there are differences between memory managements etc... (mainly between 16 and 32), though most processors should be backwards compatible. For multiple procs/cores you need to implement SMP. Though again you a dual core processor can run a non SMP OS, though it would only run on one core...
And yes an OS can be built with inbuilt SMP, that detects the number of cores and scales the number of threads it uses to spread the work between all the cores/procs.
This is possible for new instruction sets/instruction lengths by building in multiple kernels with different instruction lengths and code with inbuilt future instruction inbuilt, witch directs program flow to jmp over it to alternative code if the proc doesn't support it.
Jules
And yes an OS can be built with inbuilt SMP, that detects the number of cores and scales the number of threads it uses to spread the work between all the cores/procs.
This is possible for new instruction sets/instruction lengths by building in multiple kernels with different instruction lengths and code with inbuilt future instruction inbuilt, witch directs program flow to jmp over it to alternative code if the proc doesn't support it.
Jules
Re: Question for Experts !
Windows 98/Me are DOS/9x based not NT based, Windows NT/2000/XP/Vista are NT based.mohitbs wrote:From what I understand, Win98, Me, 2000, XP are all NT based.
Re: Question for Experts !
Didn't know that...Fusion wrote:Windows 98/Me are DOS/9x based not NT based, Windows NT/2000/XP/Vista are NT based.mohitbs wrote:From what I understand, Win98, Me, 2000, XP are all NT based.
Jules
There are only a few designs out there for PCs, currently. Let's say there are three. Single Processor, SMP, and NUMA.
You can write your OS to support one, two, or all 3 designs.
If you limit your OS to just one design, it will probably become obsolete.
Single Processor systems are much easier to program for -- but they will almost certainly become obsolete very soon.
If you put enough effort into creating your OS, so that it supports SMP and NUMA also -- then you probably will not have to rewrite anything in your OS for at least a decade.
You can write your OS to support one, two, or all 3 designs.
If you limit your OS to just one design, it will probably become obsolete.
Single Processor systems are much easier to program for -- but they will almost certainly become obsolete very soon.
If you put enough effort into creating your OS, so that it supports SMP and NUMA also -- then you probably will not have to rewrite anything in your OS for at least a decade.
Re: Question for Experts !
Hi,
For example, when the original Pentium 4 was released it wasn't very different (from the OS's perspective) from the Pentium III. It had different performance characteristics (instruction latencies, etc) and had SSE2, but it didn't really matter - the OS developer can wait for compilers to optimize for Pentium 4 before worrying about the different performance characteristics (if they bothered) and SSE2 doesn't need any changes to support if you already support SSE.
The next thing was hyper-threading which could be ignored too, but an OS developer could also optimize schedulers, spinlocks, etc to get better performance from hyper-threading. There wasn't any real rush as it wasn't too different from plain SMP. The same can be said for multi-core and NUMA (they're also close enough to SMP that any changes are for optimization/performance reasons only).
In contrast, long mode was a major change - new/updated toolchain, different paging structures, different protection rules, no v86, etc. I'd assume the compilers took care of most of it, except for the new paging structures and lack of v86 (as most OSs don't use segmentation anyway). The differences in paging structures wouldn't have been too hard to adapt to, but "no v86" can be complicated (e.g. build a full "16-bit emulator" if you want backward compatibility done right). Another thing to consider is some sort of compatibility mode so that existing 32-bit applications still work (including libraries and APIs).
@Bewing: The next change I'm expecting is new paging structures for long mode, so we can have true 64-bit virtual address spaces (currently they're limited to 48-bit). Not because it's needed, but because it'd be good for CPU manufacturer's marketing hype (although it'd be good to reduce the number of levels in the paging structures at the same time - too much indirection isn't so good for performance and RAM footprint/overhead isn't such a big factor anymore). Note: Previously I was expecting changes to 8-bit APIC IDs so we can have more than 255 CPUs in a computer, but that's happened already...
Cheers,
Brendan
Mostly, backward compatibility means the OS never needs to be changed when a new CPU is released (e.g. a new computer will still run "prehistoric" DOS) - it's just a matter of being able to take advantage of new features and/or optimizing.mohitbs wrote:I was wondering that when a new chip is introduced (16bit/32bit/64bit…) (single core/dual core/quad core), what fraction of an operating system has to be rewritten ?
For example, when the original Pentium 4 was released it wasn't very different (from the OS's perspective) from the Pentium III. It had different performance characteristics (instruction latencies, etc) and had SSE2, but it didn't really matter - the OS developer can wait for compilers to optimize for Pentium 4 before worrying about the different performance characteristics (if they bothered) and SSE2 doesn't need any changes to support if you already support SSE.
The next thing was hyper-threading which could be ignored too, but an OS developer could also optimize schedulers, spinlocks, etc to get better performance from hyper-threading. There wasn't any real rush as it wasn't too different from plain SMP. The same can be said for multi-core and NUMA (they're also close enough to SMP that any changes are for optimization/performance reasons only).
In contrast, long mode was a major change - new/updated toolchain, different paging structures, different protection rules, no v86, etc. I'd assume the compilers took care of most of it, except for the new paging structures and lack of v86 (as most OSs don't use segmentation anyway). The differences in paging structures wouldn't have been too hard to adapt to, but "no v86" can be complicated (e.g. build a full "16-bit emulator" if you want backward compatibility done right). Another thing to consider is some sort of compatibility mode so that existing 32-bit applications still work (including libraries and APIs).
@Bewing: The next change I'm expecting is new paging structures for long mode, so we can have true 64-bit virtual address spaces (currently they're limited to 48-bit). Not because it's needed, but because it'd be good for CPU manufacturer's marketing hype (although it'd be good to reduce the number of levels in the paging structures at the same time - too much indirection isn't so good for performance and RAM footprint/overhead isn't such a big factor anymore). Note: Previously I was expecting changes to 8-bit APIC IDs so we can have more than 255 CPUs in a computer, but that's happened already...
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
IIRC, XP was a failed branch of windows, as they tried to build off of it, but they gave up and used 2000 as a base (or something).
-JL
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
-
- Member
- Posts: 566
- Joined: Tue Jun 20, 2006 9:17 am
Win98 is not NT based
Slight correction Win98 is not NT based .
Re: Question for Experts !
Or use virtualization, but that's hardly less complicated :).Brendan wrote:but "no v86" can be complicated (e.g. build a full "16-bit emulator" if you want backward compatibility done right).
JAL
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
Well, our sources seem to disagreeYDNRC. XP is based on 2000, and Vista on XP. And guess what? Win7 is based on Vista.
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
I think you mean that Vista started out as a branch of XP, but when they did the "Longhorn reset" (removing WinFS etc.) they moved over to a branch based off Windows Server 2003 instead. It's all the NT kernel though. The internal details of MS' change management system really don't matter to the end users anyway...piranha wrote:IIRC, XP was a failed branch of windows, as they tried to build off of it, but they gave up and used 2000 as a base (or something).
-JL
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
Yah, I think thats it. It's been a while since I really cared much.
-JL
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
Actually that depends on the systems programming architecture.
For example,protected mode does not really exist on 64 bit intel processor architecture.That means a lot has to be changed in the operating system architecture.
Apart from that some very few modifications are done such as choosing
a compiler to generate code for the target machine.
Thats all what is needed.
For example,protected mode does not really exist on 64 bit intel processor architecture.That means a lot has to be changed in the operating system architecture.
Apart from that some very few modifications are done such as choosing
a compiler to generate code for the target machine.
Thats all what is needed.
Well isn't WS2k3 essentially XP? Just like WS2k8 is essentially Vista (or well, below Microsoft naming hype I've got Windows 6.0.6000 desktop and Windows 6.0.6001 server in here).Colonel Kernel wrote:I think you mean that Vista started out as a branch of XP, but when they did the "Longhorn reset" (removing WinFS etc.) they moved over to a branch based off Windows Server 2003 instead. It's all the NT kernel though. The internal details of MS' change management system really don't matter to the end users anyway...piranha wrote:IIRC, XP was a failed branch of windows, as they tried to build off of it, but they gave up and used 2000 as a base (or something).
-JL
The so called "Windows 2000" was "5.0" and XP was "5.1" and I don't have a W2k3 box right now to check but I think it also said "5.1"? Maybe I remember wrong and W2k3 actually had something that XP didn't but it's really just a naming mess and I bet the desktop and server versions actually come from mostly the same code tree anyway.
There was desktop and server versions of the good old 4.0 as well. For 5.0 they decided calling it 2000 by year would be better and then they got crazy and decided that the desktop versions had to be given some more fancy names?!?
I got a Vista desktop and a W2k8 server here, and while the Vista desktop got accelerated Aero windows and the W2k8 server has Windows classic theme only, they essentially work the same. Prepackaged software and default config is slightly different with Vista having desktop stuff and the server having all sorts of server components.
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.