3 ms·
WSL version 2 uses the Hyper-V Virtualization API but is not a VM. The first version of WSL is just another process in task manager, with all the syscalls and
by SteveNuts 7y ago
WSL version 2 uses the Hyper-V Virtualization API but is not a VM.
The first version of WSL is just another process in task manager, with all the syscalls and filesystems emulated.
- chrismorgan 7y agoWell, each WSL1 process is a Windows process. If you’re running vim in bash, for example, you’ll see “vim” and “bash” as separate processes in Task Manager. WSL is all about ELF binaries natively, just as Win32 runs PE executables natively.
- kevingadd 7y ago"windows process" is misleading, WSL uses a separate "linux subsystem" with its own syscalls, process/thread data structures, etc. It also uses its own file system (albeit with all the state stored in NTFS and affected by filter drivers, which is why its I/O is slow)
- chrismorgan 7y agoThey are Windows processes, just as the Win32 subsystem also spawns Windows processes.
- dblohm7 7y agoProbably best to refer to them as NT processes for the sake of clarity.
- chrismorgan 7y agoTrue, I thought that a few hours after I wrote my last comment but couldn’t update it by that point and didn’t respond to it. Windows NT is the kernel, Win32 is the Windows subsystem that everyone’s used to (including kernel32.dll), WSL is a subsystem that runs ELF binaries and implements the Linux syscalls. It’s not yet obvious to me how much WSL2 is actually even a Windows subsystem, given that it’s running it as an actually separate OS.