If you want to know how many kernel system calls Rust makes, then this video is for you. Dive into the world of Rust programming and Linux system calls to expand your knowledge! #rustlang #linux
very interesting, thanks for doing rust! I wouldn’t have guessed what it was doing extra. now you are making me wonder what if we wrote the code without using the stdio library (which is just a wrapper to system calls) and did the system calls directly..
Dang I wrote an ASM program that war only slightly more complex than this and it used 3 syscalls (fstat, mmap, print). EDIT: I recounted and it's 5, although 2 of them wouldn't have been needed for this (exit and close).
Dumb to think it’s ok to do a lot of stuff when it can be done with less. The good question was risen in the original video, isn’t it a good time to take a step back, sit and rethink the approaches. Combining calls? Adding some one-means-a-bunch calls to the api? Other ideas? I’m not a kernel developer and know nothing about that but those questions seem reasonable.
signals don't need threads in c you should try to add libpthread to your empty c bin and still compare the calls also the original video by Hussein makes no sense imo most of these system calls are only called once and the cost will be amortized over thte long run for something like a webserver a better approach would be to open and read form a file 10000 times tom compare the calls or onlt strace after the initial startup but it's harder to do
frankly loading pthreads for no reason is a fail. modern c is pretty trash too, and elf binaries do no service to this problem. this program should be 3 words or less.
As a new grad (working for non system-related program), I have been always wondering how I can always get interested in these types of topics and get more understanding about these topics. How did you learn and improve through your life? I think this is more what I need to become better engineer or programmer to understand what it is exactly happen. Can you give me some advice?
To add on, I think recent university has more focus on ML not system so much... I think it is interesting, buuuut, if I understand that correctly. If you really make "new" model to change the world, we should make new equations or algorithms. That part is not fascinating to me to be honest because of the pressure I will get. That is like music or art area in my opinion. I love logics more than probability... So I think I didn't build good start point from university...
Hey Kimsdo!! you are making deep questions that require careful and comprehensive responses!! feel free to reach out through discord if you want to talk about this, but here's the simplest answer To the first part of your question "How did you learn and improve to your life?" I always focused on becoming good on the things that: 1. Paid well 2. Nobody wanted to do. This started when iOS came out, all the trolls said that iOS was a toy and that real software only existed on the blackberry... so I focused on iOS. The strategy worked and I was able to get a job at GM because I was among the best iOS developers. Then autonomous vehicles (AVs) came around, nobody wanted to learn because they said that AVs were only hype, and that people will always drive... so I learned about AVs. I was assigned to Cruise Automation a company in California which is among the most advanced companies in the world. Fast forward to 2020, I recognized the value of social media, so I learned. It took me longer to pick it up, but here we are. It took me longer than I wanted to monetize and learn the trade, but now I am increasing my income every month through RU-vid and hopefully helping developers all over the world. Regarding your second question, " If you really make "new" model to change the world, we should make new equations or algorithms." before trying to make new equations, get your ML basics right, understand perceptrons, simple regression, gradient decent, then neural networks. You wont be able to innovate in the field of ML until you understand the basics. lastly, " I love logics more than probability... So I think I didn't build good start point from university..." after you learn ML properly, you'll understand that the world is NOT deterministic, it is probabilistic, and that will help you to think about new models. I sincerely hope that this helped, feel free to reach out on discord to chat some more.
@@dario.lencina I thought the kernel was aware of the memory used by a process, so as soon of the process die, the memory can be retrieve (that why you don't want zombie). But I'm not an expert
@@julesoscar8921 I think we are both right, unwinding panics does return the memory to the OS, and also, the OS keeps track of all the memory allocation so it can reclaim all that memory back regardless if you free it or not
What you said doesnt make sense at all. Rusts memory safety happens in compile time not runtime. And tell me which system call improves safety? You just said bunch of nonsense. And additionally you didn't remove the includes in c code.