0
$\begingroup$

I have one query, Operating system (In machine language) as I study is the combination of opcodes that executes, Now, the opcodes are dependent on the instruction set architecture like how and which opcodes are executes. There are number of architectures such as RISC, CISC, Intel x86 which by sure have different opcode structure so how come the operating system become generic. For example we can run same Windows on X86 Intel computer and same windows DVD can be run on the AMD processor architecture ? or Am I missing some thing.

$\endgroup$
3
  • $\begingroup$ Because AMD CPUs are designed to be 100% compatible with Intel's, and this is no small endeavour. Well there are a few instructions that are specific, for example for vitualisation, but 'normal' programs use instructions supported by both Intel and AMD. $\endgroup$
    – Grabul
    Commented Apr 29, 2017 at 18:50
  • $\begingroup$ @TEMLIB There is also the possibility of "fat binaries" that include multiple executables (or even install-time compilation from a more abstract program description). It is also possible for the OS to be ignorant of most of the architecture; if the ISA provides context save and restore operations (and the OS can determine how much storage a context requires), then the OS can "support" new instructions even if they add context. (A firmware layer could provide the same functionality as hardware-provided instructions for saving and restoring contexts.) Then there's firmware binary translation. $\endgroup$
    – user4577
    Commented Apr 30, 2017 at 1:52
  • $\begingroup$ @PaulA.Clayton : Yes, yes... It deserves a real answer with explanations. This seemingly simple question is actually quite interesting. There are many options (emulation, recompilation, trap-and-emulate, the Transmeta CPUs...) There are rumours about a x86 emulator (dynamic recompilation as QEMU) in future versions of Windows for ARM, as Apple did twice before. $\endgroup$
    – Grabul
    Commented Apr 30, 2017 at 13:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.