flat assembler
Message board for the users of flat assembler.

Index > Heap > Bloatware vs hardware talking

Author
Thread Post new topic Reply to topic
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY
And if we had an OS that all applications and the OS itself were written in optimized ASM, would we really need so many hardware upgrades?

I think if programmers would spend more time in getting optimized code (for size and speed), Pentium III computers would be considered super-computers.

But the problem is: most people think that bloated software is normal.

So, is mankind really moving into the right directon? Is studying so many new technology to get better hardware more worth than studying for getting better software?

This is just a philosophical talking, Just imagine Menuet OS with the number of users of Windows in your own "perfect ASM world". Laughing
Post 25 Jul 2007, 23:29
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
Sounds really good, actually. Problem is, "time is money" as dustwolf said to me elsewhere. Software people are more important about rushing their project onto the market than making it good. I argued that if customers complained less that they can't fill the requirements of the software or that it slows down their network, it would cause more recommendations for their software, along with "no-bloat" being a marketable slogan. Sadly, though, the anti-asm politics (computer politics, not world politics) has resulted in fear of assembly.
Post 25 Jul 2007, 23:36
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Theres one big problem with that, it would be slower than the same optimized asm code for speed and size running on windows or linux, and if it include doing fast graphic's windows/linux will win, as you will only have vesa.

To make it faster, you need to getrid of the layers, MenuetOS as the same layers as windows or linux.
Take a look at the old Xbox its was a
Quote:

The Xbox is a legacy-free x86 PC by Microsoft that consists of an Intel Celeron 733 MHz CPU, an nVidia GeForce 3MX, 64 MB of RAM, a 8/10 GB hard disk, a DVD drive and 10/100 Ethernet. As on every PC, you can run Linux on it.
http://www.xbox-linux.org/wiki/Main_Page
Yet it could run games faster than any high spec PC at the time.
So how did it do this, not by making a small ASM pmode, multi-tasking OS.
But by simply taking the layers, that get in between the program and the hardware.
Xbox spec
Quote:

While the Xbox kernel is based on the NT/Windows 2000 kernel, it's extremely lean. There's no virtual memory paging, and only a single process is allowed (though that process can spawn multiple threads). The entire kernel fits into 150KB--far less than the 1MB original goal.
The development library is polling-based rather than event driven (unlike Windows). This was due directly to feedback from game developers.
The game owns the hardware--it runs in ring 0, and has direct access to all hardware (including CPU and graphics).
Memory allocation is the responsibility of the app--there's no front-end memory allocation.
While the APIs were familiar (Direct3D, DirectSound), the back ends were different, and highly tuned to the Xbox hardware.
http://www.extremetech.com/article2/0,1697,1670116,00.asp

Now as you can see its fast because it talks direct to hardware, runs in ring0 (no need to switching between ring0 and 3), single-tasking (no need to task switch), no-paging or memory management.
Now a OS like that, with well optimized asm code for speed and size would be fast, if it also had it own drivers for a fast graphic card etc.
Post 26 Jul 2007, 01:51
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
Quote:
Yet it could run games faster than any high spec PC at the time.
So how did it do this, not by making a small ASM pmode, multi-tasking OS.
But by simply taking the layers, that get in between the program and the hardware.


The advantage of MeOS is that it may have the layers, but it dosn't have all the junk in those layers.

Quote:
Now a OS like that, with well optimized asm code for speed and size would be fast, if it also had it own driver for a fast graphic card etc.


Agreed. Hardware these days dosn't like anyone making their own drivers for their own OS to use it. This is a problem.
Post 26 Jul 2007, 01:56
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
rhyno_dagreat



Joined: 31 Jul 2006
Posts: 487
Location: Maryland, Unol Daleithiau
rhyno_dagreat
[quote="kohlrak"]
Quote:

Agreed. Hardware these days dosn't like anyone making their own drivers for their own OS to use it. This is a problem.


I have to say I totally agree and have experienced this firsthand with trying to get info about nVidia's GPUs from nVidia, with no luck. They will only give their own libraries out to big businesses and not the little guy (akin to most of us ASM programmers) and you'd have to be working from the inside to know how it works. (inside the corporation I mean)
Post 26 Jul 2007, 03:06
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
[quote="rhyno_dagreat"]
kohlrak wrote:
Quote:

