Page 2 of 3

Re: Can Windows be replaced, and how !?

Posted: Fri Sep 02, 2022 10:43 am
by Octocontrabass
devc1 wrote:Where ?
This thread.
devc1 wrote:I said that my driver did 500 MB in 1100ms, The manufacturer says it is 300 MB/S and Windows Benchmark says it is 98 MB/S
The manufacturer says the maximum sustained read/write speed is 108MB/s. That maximum speed is only possible on the outer edge of the disk - closer to the middle, the speed goes down, which is why Windows was only able to reach 98MB/s.

The 300MB/s link speed only applies to accessing the disk's 16MB cache. Windows intentionally reads much more than 16MB in order to measure disk access and not cache access.

Your driver could do 500MB in 1100ms inside QEMU. QEMU is running on a host OS that can cache your virtual disk in RAM, so in QEMU you're not actually measuring disk access.

Your driver can't do 500MB in 1100ms (about 450MB/s) on bare metal. The drive is physically incapable of transferring data across the SATA cable faster than 300MB/s. If you're seeing those numbers on bare metal, you have made a mistake.

Re: Can Windows be replaced, and how !?

Posted: Fri Sep 02, 2022 11:00 am
by iansjack
devc1 wrote:I will add a question, why does windows use alot of RAM even if you are not opening any program. I always think of this as a trick to make you buy more RAM ?
Most of the RAM usage is for various caches to speed up operation. Would you rather that the RAM you paid for just sits idle?

Re: Can Windows be replaced, and how !?

Posted: Fri Sep 02, 2022 12:16 pm
by devc1
I just wanted to try android studio and I cannot seem to run it on 8 GB of RAM. The system will just freeze with 100% RAM

Re: Can Windows be replaced, and how !?

Posted: Fri Sep 02, 2022 2:18 pm
by iansjack
Assuming that you are using 64-bit Windows and haven’t done anything stupid like turning off the paging file, 6GB should be plenty enough. The RAM requirements are exactly the same on Linux and Mac OS, so it’s down to the application not the OS.

Re: Can Windows be replaced, and how !?

Posted: Fri Sep 02, 2022 3:42 pm
by devc1
Yes it is down to the application, thats why Windows consumes 60% of my RAM before I boot up my computer : )

Once I tried to disable the page file, it leaded to better performance, LESS memory usage around 30% (IDK How, Why), and QEMU won't start with 4gb ram if I open multiple apps. But currently I am using it.

Windows main problem is supporting dumb languages such as python, java, c#,visual basic,node.js..... These phenomenes are very slow, yet consumming alot of RAM for a simple task.

Surely, android studio is built with one of these (high level) :lol: languages. That's why you need atleast 16 GB of RAM to run it.

And I forgot to mention, some dubious C/C++ APIs (you know them).

Re: Can Windows be replaced, and how !?

Posted: Fri Sep 02, 2022 11:58 pm
by iansjack
devc1 wrote: Windows main problem is supporting dumb languages such as python, java, c#,visual basic,node.js..... These phenomenes are very slow, yet consumming alot of RAM for a simple task.
All those languages are supported on Linux and Mac OS. So what’s this got to do with your anti-Windows rant?

Re: Can Windows be replaced, and how !?

Posted: Sat Sep 03, 2022 1:56 am
by eekee
devc1 wrote:how cyber-criminals used to get into your PC with just a picture
Years ago, libjpeg had a buffer overflow bug which, if I remember right, meant that a maliciously-constructed jpeg picture could run code on the X server under Linux. I have no doubt similar bugs have existed in Windows.
devc1 wrote:or when plugging your floppy.
This one is easy to explain in an OS development forum. :) Boot sector viruses modified the boot sector code to stay in memory, to copy itself to other floppies or to hard drives, and to do other malicious or annoying things. (Bootsector viruses need to be for a specific OS to know how to say in memory and reproduce, but there were some for other systems.) Viruses were usually written by teenagers in those days, 'annoying' was more common than 'malicious'. On the Atari ST, I got caught by the Ghost virus which intermittently reversed the mouse pointer's vertical axis; annoying but surprisingly easy to get used to until it gets reversed again! XD

devc1 wrote:Yes it is down to the application, thats why Windows consumes 60% of my RAM before I boot up my computer : )

