Suchit K

21 posts

Suchit K

Suchit K

@Suchit_71

There are 10 types of people: those who understand binary and those who don't

Katılım Mart 2023
484 Takip Edilen52 Takipçiler
Suchit K retweetledi
Fermat's Library
Fermat's Library@fermatslibrary·
First formulated by Guy Robin in 1984, Robin’s criterion connects one of the most famous unsolved problems in mathematics - the Riemann Hypothesis - to a simple inequality involving divisor functions and the Euler–Mascheroni constant. It offers a concrete way to test the conjecture: If someone finds even one integer n>5040 that violates Robin’s inequality, the Riemann Hypothesis is false.
Fermat's Library tweet media
English
21
91
665
61.9K
Suchit K
Suchit K@Suchit_71·
Checkout my blog on netkit, A BPF programmable network device introduced in Linux kernel version 6.7. @suchitk/note/p-158307368?utm_source=notes-share-action&r=4cebjx" target="_blank" rel="nofollow noopener">substack.com/@suchitk/note/…
English
0
0
1
70
Suchit K
Suchit K@Suchit_71·
net.in.tum.de/fileadmin/TUM/… This paper is a great introduction to the Linux kernel networking stack, covering both the ingress and egress paths of a packet
English
0
0
4
172
Suchit K
Suchit K@Suchit_71·
Consider this program, int func(int SIZE, int n) { for (int i = 0; i < n; i++) { char *arr = alloca(SIZE); } return 0; } This function can cause a stackoverflow since memory of size 'SIZE' is allocated on the stack on every iteration.
English
0
0
0
75
Suchit K
Suchit K@Suchit_71·
But it's a not a good practice to use it since the stack memory is limited and the allocated memory gets freed only when the function that called alloca() returns to its caller. Also it's not recommended to use free() on the space allocated by alloca().
English
1
0
0
86
Suchit K
Suchit K@Suchit_71·
Do you know it's actually possible to allocate memory dynamically on the stack using alloca() function? Using alloca() is faster than malloc() and free(). The space allocated by alloca() is not automatically deallocated if the pointer that refers to it simply goes out of scope.
English
1
0
0
106
Suchit K retweetledi
Some theorems
Some theorems@CihanPostsThms·
A Diophantine characterization of the factorial that goes through the alphabet:
Some theorems tweet media
English
9
71
447
0
hnp
hnp@HarshaN18987860·
@Suchit_71 But reboot isn't just loading a new kernel. Isn't it
English
1
0
0
12
Suchit K
Suchit K@Suchit_71·
In a standard reboot, the system sends a request to the hardware to reset, which initiates a series of time-consuming steps. First, the firmware loads, followed by the bootloader, which then initializes hardware components before finally loading the operating system.
English
2
0
9
462
Suchit K
Suchit K@Suchit_71·
@bluequbit The syscall is invoked by the kexec command-line tool which is part of the kexec-tools package.
English
0
0
1
22
shubham
shubham@bluequbit·
@Suchit_71 Who makes this kexec_load() system call?
English
1
0
0
19
Suchit K
Suchit K@Suchit_71·
Here’s an example of how to use kexec to perform a fast reboot with a new kernel: Load the new kernel: sudo kexec -l /boot/vmlinuz-<version> --initrd=/boot/initrd.img-<version> --command-line="$(cat /proc/cmdline)" Run the currently loaded kernel: sudo kexec -e
English
1
0
7
267
Suchit K
Suchit K@Suchit_71·
There are several reasons why kexec is useful, with one of the most common being its role as a crash kernel. The idea is to load a secondary kernel into reserved memory at startup. If the main kernel encounters a panic, the system can automatically switch to this crash kernel.
English
1
0
4
252