Agreed. Hardware these days dosn't like anyone making their own drivers for their own OS to use it. This is a problem.


I have to say I totally agree and have experienced this firsthand with trying to get info about nVidia's GPUs from nVidia, with no luck. They will only give their own libraries out to big businesses and not the little guy (akin to most of us ASM programmers) and you'd have to be working from the inside to know how it works. (inside the corporation I mean)

And it would be so easy, if you had the info, example Xbox uses a nVidia card and to write direct to screen all you do is write to address 0xf0010000 Shocked
Here is some asm code to plot pixels in the Xbox.
http://www.xbdev.net/non_xdk/nasm_xbe/xbe_040/index.php
Post 26 Jul 2007, 04:18
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
Dex4u wrote:
rhyno_dagreat wrote:
kohlrak wrote:

Agreed. Hardware these days dosn't like anyone making their own drivers for their own OS to use it. This is a problem.


I have to say I totally agree and have experienced this firsthand with trying to get info about nVidia's GPUs from nVidia, with no luck. They will only give their own libraries out to big businesses and not the little guy (akin to most of us ASM programmers) and you'd have to be working from the inside to know how it works. (inside the corporation I mean)

And it would be so easy, if you had the info, example Xbox uses a nVidia card and to write direct to screen all you do is write to address 0xf0010000 Shocked
Here is some asm code to plot pixels in the Xbox.
http://www.xbdev.net/non_xdk/nasm_xbe/xbe_040/index.php


And because of this, they will always be able to sell their hardware. Too bad this material dosn't get leaked, eh?
Post 26 Jul 2007, 04:25
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
> had an OS that all applications and the OS itself were written in optimized ASM, would we really need so many hardware upgrades?

NO.

> I think if programmers would spend more time in getting optimized code (for size and speed), Pentium III computers would be considered super-computers.

YES.

> But the problem is: most people think that bloated software is normal.

YES.

> imagine Menuet OS with the number of users of Windows

with their opinions about a "good" and "complete" "OS" and good apps Laughing

> in your own "perfect ASM world".

Then Menuet would be the Vista clone and ultimate >10 GiB bloat and Linux the "toy" fitting on a floppy Laughing

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 26 Jul 2007, 07:02
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
OzzY wrote:

And if we had an OS that all applications and the OS itself were written in optimized ASM, would we really need so many hardware upgrades?

Depends on what you want to do, office2000 and a webbrowser runs perfectly fine on a 200mhz pentium-mmx with 64 megabytes of ram. But some things just require a whole bunch of processing power - sound and video compression (and even decompression, for HDTV quality), games have pretty complex code nowadays too, etc.

OzzY wrote:

Just imagine Menuet OS with the number of users of Windows in your own "perfect ASM world".

If Menuet was actually fast and had accelerated graphics, well... nah, not even then.

You do need protection (as in x86 paging, kernel/user separation) and separating user/administrative accounts in a modern OS.

Dex4u wrote:

single-tasking (no need to task switch)

it still supports multi-threading though, so it needs context-switching... which is a full "task switch" anyway (there's no notion of "process switch" in NT, the kernel only schedules threads). But okay, no CR3 updates.

Dex4u wrote:

Now a OS like that, with well optimized asm code for speed and size would be fast, if it also had it own drivers for a fast graphic card etc.

There's already some assembly code in the NT kernel where it really matters - things like the ZeroPage() function (to clear out memory blocks before handing out) has SSE code. For most parts of the kernel optimizing in assembly doesn't make much sense, and certainly it doesn't make sense for drivers where you're doing I/O operations and waiting for the device.

Better spend the time "doing things right" - employ lock-free algorithms etc.

Too bad hardware manufacturers don't give out specs, but do consider the amount of research & development they've spent... they don't want the competition to take advantage of their millions of dollars of R&D. You might argue that this is wrong etc., but it does drive the market, and as long as we live in a capitalistic world (commie revolution ever coming? hah!), that's just the way things are... no point bitching over it.
Post 26 Jul 2007, 10:37
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.