Once I tried to disable the page file, it leaded to better performance, LESS memory usage around 30% (IDK How, Why), and QEMU won't start with 4gb ram if I open multiple apps. But currently I am using it.
Interesting! I guess both OS components & user code see less total memory reported and allocate less.

I'm almost (but not quite) sure that the majority of memory most OSs allocate is for disk buffering. Also, ZFS wants vast amounts of RAM and Windows and Mac have developed some comparable filesystem features, so maybe the RAM is for more than just caching.
devc1 wrote:Windows main problem is supporting dumb languages such as python, java, c#,visual basic,node.js..... These phenomenes are very slow, yet consumming alot of RAM for a simple task.
You haven't seen slow until you've seen Python on an 8MB 486! :mrgreen: It was my first Linux box, I had no idea what I was doing, and the hardware was obsolete but the OS new-ish. The Python program was called Anaconda; it was Red Hat's 90s front-end to their package manager. Progress bars would take so long to appear, they'd give an estimated time to completion of several hours, but then the actual installation would complete in seconds. It was hilarious!

Years later, I had a Mac with a similar problem, though not so extreme. It was a 2001 iBook with the maximum RAM fitted, but OS X still wanted more just to load a progress bar. It was an animated progress bar, but that's no excuse. In 1992, Transport Tycoon could animate scenes in up to 4 movable windows and the background simultaneously on a 1st-gen Pentium with 4MB RAM, so there's little excuse for OS X chugging on a 320MB 466MHz PPC720. (That's the 2nd CPU which Apple called G3.)


Looking back to that era, I don't understand why Python was so bloated. In 2002 or so, I wrote a menu system in Python and used a window manager written in Lisp. The menu system was so much slower to start than the window manager. This seemed especially weird when I read that Python could be seen as a form of Lisp. Perhaps it's because Python is object-oriented, meaning it ran code for what would be simple memory accesses to structure elements in any sane language.

Object-oriented programming deserves special mention. From the 60s to the 90s, you often heard of the need to make programming easier. The motivation for this was not altruistic or progressive, it was financial. Corporations wanted large teams of programmers at low cost, but highly-trained professionals were expensive. High-level languages were an early effort to make programming cheaper, but they were 3rd generation. already by the end of the 60s, people were looking for a 4th-generation language (4GL). (For example, Forth, developed in 1970. Chuck Moore initially wanted to call it Fourth as a 4GL.) 15 or 20 years later, database languages were claimed to be 4GL.

But "making programming easier" was just the public face of all this. The idea of constraining programmers so they couldn't write bad code became prominent in the 80s & 90s. Apple were especially prominent, but there were many others. So, when you have a large corporation with many teams of programmers, what if you could constrain them so that they could only write code which fit their place within the hierarchy of the organization? This is what OO programming does; the structure of the language matches the structure of large corporations.

Now, I mentioned Apple for a reason: they particularly got into education. Their propaganda was so powerful that throughout the 90s and 00s, it was impossible to release a new programming language without making it object-oriented or at least pretending it was. The universal belief in this truth was only broken when the creators of Unix spoke up. It's difficult to explain how deep this belief went without comparisons with religion, but perhaps compare the fanaticism with which the use of GOTO was eliminated after one paper warned people to use it carefully. Programmers are a crazy bunch. :p

Python was designed only as a scripting language; its author didn't want to call it a programming language until the mid-00s, but he designed it as an OO language all the way back in the early 90s.


Apart from all that, there's something entirely different which I hate about Windows and other GUI OSs. It hasn't bothered me for a few years, but now I want to partition a disk in Windows 10, I've run into it again and I remember. In Windows, I like to use the shell to launch Windows shortcuts. To get a shortcut, I can open the Start menu and type, (Cortana gets the typed text,) then right-click on the result and select "open file location". With Disk Manager, nothing happens when I right-click because Disk manager is part of the control panel and thus special and different to other programs. Never mind that it works perfectly well as a standalone program, it is special and thus the system places obstructions in the way of things you'd normally do with any other standalone program. I found this sort of thing frustrating to the point of actual pain when I was new to GUI OSs and trying to figure out what I could do with them.

Re: Can Windows be replaced, and how !?

Posted: Sat Sep 03, 2022 3:40 am
by iansjack
eekee wrote:Apart from all that, there's something entirely different which I hate about Windows and other GUI OSs. It hasn't bothered me for a few years, but now I want to partition a disk in Windows 10, I've run into it again and I remember. In Windows, I like to use the shell to launch Windows shortcuts. To get a shortcut, I can open the Start menu and type, (Cortana gets the typed text,) then right-click on the result and select "open file location". With Disk Manager, nothing happens when I right-click because Disk manager is part of the control panel and thus special and different to other programs. Never mind that it works perfectly well as a standalone program, it is special and thus the system places obstructions in the way of things you'd normally do with any other standalone program. I found this sort of thing frustrating to the point of actual pain when I was new to GUI OSs and trying to figure out what I could do with them.
In both Windows 10 and 11 if you search for "Disk Manager" with Cortana the right-hand pane in the result has the option "Open". Clicking this (surprise, surprise) opens Disk Management. :?

Re: Can Windows be replaced, and how !?

Posted: Sat Sep 03, 2022 5:06 am
by devc1
I really appreciate it, I wasn't alive back in the 90s. Python is the kind of interpreter who does a memcmp for all the possible instructions. I could not imagine that companies are considering it as a first requirement language. It is just like putting all these new technologies, these massive hardware speeds on the trash can. I knew these dumb languages exist everywhere, I meant that Windows uses them (mainly) for performance-needing taks like the GUI and almost every app. If we just use C without any optimizations the OS could be just 50x times faster and consumming very much less RAM.

Microsoft CEO, we are waiting for your approval : )

