5G FAQ


How fast is 5G?
At least 10 times faster than 4G, about 2Gbps.
Why is 5G so fast?
High frequency, over 30GHz, higher than 5GHz 802.11ac wifi, therefore more channels
Why is 5G hard to build?
Requires 100 times more base stations than 4G
4G tower covers 2km, while 5G tower cover 200 meters.
Other benefit of 5G:
smaller antenna, shorter than 1 cm,
Antenna size is proportional to wave length, and 5G is mm wave.

Advertisements

WSL1 API


Unlike WSL2, WSL1 does syscall emulation.
lxss.sys forwards to NT kernel when possible, e.g. getdents, or implements in place otherwise, e.g. fork.
Both write and syscall run well on WSL1 on binary level:

		const char * sLibc = "This message is printed by libc write()\n";
		const char * sKernel = "This message is printed by syscall\n";
		write(1, sLibc, strlen(sLibc));
		syscall(SYS_write, 1, sKernel, strlen(sKernel));

 

WSL1 shell


Windows Subsystem for Linux, beta came out in 2016
Why I like it:
Run most native Linux ELF binaries. Cygwin cannot.
Replace cmd with bash: .bat is too weak to do anything.

Comparing to virtual machine such as VirtualBox:
WSL access and run all Windows files directly, while VirtualBox doesn’t
To launch WSL:
C:\Windows\System32\bash.exe
or c:\Windows\System32\wsl.exe
To run a tiny demo executable file dbg/elf, which is compiled on AWS Ubuntu ec2:
From WSL:
cd /mnt/s/rio/proj/Console/linux
$dbg/elf
or from Cmd:
C:\Windows\System32\bash.exe -c /mnt/s/rio/proj/Console/linux/dbg/elf
or C:\Windows\System32\wsl.exe /mnt/s/rio/proj/Console/linux/dbg/elf
scr1

Directory permission x vs r


Summary:
A directory, e.g. ThisDir, stores only a map of names and inode numbers
The read permission, r, list the names in the directory, like ls ThisDir.
which returns the names, and names only, e.g SubDir1, File1
It cannot tell the owner of the names, since that needs to access the inode
The execute permission, x, gives access to the inodes if names are given.
e.g. ls -l SubDir1; cat File1

Details: currently in a folder, which has two test folders
ls -l
drwx-wxr-x 2 root rio 4096 May 27 15:03 nor/ #no read permission
drwxrw-rwx 3 root rio 4096 May 27 15:12 nox/ #no execution permission
While no execution permission, but with read permission:
cd nox #Permission denied
ls -l nox #only shows content names, no attrbutes.
-????????? ? ? ? ? ? rio.sh
-????????? ? ? ? ? ? root.txt
d????????? ? ? ? ? ? sub   but why it knows this is a folder as seen in d, the first letter?
ls nox/* #not allowed. not even showing file name
touch nox/a #cannot create file.
cat nox/rio.sh #cannot read content.
While no read permission, but with execution permission:
ls nor #not allowed, showing no names.
cd nor #good
ls #not allowed.
cat rio.sh #good, reading successful
./rio.sh #good, running successful
cd sub #good

Reference: http://teaching.idallen.com/cst8207/13w/notes/450_file_system.html