Why are most kernels of operating systems written in C?

Why are most kernels of operating systems written in C? Surely, there must be newer, up to date language that could fill the job.

Beware Cat Shirt $21.68

Rise, Grind, Banana Find Shirt $21.68

Beware Cat Shirt $21.68

  1. 4 weeks ago
    Anonymous

    because its turing complete and not a single troony more

  2. 4 weeks ago
    Anonymous

    Because most kernels are just UNIX clones.

    • 3 weeks ago
      Anonymous

      serenity os is written in c++.
      also it's a unix clone

  3. 4 weeks ago
    Anonymous

    C is new all things considered. Modern socs probably need concurrency built ins like go or rust, but both of those languages are unsuitable for kernels.
    Most languages that pass for new these days are lisp/apl retrains.

    • 3 weeks ago
      Anonymous

      >concurrncy built-in
      >rust
      tokio is 3rd party package

      • 3 weeks ago
        Anonymous

        The standard library has threads including a nice scoped API and the type system knows about thread safety so that libraries can guarantee no data races

      • 3 weeks ago
        bruce3434

        Tokio is an executor. The async/future model and Send/Sync trait is built into the stdlib.

        • 3 weeks ago
          Anonymous

          I thought you killed yourself

  4. 4 weeks ago
    Anonymous

    >Surely, there must be newer, up to date language that could fill the job.
    There is not.

    • 3 weeks ago
      Anonymous

      Is that the lagtrain girl?

  5. 4 weeks ago
    Anonymous

    I don't get this post, why is it a problem?
    C is a very popular language to this day.
    If you have a problem with C use redoxOS.
    Windows, linux, mac and bsd are all build on C.

  6. 4 weeks ago
    Anonymous

    Because C is still the best low-level programming language. Just because English is a few thousand years old doesn't mean everyone should switch to Esperanto and start learning how to communicate again from scratch.

    • 3 weeks ago
      Anonymous

      but english today isn't the same as english in the 18th century
      how has C evolved since the 50's?

      • 3 weeks ago
        Anonymous

        by being invented
        by allowing variable declarations somewhere other than the start of scope
        support for bools
        support for // comments
        new data types
        inline functions

        Mostly things that are just quality of life improvements.

      • 3 weeks ago
        Anonymous

        >how has C evolved since the 50's?
        Go read the C99, C11 and C23 standards. Things do change and get added on them, just slowly and carefully,

      • 3 weeks ago
        Anonymous

        >how has C evolved since the 50's?
        Yes.

    • 3 weeks ago
      Anonymous

      >English is a few thousand years old
      This is completely true and useful information you can rely on as a time traveler

  7. 4 weeks ago
    Anonymous

    >Why are most threads of IQfy written with bait? Surely, there must be newer, up to date topics that could fill the time.

    • 4 weeks ago
      Anonymous

      linus has a list of problems with c and if you want to do with a kernels language you can ask him

  8. 4 weeks ago
    Anonymous

    because no one wants to make a modern low level systems language, that is, one where it is easy to reason about what exactly will be done by looking at the code, with abi guarantees

  9. 4 weeks ago
    Anonymous

    Because C is the backdoor. It's designed to put bugs in code.

  10. 3 weeks ago
    Anonymous

    Because you haven't heard of any kernels written in this century.

  11. 3 weeks ago
    Anonymous

    Because they don't know Rust.

  12. 3 weeks ago
    Anonymous

    I don't know why they didn't just make their own language when writing Windows (NT). After all they were already writing their own compiler and wrangling the language with preprocessor definitions to try and get away from the horrible null terminated strings.
    I guess C is just "good enough".

    • 3 weeks ago
      Anonymous

      Macro's were a huge mistake

      • 3 weeks ago
        Anonymous

        macros*

      • 3 weeks ago
        Anonymous

        it took some time before we got "inline" keyword.
        and va args are based on macros if memory serves well... sizeof is a macro too i think. thats two functionalities we know and love that are macro based. maybe theres more i dont know about.
        but id certainly say using macros in modern times should be done only if no alternatives exist.

  13. 3 weeks ago
    Anonymous

    Why do vertebrates breathe oxygen? Surely, there must be a newer, up to date molecule that could fill the job.

    • 3 weeks ago
      Anonymous

      Oxygen is the newer, up-to-date molecule, dumbass. It's all of the legacy organisms who still use outdated electron acceptors.
      >Anaerobic respiration is the formation of ATP without oxygen. This method still incorporates the respiratory electron transport chain, but without using oxygen as the terminal electron acceptor. Instead, molecules such as sulfate (SO42-), nitrate (NO3–), or sulfur (S) are used as electron acceptors.

      • 3 weeks ago
        Anonymous

        >anaerobic
        you forgot about asm, gay

  14. 3 weeks ago
    Anonymous

    It just works. Its minimal and its the fastest low level language. C in a way is like the next step after assembly/asm.

  15. 3 weeks ago
    Anonymous

    Because there wasn't a viable alternative to C/C++ for 40 years. Now that we finally have one (rust), it is being used in kernels as well, though it takes time to port such a big codebase.

  16. 3 weeks ago
    Anonymous

    Most kernels are 20-30+ years old.

  17. 3 weeks ago
    Anonymous

    What about Pascal?

    • 3 weeks ago
      Anonymous

      Wasn't macos originally heavily Pascal oriented?

      • 3 weeks ago
        Anonymous

        Way back in the before times during the long long ago (1980s).

  18. 3 weeks ago
    Anonymous

    >Surely, there must be newer, up to date language that could fill the job.
    Nope. They only thing that's changed for systems programming since C++ is that a bunch of dumb trannies created a language that forces to you follow autistic memory management rules.

    • 3 weeks ago
      Anonymous

      >They only thing that's changed for systems programming since C++ is that a bunch of dumb trannies created a language that forces to you follow autistic memory management rules.
      Are you trying to say C is newer than C++?

      • 3 weeks ago
        Anonymous

        >C
        It doesn't have any rules.

        • 3 weeks ago
          Anonymous

          it doesn't need "rules", the structure is the rule.

          codelet detected. Stick to scrtch m8.

          • 3 weeks ago
            Anonymous

            >the structure is the rule.
            That's what I was IMPLYING!

  19. 3 weeks ago
    Anonymous

    Doesn't the windows kernel have a decent amount of rust?

  20. 3 weeks ago
    Anonymous

    C was the only reasonable choice up until recently. Now we have Rust.

    • 3 weeks ago
      Anonymous

      Rust is superfluous shit no one needs
      Simple as

      • 3 weeks ago
        Anonymous

        anyway in answer to OPs question, yeah, most kernels and indeed critical applications are undergoing rewrites in rust now
        >windows
        >linux
        >all major browsers
        >shells (fsh, zsh)
        >vcs (git)

        • 3 weeks ago
          Anonymous

          zsh too? bash when

        • 3 weeks ago
          Anonymous

          >are undergoing rewrites in rust now
          nobody asked for them, doe.
          and these end up to be shit anyways

          https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=rust

          • 3 weeks ago
            Anonymous

            nobody asks for rewrites. we do them because the new lang provides things we want. in rust thats speed and concurrency

          • 3 weeks ago
            Anonymous

            yeah, go ahead, why not.
            dont cry that nobody wants to use your buggy mess afterwards tho

          • 3 weeks ago
            Anonymous

            >dont cry that nobody wants to use your buggy mess afterwards tho

            Its alright, Rustaceans are all bug chasers.

          • 3 weeks ago
            Anonymous

            So its solutionism, pure and simple.

          • 3 weeks ago
            Anonymous

            >rust
            >concurrency

  21. 3 weeks ago
    Anonymous

    C++ is also used. Isn't Windows C++, not C?
    Also, inertia. We might see more OSes made in other langs in the future, although OSes were the rage in the past, nowadays not really.

    • 3 weeks ago
      Anonymous

      NT kernel is C while M$ really jumped behind C++ for userspace stuff. Seriously, M$ went frickin HAM on sepples which cemented its status. Rust's takeoff is dependent almost solely on what Redmond decides.

  22. 3 weeks ago
    Anonymous

    I know this board is mostly just undergrad and NEET shitposting, but I really hope anyone actually wanting to get into the industry sees past the trolling and memes and realizes that Rust is actually the future, has many real advantages over C and C++, and that you will need to know and use it.

    • 3 weeks ago
      Anonymous

      >Rust is actually the future
      Sorry, I was warned of moronic cargo cults in my teens.

    • 3 weeks ago
      Anonymous

      >future
      >ruled by homosexuals
      >h-hey guys look at the shirt i printed w-with the rust logo
      >sued

      lmfao you can't make this shit up

    • 3 weeks ago
      Anonymous

      Rust in its current form has no future. It'll taper off just like go and D once the next homosexual-centric esolang gets created.

      >Surely, there must be newer, up to date language that could fill the job.
      There is not.

      Sure looks like Osage-chan to me.

  23. 3 weeks ago
    Anonymous

    They aren't. They're written in custom flavors of C because C as a standard is shit.

    • 3 weeks ago
      Anonymous

      >C as a standard is shit
      Any specifics?

  24. 3 weeks ago
    Anonymous

    >why is the integral part of an os written in a fast, secure, stable ansible language?
    It's like none of you have written let alone used an asm based os...

    • 3 weeks ago
      Anonymous

      >>why is the integral part of an os written in a fast, secure, stable ansible language?
      You must be using a Lisp machine.

      >It's like none of you have written let alone used an asm based os...
      DOS was stable compared to Windows.

      • 3 weeks ago
        Anonymous

        As someone who grew up with DOS:
        lol
        lmao

      • 3 weeks ago
        Anonymous

        which windows?
        cuz afaik before 95 windows pretty much *was dos

      • 3 weeks ago
        Anonymous

        >DOS was stable compared to Windows.
        lol, lmao even

      • 3 weeks ago
        Anonymous

        >DOS was stable compared to Windows.
        zoom zoom

        As someone who grew up with DOS:
        lol
        lmao

        >DOS was stable compared to Windows.
        lol, lmao even

      • 3 weeks ago
        Anonymous

        >DOS was stable compared to Windows.

        Laughed so hard that I'm gonna need a double dose of Ibuprofen.

        • 3 weeks ago
          Anonymous

          it was and still is though

  25. 3 weeks ago
    Anonymous

    The funny thing is that there are so many things NT would require fixes for (zeroing unwritten output memory, larger pages for actual file mappings, proper async I/O), but you'll never hear Rusties argue for these things. All they care about is that their cancer is spread into every single software product in existence.

    Reminds me of trannies requiring people to use their chosen names and pronouns, otherwise the illusion breaks down and they start leaking shit all over the place.

  26. 3 weeks ago
    Anonymous

    >rust bait thread
    >C++hinklets still get btfo despite knowing that
    lol
    and furthermore
    lmao

  27. 3 weeks ago
    Anonymous

    >muh agile development
    is for trannies, gaymen, and apple.

    Anything serious is like civil engineering, old and standard is better - slow changes.

  28. 3 weeks ago
    Anonymous

    I don't do OS programming myself but I do low level programming and one of the reasons I like C is because it's abstract enough to write meaningful complexity programs but not too abstract that you can't go from C to assembly thinking about what's happening. This is still a very useful feature in 2024 when you're dealing with low level stuff.

  29. 3 weeks ago
    Anonymous

    >Surely, there must be newer, up to date language that could fill the job
    Most kernels are old as frick. No one's going to rewrite them in a completely different language.

  30. 3 weeks ago
    Anonymous

    because it just werks

  31. 3 weeks ago
    Anonymous

    >Why are most kernels of operating systems written in C? Surely
    Because most kernels of operating systems were written decades ago you mong

Your email address will not be published. Required fields are marked *