• Re: A Question About Any OS :-)

    From Tyrone@21:1/5 to All on Sun Dec 31 05:17:40 2023
    On Dec 30, 2023 at 10:09:47 PM EST, "Physfitfreak" <Physfitfreak@gmail.com> wrote:

    On 12/30/2023 9:01 PM, Physfitfreak wrote:
    On 12/30/2023 8:54 PM, Physfitfreak wrote:

    When one goes from a computer to another computer with a different
    CPU, and installs the same copy of OS on the new computer, how does
    the OS know how to use a different CPU?

    I guess I could ask the same question in this way as well:

    Are there "drivers" for each CPU made, which the OS automatically
    searches and finds and uses so it can run on different CPU machines? I
    can't think of any other way for the same copy of OS working on
    different CPU machines.


    And if that's the case (drivers available for each particular CPU) then
    how the machine works with other OS's installed on it? Are there drivers
    for each OS in the market also available for that particular CPU? That
    makes (number of CPUs) X (number of OS's) drivers! Is this the correct situation?

    Yes.

    Also, there are drivers for each GPU, networking chipset, USB chipset, audio chipset and everything else in the computer. The OS installer identifies, searches for and (hopefully) loads the correct drivers.

    So the OS talks to the drivers without needing to know the nitty gritty
    details of every CPU, GPU, networking card, USB chips, audio, printers etc.
    The OS basically says "draw this mouse pointer here" and the video driver handles the details.

    So when you install any OS - Linux, Windows, Unix, whatever - and you have no sound, its because the incorrect audio driver was installed. Or that
    particular OS has no driver for that particular audio chipset.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Farley Flud@21:1/5 to Physfitfreak on Sun Dec 31 12:04:34 2023
    On Sat, 30 Dec 2023 20:54:07 -0600, Physfitfreak wrote:

    When one goes from a computer to another computer with a different CPU,
    and installs the same copy of OS on the new computer, how does the OS
    know how to use a different CPU?


    Any OS that is compiled for a specific CPU family, such as
    x86_64/AMD64, can only run on that CPU family. So if you have
    Linux compiled for x86_64/AMD64 you can't install that OS on a
    SPARC or PowerPC or even x86_32.

    All Linux distros that target the x86_64/AMD64 family will have
    the kernel and software compiled with highly generic options
    so that the OS can run on *any* version of x86_64 such as i7
    or Core2. Distros also might be able to use the CPUID instruction,
    which determines the CPU type, to deliver more specific software
    at runtime but I am not sure about what the distros do.

    https://en.wikipedia.org/wiki/CPUID

    The CPUID instruction can be used by developers to use only certain
    functions that are tailored for specific CPU features.

    It is, of course, possible to compile a Linux kernel and software
    to run only on a single variant of x86_64 CPU. This will considerably
    improve performance. But such an OS could only be moved to a machine
    with the exact same processor.

    The basic story is this:

    An OS and software must be compiled to fit a specific CPU. Since there
    are so many different CPU types, a Linux distro would have to provide
    dozens of different versions to handle them all. This is not practical. Instead, a Linux distro will provide a kernel and software that is compiled generically so that it can run on all members of a given CPU family. This
    is sub-optimal in terms of performance but it is the only practical
    solution.

    To get the best possible "fit" for a specific GPU, the user must compile
    the kernel and software using highly specific options.

    As regards Microslop, their OS only runs on x86_64 and is built generically
    so that it will run on any x86_64 type but it probably also uses the CPUID instruction (again I am not sure).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?St=C3=A9phane?= CARPENTIE@21:1/5 to All on Sun Dec 31 14:13:48 2023
    Le 31-12-2023, Physfitfreak <Physfitfreak@gmail.com> a écrit :
    On 12/30/2023 9:01 PM, Physfitfreak wrote:
    On 12/30/2023 8:54 PM, Physfitfreak wrote:

    When one goes from a computer to another computer with a different
    CPU, and installs the same copy of OS on the new computer, how does
    the OS know how to use a different CPU?

    I guess I could ask the same question in this way as well:

    Are there "drivers" for each CPU made, which the OS automatically
    searches and finds and uses so it can run on different CPU machines? I
    can't think of any other way for the same copy of OS working on
    different CPU machines.


    And if that's the case (drivers available for each particular CPU) then
    how the machine works with other OS's installed on it? Are there drivers
    for each OS in the market also available for that particular CPU? That
    makes (number of CPUs) X (number of OS's) drivers! Is this the correct situation?

    I didn't aw the first messages, so I'll answer them globally. There are
    a lot of CPU but not that many CPU families. Globally, any recent CPU
    from AMD or Intel are compatible. So you need only one driver for all of
    them. If you want a recent Mac driver, it's another story because Apple
    stopped using Intel CPU and use its on CPUs: M1 and M2 (if I understood
    it well because as I don't really care I don't follow it closely). Which
    need new drivers. Apple said it won't refuse Linux to run on it's
    machines but won't help neither. So, the purpose of ashai <https://asahilinux.org/> is to run Linux on Apple stuff, and it needs
    new drivers. From what I understood, the Apple CPU are way better than
    the others, so there is a good reason to buy a Mac and put Linux on it.
    But as I don't need a new computer and I'm not interested on hardware, I
    don't know the subject.

    So basically, when you need an ISO image to put on your USB key, you
    just need to know the family of your CPU: Intel/AMD (64 or 32 bits for
    old verions), ARM, PPC or others.

    --
    Si vous avez du temps à perdre :
    https://scarpet42.gitlab.io

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Ahlstrom@21:1/5 to Physfitfreak on Sun Dec 31 09:50:53 2023
    Physfitfreak wrote this copyrighted missive and expects royalties:

    When one goes from a computer to another computer with a different CPU,
    and installs the same copy of OS on the new computer, how does the OS
    know how to use a different CPU?

    What do you mean by "different CPU"? Obviously your Intel OS won't work on a Motorola CPU.

    --
    Q: Why do mountain climbers rope themselves together?
    A: To prevent the sensible ones from going home.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Farley Flud@21:1/5 to Physfitfreak on Mon Jan 1 15:03:16 2024
    On Sun, 31 Dec 2023 16:32:45 -0600, Physfitfreak wrote:


    If a C++ program's EXE file can only run on same machine with same
    Windows version, then it is as good as crap. Cause you'd have to use its
    cpp source code and _recompile_ and relink on another machine or another version of windows. The EXE form of the program gets ridiculously
    limited, and will have to get recreated over and over to make it run on
    a new computer or new version of Windows.


    That's the whole point of compiling.

    Compilation is the translation of source code into machine language instructions for a specific CPU. If the CPUs are not the same, then
    the source must be compiled again for the different CPU.

    There is no way to avoid this. That's why they have distros because
    it removes the burden of compiling from the user.

    Even on the same machine (CPU), if a program (exe) depends on a library
    and that library is updated then the program needs to be compiled again.

    On my Gentoo system, for example, there are times when a single library
    is updated and that will mandate the re-compiling of many other programs.

    That's computer reality. It's compile, compile, and compile again all
    the time. There is no other way.

    Again, most users don't notice because they use distros and a distro
    does all the work for them. But a distro is ALWAYS sub-optimal in terms
    of performance.

    But your question also concerns "cross compiling:"

    https://en.wikipedia.org/wiki/Cross_compiler

    Cross compiling is compiling source code on one machine (CPU) so
    that it will execute on a different machine with a different CPU.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From chrisv@21:1/5 to Farley Flud on Mon Jan 1 11:37:17 2024
    Farley Flud wrote:

    That's the whole point of compiling.

    Plus the compiler can "warn" you if you have made any errors! It
    knows the programmer's intent, so can detect any design, logical, or typographical errors. After a clean compile, the program *will* work
    as intended, and does not need to be tested.
    </sarcasm>

    --
    '[chrisv] literally said it was "stupid" to test the code vs relying
    on compiler warnings.' - DumFSck, lying shamelessly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From chrisv@21:1/5 to Physfitfreak on Mon Jan 1 19:56:31 2024
    Physfitfreak wrote:

    This is ridiculous

    Agreed. Kook.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Farley Flud@21:1/5 to Physfitfreak on Tue Jan 2 08:22:33 2024
    On Mon, 1 Jan 2024 18:57:50 -0600, Physfitfreak wrote:


    As I said in another post today, things don't have to be the way there
    are right now. A more logical way to adopt is to create a standard for
    CPU's by which they would create the exact same result for each
    particular machine language command, regardless of what CPU it is that
    the machine language instruction is applied to.

    Then, any EXE file in the world would run on any CPU following that
    standard. Why hasn't this been done?


    Progress.

    Regarding the x86_64/AMD64 CPU, the basix instruction sets are
    the same but every iteration adds more different instruction
    sets: MMX, SSE, SSE4, AVX, AVX2, etc.

    Then there is the issue of cache size, which is different for
    different CPUs, and cache is by far the most important for
    performance.

    There is a step in the direction of a standard called RISC
    processors, but the majority of CPUs on the market are
    not RISC:

    https://en.wikipedia.org/wiki/Reduced_instruction_set_computer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From candycanearter07@21:1/5 to Physfitfreak on Tue Jan 2 17:46:10 2024
    On 1/1/24 17:31, Physfitfreak wrote:
    On 1/1/2024 9:03 AM, Farley Flud wrote:
    On Sun, 31 Dec 2023 16:32:45 -0600, Physfitfreak wrote:


    If a C++ program's EXE file can only run on same machine with same
    Windows version, then it is as good as crap. Cause you'd have to use its >>> cpp source code and _recompile_ and relink on another machine or another >>> version of windows. The EXE form of the program gets ridiculously
    limited, and will have to get recreated over and over to make it run on
    a new computer or new version of Windows.


    That's the whole point of compiling.

    Compilation is the translation of source code into machine language
    instructions for a specific CPU.  If the CPUs are not the same, then
    the source must be compiled again for the different CPU.

    There is no way to avoid this.  That's why they have distros because
    it removes the burden of compiling from the user.

    Even on the same machine (CPU), if a program (exe) depends on a library
    and that library is updated then the program needs to be compiled again.

    On my Gentoo system, for example, there are times when a single library
    is updated and that will mandate the re-compiling of many other programs.

    That's computer reality.  It's compile, compile, and compile again all
    the time.  There is no other way.

    Again, most users don't notice because they use distros and a distro
    does all the work for them.  But a distro is ALWAYS sub-optimal in terms
    of performance.

    But your question also concerns "cross compiling:"

    https://en.wikipedia.org/wiki/Cross_compiler

    Cross compiling is compiling source code on one machine (CPU) so
    that it will execute on a different machine with a different CPU.



    Then why, after all these years, this job is still being relegated to
    the user or certain distros? Why haven't they come up with a standard at
    the machine language level, so _any_ EXE file could flawlessly run on
    _any_ CPU following that standard?... This is ridiculous. I don't think
    it is impossible to create a standard by which machine language
    instructions themselves, each, creating identical results from it,
    regardless of what CPU it is as long as CPUs themselves are following
    certain standards.

    The way it is now, is like some schmuck in Intel suddenly gets erection
    to create a CPU that follows his own dick and nothing else, thus
    throwing all the time and efforts made to get work done in the world on
    a previous type of CPU in the waste basket, and make all developers
    start from the beginning creating new OS, new programs , new everything
    just so they would work on the dick-aligned schmuck's CPU.

    This is ridiculous...

    A standard at the machine language level will put all the CPUs in the
    world plus all of those who'll come in the future, inside a Black Box,
    if they follow that standard! Then it wouldn't matter what pc or what os
    or what mainframe it is that your EXE file that's compiled only once in
    its lifetime, wants to run on. Doesn't it make sense?

    From what I understand, most CPU standards are legacy from what they
    made in the past, so it would be near-impossible to get everyone to
    agree on something.

    Also the lack of compatibility also comes from relying on Windows DLL
    files (compiled libraries, equivelant of Linux .so files) that provide
    core functionality and are missing on Linux systems. And, even if you do download them with WiNE, it still needs to be translating it to Linux
    syscalls because none of the source code for it is open.
    --
    user <candycane> is generated from /dev/urandom

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rbowman@21:1/5 to Joel on Wed Jan 3 02:31:23 2024
    On Tue, 02 Jan 2024 19:02:40 -0500, Joel wrote:

    I don't imagine a reason to make a universal machine language.

    ILs are a step in that direction but .NET Native is going in the other direction with AOT rather than JIT compilation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From chrisv@21:1/5 to Physfitfreak on Wed Jan 3 07:02:06 2024
    Physfitfreak wrote:

    candycanearter07 wrote:

    Also the lack of compatibility also comes from relying on Windows DLL
    files (compiled libraries, equivelant of Linux .so files) that provide
    core functionality and are missing on Linux systems. And, even if you do
    download them with WiNE, it still needs to be translating it to Linux
    syscalls because none of the source code for it is open.

    Sure, and that's why the compatibility cannot come via something done
    higher up. You'd have to go down to machine level instructions and make >_that_ compatible to all machines. An EXE file has everything it needs >already built into it.

    *whoosh*

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From candycanearter07@21:1/5 to Joel on Fri Jan 5 14:08:05 2024
    On 1/2/24 18:02, Joel wrote:
    candycanearter07 <no@thanks.net> wrote:
    On 1/1/24 17:31, Physfitfreak wrote:

    A standard at the machine language level will put all the CPUs in the
    world plus all of those who'll come in the future, inside a Black Box,
    if they follow that standard! Then it wouldn't matter what pc or what os >>> or what mainframe it is that your EXE file that's compiled only once in
    its lifetime, wants to run on. Doesn't it make sense?

    From what I understand, most CPU standards are legacy from what they
    made in the past, so it would be near-impossible to get everyone to
    agree on something.


    I don't imagine a reason to make a universal machine language.


    Also the lack of compatibility also comes from relying on Windows DLL
    files (compiled libraries, equivelant of Linux .so files) that provide
    core functionality and are missing on Linux systems. And, even if you do
    download them with WiNE, it still needs to be translating it to Linux
    syscalls because none of the source code for it is open.


    Wine is a remarkable system, I am using it literally as I type this,
    to run a Winblows NNTP client. Can't beat Linux to me.

    Yes, but it still does need to do some translation, which causes
    overhead. And, not everything (cough Adobe) is compatible with it yet.
    --
    user <candycane> is generated from /dev/urandom

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?St=C3=A9phane?= CARPENTIE@21:1/5 to All on Fri Jan 5 20:40:52 2024
    Le 01-01-2024, Physfitfreak <Physfitfreak@gmail.com> a écrit :

    Then why, after all these years, this job is still being relegated to
    the user or certain distros? Why haven't they come up with a standard at
    the machine language level, so _any_ EXE file could flawlessly run on
    _any_ CPU following that standard?...

    You want to know why java doesn't exist? In fact, it does. And when you
    have an interpreted language, it runs on any computer, too.

    Now, if you want to be able to compile your program to be able to use
    the possibilities of your CPU, it won't be able to run on another CPU
    which doesn't have those specification.

    This is ridiculous.

    No, you just don't understand what you request. If you want to compile
    your program to be as fast as possible on your CPU, it can't be useful
    on another CPU.

    I don't think
    it is impossible to create a standard by which machine language
    instructions themselves, each, creating identical results from it,
    regardless of what CPU it is as long as CPUs themselves are following
    certain standards.

    OK, so you have only one CPU standard and you don't want it to improve.
    Because any improvement will make it, by design, different from the
    standard.

    A standard at the machine language level will put all the CPUs in the
    world plus all of those who'll come in the future, inside a Black Box,

    Yes, but a bad black box. Because what the language could do would only
    be the lowest possible denominator.

    if they follow that standard!

    How old is your computer? Do you like modern computers possibilities
    compared with old computers possibilities? If yes, you want to stop any improvement. If yes, do you really remember the old possibilities?

    Doesn't it make sense?

    For FR/LP/NV/DG/whatever who is stuck in the past, it probably makes
    sense. But I really enjoy the new possibilities. When I was you, I used
    to play on Amstrad CPC 464. To be able to play I had to wait for
    something like fifteen/twenty minutes. And the screen was only green. I
    like my programs being able to start faster. I like to have colors. I
    like to have a better sound. I'm pretty sure in the future I'll like
    things that don't exist today.

    --
    Si vous avez du temps à perdre :
    https://scarpet42.gitlab.io

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?St=C3=A9phane?= CARPENTIE@21:1/5 to All on Fri Jan 5 21:12:21 2024
    Le 03-01-2024, Joel <joelcrump@gmail.com> a écrit :

    I don't imagine a reason to make a universal machine language.

    Because a programmer want to program and to spend his time to improve
    his program. He doesn't want to spend most of his time to adapt it to
    every user he has. So if there is only one binary to give, it's easy.
    And that's why java was invented.

    --
    Si vous avez du temps à perdre :
    https://scarpet42.gitlab.io

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?St=C3=A9phane?= CARPENTIE@21:1/5 to All on Fri Jan 5 21:14:06 2024
    Le 03-01-2024, Physfitfreak <Physfitfreak@gmail.com> a écrit :
    An EXE file has everything it needs already built into it.

    Except the optimisation you want to use all the capacities of your CPU.

    --
    Si vous avez du temps à perdre :
    https://scarpet42.gitlab.io

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?St=C3=A9phane?= CARPENTIE@21:1/5 to All on Fri Jan 5 22:08:12 2024
    Le 05-01-2024, Joel <joelcrump@gmail.com> a écrit :
    Stéphane CARPENTIER <sc@fiat-linux.fr> wrote:

    I don't imagine a reason to make a universal machine language.

    Because a programmer want to program and to spend his time to improve
    his program. He doesn't want to spend most of his time to adapt it to
    every user he has. So if there is only one binary to give, it's easy.
    And that's why java was invented.

    Then create a CPU based on Java.

    You want a reason. I gave you one. You can look for alternate solutions,
    but it doesn't mean the reason is not a real one. Mostly when your
    alternate solution is stupid. The programmer is not the same person as
    the CPU designer. I'm not that surprised you can't understand it. Try to
    get a brain please. You claim you are Jesus, but unlike you he was smart.

    But until then, there are lower
    level instructions that for a human are assembly language, which can
    be derived with a C compiler's output, in machine language readable
    into address space for the process.

    Are you really one of the biggest developers in the world as you claim
    you are? How can you possibly a program which will compile at the same
    time for an ARM CPU and for an Intel CPU?

    You can build a JDK which will compile on the CPU of an ARM and on the
    CPU of an Intel, but it will request two compilations. So you provide
    only ONE Java binary, but two JDK binaries. And the one providing the
    JDK binaries is not the same as the one providing the Java binary. It's
    the purpose of Java. Even if you can't understand it.

    --
    Si vous avez du temps à perdre :
    https://scarpet42.gitlab.io

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?St=C3=A9phane?= CARPENTIE@21:1/5 to All on Fri Jan 5 21:23:48 2024
    Le 02-01-2024, Physfitfreak <Physfitfreak@gmail.com> a écrit :

    Java is too fucking slow.

    Try to figure out why. And you'll answer your own questions.

    --
    Si vous avez du temps à perdre :
    https://scarpet42.gitlab.io

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From candycanearter07@21:1/5 to Joel on Sat Jan 6 13:58:08 2024
    On 1/5/24 14:23, Joel wrote:
    candycanearter07 <no@thanks.net> wrote:

    Wine is a remarkable system, I am using it literally as I type this,
    to run a Winblows NNTP client. Can't beat Linux to me.

    Yes, but it still does need to do some translation, which causes
    overhead. And, not everything (cough Adobe) is compatible with it yet.


    I had Photoshop, when I deleted Win11. I wasn't going to renew the subscription this year, anyway. I was interested in using it, sure,
    but only because it exists, I never figured out how to do anything
    that great with it. GIMP, now, is just what is on Linux and really
    what one needs. Just as Wine provides the means to run a couple of
    Winblows apps, then you have the usual variety of apps one uses a lot.
    I believe using Wine is easily worth it, compared to merely running
    Windows 10 or 11 in their current builds.

    Fair point.
    --
    user <candycane> is generated from /dev/urandom

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)