Linux Internals - SysCalls

Поделиться
HTML-код
  • Опубликовано: 7 июн 2024
  • In this episode of the CyberGizmo we explore SysCalls and how they work in Linux. I will also discuss the differences between monolithic, microkernels and nano kernels in this video.
    The Linux Kernel Archives Documentation: www.kernel.org/doc/html/latest/
    Oh and one more thing, each line in the strace is a linux command or call, you can use man pages to lookup what each of those do.
    Support me on Patreon: / djware
    Follow me:
    Twitter @djware55
    Facebook: / don.ware.7758
    Discord: / discord
    Music Used in this video
    "NonStop" Kevin MacLeod (incompetech.com)
    Licensed under Creative Commons: By Attribution 3.0 License
  • НаукаНаука

Комментарии • 38

  • @emvdl
    @emvdl 3 года назад +4

    Thank you, great to watch, not boring at all! Really like these in depth and history videos 👍👍👍

    • @CyberGizmo
      @CyberGizmo  3 года назад +1

      Thank you Ernst glad you enjoyed it

  • @EugeneRoif
    @EugeneRoif Год назад

    Wow, I looked forever for content like this. Please keep it going

  • @diegonayalazo
    @diegonayalazo 2 года назад

    Thanks DJ. Love this series.

  • @sweetshit4931
    @sweetshit4931 9 месяцев назад

    The best video for learning syscalls.

  • @emcpadden
    @emcpadden 2 года назад

    Great Video, I'm learning a lot from these! thank you!

  • @shrutibakshi5859
    @shrutibakshi5859 2 года назад

    loved it, thank you so much for such useful content

  • @AlianeAbdelouahab
    @AlianeAbdelouahab 2 года назад

    12:05 this is just the best explaination i got for the syscalls ! one image that get it all !

  • @kellyjohna
    @kellyjohna 3 года назад

    I remember the first time my older brother showed me Linux. I had just finished my mcse in Windows NT 4.0. I would also see guys with it under the bridge just East of Downtown Dallas where we would go to get the latest "deals" on hardware. I told my brother "this is junk, who wants to type and memorize all these commands" ! 25 years later I'm watching DJ Ware on youtube. Spent hours and went through tons of commands trying to burn a DVD on Centos 7 server yesterday (the only machine in the house with a cd rom) only to find out in the end it wasn't a burner after all. But I haven't gotten tired of learning yet...that's why I'm watching DJ's videos. Keep up the good work.

    • @CyberGizmo
      @CyberGizmo  3 года назад

      Kelly thanks for story I enjoyed it, and thank you also for the kind comments, if you have a usb port on one of your machines a usb stick will work in place of a cdrom as well. I use Etcher to create the usb image from an iso download.

    • @kellyjohna
      @kellyjohna 3 года назад

      @@CyberGizmo Thanks for the tip. Maybe I was writing the install files to the usb, but my last experience using a usb it was really slow. But I guess reading off of it shouldn't be a problem. But then again all the time I spent trying to burn one.... I'm gonna go with the usb method.

  • @Demodude123
    @Demodude123 3 года назад +5

    Great video! I was confused why hostname would call uname in the background, but since this is strace, it's calling the uname(2) system call, not uname(1) in userspace. So both uname(1) and hostname(1) make a call to uname(2). They are likely similarly efficient, pulling more/less data out of the utsname struct.

    • @CyberGizmo
      @CyberGizmo  3 года назад

      Thanks Demodude, you are close, but hostname always uses gethostname call not the uname(2) call, that goes all the way back into UNIX.

    • @DasSkelett
      @DasSkelett 2 года назад

      @@CyberGizmo but doesn't the strace output show that it does indeed call uname, not gethostname?

  • @user-kn4zr8if8k
    @user-kn4zr8if8k Год назад

    hi, mode bit means, we are in the kernel mode. when the sys_call is executed - the mode_bit is set to 0, when it returns to user mode, the mode_bit is set to 1

  • @sleepyeyesvince
    @sleepyeyesvince 3 года назад +4

    Love how you (un-)intentionally numbered this series in a geeky way. As long as you number the next video "10" we'll be sweet ;)
    Were you a teacher in a former life DJ? I've certainly felt educated! Thank you. Let me see if I've got this right - so a syscall is like when I'm happily concentrating on a DJ Ware video and one of the kids demands my attention to do something for her? :D

    • @CyberGizmo
      @CyberGizmo  3 года назад +3

      Thanks For the idea will for sure have to move to a binary scheme so the next one will be 0000 0010
      Yeah I taught some college level courses while working on my masters, and taught a few internals classes for Burroughs and AT&T. oh yeah that is exactly what a syscall is, or maybe its a high priority interrupt :)

  • @user-mr3mf8lo7y
    @user-mr3mf8lo7y Год назад

    Much appreciated.

  • @guilherme5094
    @guilherme5094 3 года назад +1

    Thanks again!

  • @subee128
    @subee128 3 месяца назад

    Thank you very much

  • @Fendisaoming
    @Fendisaoming 3 года назад

    Thanks for this video. Im definitely barely following but learned the hostname command. I was asked once in an interview what command would tell you the computer name.

    • @CyberGizmo
      @CyberGizmo  3 года назад

      Well that's one question down :). Thanks Fendisaoming

  • @UpcycleElectronics
    @UpcycleElectronics 3 года назад

    I saved this in my watch later list after seeing it in my subscription feed earlier, and I'm glad I did.
    First of all, I didn't understand the monolithic versus microkernel at all until this upload.
    I have also had "trap" on my short list of commands to figure out. "Software interrupt" should be at the top of simplified explanations, thanks.
    Do you have any tricks for strace that might help me better simplify it's output? I have tried to use strace to determine what commands are being run and directories accessed.
    For instance, I tried (unsuccessfully) to use strace in Fedora Silverblue. (I installed strace with rpm-ostree.) I was trying to figure out the podman commands I needed to use in order to replicate how the toolbox script mounts and runs the containers it creates. Perhaps there is a better tool?
    As far as this upload and the kernel, this type of breakdown, done in steps, is what I think I need. I have a couple of the O'Reilly kernel books, but my knowledge could be summed up as, a couple of Stage 1 Gentoo installs, with a custom kernel, following their guide.
    I was looking into designing a peripheral board for a laptop using one of the USB 3.0 chips listed in the kernel build options. The goal was to get it working natively across the south bridge just like the factory peripheral port controller, but I got overwhelmed and shelved the project for now.
    I was targeting an old spare Leno x200t with libreboot. It is just a curiosity, and a way to explore hardware interests. I'm not some misguided plebeian trying to be cheap.
    Anyways, I share this info with absolutely no expectations. This is just my trajectory and the foundation of my interests in the subject.
    Thanks for the upload.
    -Jake

    • @CyberGizmo
      @CyberGizmo  3 года назад +1

      Don''t hear the term trap much anymore, but on older mainframe computers a trap was a real thing which would light the error LEDs on the front panels and stop the machine (not crash) just stop it, you could take readings on the registers and then press th continue button and it would trundle on.

    • @UpcycleElectronics
      @UpcycleElectronics 3 года назад

      @@CyberGizmo
      sorry for my ramblings. I need to get out more.
      I noted the trap command in a few bash guide references.

  • @ashishratnawat2711
    @ashishratnawat2711 Месяц назад

    Thank you for the lectures again!
    A question :
    So lets say Linux has X number of syscalls, so for every io or related operation a programming langage(python for example) would have to use one of these X to talk to the device or device driver for the said io operation. Right ?

  • @andarvidavohits4962
    @andarvidavohits4962 3 года назад

    Great content. If I were a thankless bastard, I'd say you should try to speak in less of a monotone but the truth of the matter is that I'm very excited and thankful to have such quality content served up free of charge.

  • @avinashavi5990
    @avinashavi5990 3 года назад

    Excellent work for cleaner explanayion,
    I have question what tools we use for debugging linux internals? for better understanding .

    • @CyberGizmo
      @CyberGizmo  3 года назад

      Avimash an interesting question, do you mean for writing applications or working on the kernel itself?

    • @avinashavi5990
      @avinashavi5990 3 года назад

      @@CyberGizmo working on kernel

  • @hexearth8258
    @hexearth8258 3 года назад

    This is the CyberGizmo, there is no fall asleep or stay bored with the content... it's exactly what we want. I really hope the Linux Internals series goes deep as debugging a program and understanding what is going on, as with malware on Windows, to see what it does and affects. And also look at some tools, that could be great to debug or gather information on what's going on in the system. Microsoft is developing Procmon for Linux just like the Windows version. Can we get that information with other Linux tools? Like every read or write done in the system?

    • @CyberGizmo
      @CyberGizmo  3 года назад

      Thank you Hex Earth appreciate it, yeah good thing ProcMon doesn't work lol yet :). Oh right its Microsoft code

    • @hexearth8258
      @hexearth8258 3 года назад

      @@CyberGizmo while (1) { lol(); }

  • @user-hd3pz2ow1b
    @user-hd3pz2ow1b 2 месяца назад

    thanks

  • @rashie
    @rashie Год назад

    👍👍