Re: Can Windows be replaced, and how !?

Posted: Sat Sep 03, 2022 5:13 am
by iansjack
I don’t believe that any of the core components of Windows (indeed, any components) are written in Python. Could you detail which parts of Windows you know to be written in Python, and how you know?

Otherwise we have to conclude that your comments are prime bs.

Re: Can Windows be replaced, and how !?

Posted: Sat Sep 03, 2022 5:27 am
by devc1
I am talking about C#, And sometimes they use c++ but with slow libraries (no difference)

Re: Can Windows be replaced, and how !?

Posted: Sat Sep 03, 2022 5:29 am
by devc1
Some apps written in C# :
Windows Installer XML

Microsoft Visual Studio

Paint.NET

You see why Visual Studio is the slowest IDE on earth

Edit : Guys, I have seen the wish list of osdev, I got a full PE (Portable Executable) Loader, that supports relocation and loading DLLs (and sub-DLLs). I can write an article about it.
Talking about memory management, I don't know something about this solaris and blablabla OSes, I am just sure that every OS uses the same method, and I can describe it in an article aswell. It is just : A list of struct page with the physical address and some flags (Disk Paged, Compressed, Disk paging allowed, Allocated...) and every process has its internal memory management structure with a PAGE_ALLOCATION_TABLE that contains the state of the allocated virtual memory (pages). And allocated/free heaps in a linked list. That's how I do it, it works for kernel mode and user mode processes and it is somewhat extensible. You can allocate fragmented or (contiguous for kernel mode drivers) memory. No thing very complicated !

Re: Can Windows be replaced, and how !?

Posted: Sat Sep 03, 2022 6:04 am
by iansjack
Again, you confuse the application with the OS. For example, Eclipse - which is widely used on Linux - is just as slow as Visual Studio. There are plenty of faster, less feature-loaded IDEs for Windows.

I appreciate your concern that many applications are slow on older machines, but it’s a mistake to confuse this with the underlying OS.

Re: Can Windows be replaced, and how !?

Posted: Sat Sep 03, 2022 6:50 am
by Ringding
devc1 wrote:Some apps written in C# :
You see why Visual Studio is the slowest IDE on earth
All the IntelliJ stuff is much slower (PyCharm, GoLand, Android Studio, …)!

Re: Can Windows be replaced, and how !?

Posted: Sat Sep 03, 2022 6:56 am
by devc1
iansjack wrote:Again, you confuse the application with the OS.
Well the applications are what makes an OS, What do you call Windows without Windows ??
I am just mixing everything up don't care.

I still consider apps a part of the OS, because without them there is no OS.