This question appears to be outside the scope defined in Help Center for stack overflow.
Closed 6 years ago.
6 years agoIs there a language in which you cannot create an operating system?
if any
What are the reasons for this?
The answer to "OS" and "Language" depends on what it refers to.
If you don't have any specific assumptions, you might be thinking about OSX, Windows, or Linux, but depending on what you use, the bootloader's hairy, the so-called monitor subroutine group is a kind of OS, and some are responsible for portable language processing and huge distributed systems.In the latter case, you may want to leave access to low-level resources, such as hardware, on top of the operating system running on individual machines.
However, it's no use talking too much, so let's just say that it runs on a piece of hardware without any other software running to provide services to the applications that run on top of it.Therefore, access to hardware resources is required.On the other hand, gorgeous GUI etc. (as long as they provide low-level access to the device) can be done with an application and are not covered.
I think it's meant to be a programming language, but even if it's limited to programming languages,
There are several possible ranges, such as
"Language Specification Scope" means the scope that can only be assembled from the language specification and the functionality provided by the standard library.Some languages have very little input/output in their language specifications or standard libraries, so they will not be able to write access to the hardware itself and not the OS that was considered above.
However, if you interpret this definition too strictly, some existing system languages may miss it. (I haven't read C's language definition recently, so I might have misremembered it, but
in C.)
Wasn't it not guaranteed to work by the specification that an integer value was cast into a pointer to access I/O mapped to a specific address?)
In this sense, I think there are surprisingly few languages in which OS can be written.At least the hardware I/O must be clearly defined in the specification.In this sense, POKE, the former BASIC, where direct access to the machine's memory address was defined in PEEK, etc., are more like "Language in which you can write an OS."
Next, the order changes, but the "scope of functionality possible in language specifications."If you think of a feature that is not specified in the language specification or standard library but is not prohibited by the specification from the processing system, can you write an operating system?
For example, Scheme's language specification has little I/O, no direct access to memory, and no way to specify memory allocation or even release, depending on garbage collectors.However, the processing system is not prohibited from defining "a function that reads and writes to an address" or "a function that stops garbage collectors within a specific range."As long as the processing system provides that functionality, Scheme alone can write runtime and bootloaders that include Scheme garbage collectors, and even the operating system.
In this sense, it is possible to "write an operating system" in almost any general language.However, there are some languages that are completely Turing but have no room for library expansion by the processing system (esoteric languages such as Brainf*ck come to mind right away).In principle, you should be able to create a sandbox-like environment in which you can run applications, but you won't be able to write an operating system like you thought above.
Finally, "the functionality of implementing a language in real life" is what we can do as a processing system for that language today.This is a superset of "Language Specification Range" and a subset of "Language Specification Range Capabilities."
This is probably the category that comes to mind immediately when it comes to "Language in which you can write an operating system."C, C++, of course, but older people like Lisp and Fortran are also likely to have long history processing systems (I'm not familiar with Fortran processing systems, but Allegro Common Lisp, for example, has low-level access primitives).
Loose Recruitment: If you leave a comment saying, "I can write a bare metal OS with this language processing system, I can write a bare metal OS." I will summarize it accordingly.If it's already written, it might be good to have the OS name.I remember reading that PL/I was used in the general purpose operating system.
I don't have any.
Commonly called programming languages are designed to be represented by any algorithm and can be translated into one another."Turing is perfect".Therefore, it is not true that one language can do what another language can do.
However, since we are good at it and bad at it, each language has a different field of practical programming with practical effort.
As for the OS, I am not good at many languages, so I think most of them say that they can make it, but it is unrealistic.
There are probably two reasons for this, but it depends on the language, so if you focus on the language you are interested in, it will be easier to get a detailed answer.
© 2024 OneMinuteCode. All rights reserved.