📜 ⬆️ ⬇️

Microsoft has confirmed rumors about the integration of the Linux subsystem in Windows 10

Microsoft is burning. Recently we wrote about the presence of special system files with the names LXss.sys and LXCore.sys in the newest Windows 10 build, which is used by developers of programs and drivers, as well as by testers for official purposes. The drivers contained code for parsing ELF file headers, as well as other system functions specific to Linux and absent in Windows NT by design. Already then it became obvious that Microsoft is going to seriously address the integration of the Linux subsystem in Windows 10.



The company already had a similar experience. The original concept of Windows NT (on which Windows 10 is based) implied the presence of three subsystems there: native MS Win32, UNIX POSIX, and IBM OS / 2. Both of the last subsystems fell off somewhere along the road, which led to the transformation of Windows 2000 into Windows XP, and POSIX itself migrated to a separate tool without the possibility of being present in the Windows distribution by default. The same applies to the Alpha microprocessor architecture, which Microsoft also refused to support with the release of Windows 2000. One can only guess how long the Linux subsystem will last in Windows.
')
It is worth noting that, firstly, the architecture of the Windows 10 kernel, as well as other versions of Windows NT, implies integration of other operating systems, at least at the level of support for launching applications there with the possibility of implementing the corresponding system calls with the correct semantics. To this end, an auxiliary level of subsystems was introduced, which in the case of Win32 is called the NT layer (ntdll). Other subsystem libraries also had access to the kernel and could reproduce the behavior of system calls that a particular subsystem needed (for example, fork on POSIX, which performed the branching process).

Secondly, the concepts of Windows NT and Linux are very similar: both are based on a monolithic kernel, divided into subsystems, both use similar mechanisms for implementing kernel objects and interprocess communication, and both take their roots from the concept of the original UNIX kernel.

It's hard for us to say what exactly prompted Microsoft to integrate the second subsystem into Windows 10, however, as in other cases, the company approached this very thoroughly, not relying on any approaches of pseudo-emulation or virtual machines. All of the above subsystems were developed exclusively as native and had similar powers with Win32 in the implementation of the functions of their own subsystems.

And so, in fact. The announcement of the new subsystem took place at the well-known Microsoft conference called Build 2016, where the company's software innovations are announced. It was stated that in the future version of Windows 10, users will be able to use the services of the Linux command interpreter, known as bash, which in turn immediately indicates the presence of an ELF file loader in Windows, as well as environments (subsystems) for their execution and standard tools like ssh, grep, sed, and awk. Ubuntu Linux was chosen as the reference.


Fig. Slide presentation "Linux on Windows". The slide indicates that this is a full-fledged Linux subsystem, and not pseudo-emulation or virtual machines. Yes, Linux is becoming part of Windows 10, and in the same way as POSIX and OS / 2 will work in user mode with the implementation of the semantics of system calls at the kernel level.


Fig. Actually, the architecture or all that we said above, plus special support for the semantics of Linux system calls at the kernel level, for which the two drivers are specified, which are mentioned at the very beginning.


Fig. Since Linux is becoming a full-fledged subsystem and part of Windows, its command interpreter can be called through the Windows Shell or the command interpreter, as shown on the slide.


Fig. 3. Demonstration of the work of a well-known UNIX-command ls for listing the contents of a directory


Fig. 4. The readelf utility for analyzing the ELF file header in action.


Fig. 5. Compiler for gcc executables.


Fig. There is work to do. :)

Full video demonstration of the Linux subsystem on Windows can be viewed here .

Source: https://habr.com/ru/post/280584/


All Articles