Program vs Process (low level concepts)

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 พ.ย. 2024

ความคิดเห็น • 70

  • @CoreDumpped
    @CoreDumpped หลายเดือนก่อน +77

    I just noticed that you've already posted this. While I wasn't sure which of my videos you were going to react to, I knew you were going to add value to it and now that I see it, you definitely did. Thanks for the support!

    • @NeetCodeIO
      @NeetCodeIO  หลายเดือนก่อน +18

      Thanks for the fantastic videos!! So glad you started a TH-cam channel, there's no one out there who makes videos quite like yours!!

    • @babyfox205
      @babyfox205 หลายเดือนก่อน

      Amazing content guys ❤❤❤

  • @priceton_braswell
    @priceton_braswell หลายเดือนก่อน +63

    nothing beats coffee and neetcode on a Saturday morning

    • @snowman4933
      @snowman4933 หลายเดือนก่อน +1

      or Saturday night

    • @ZackWhitbord
      @ZackWhitbord หลายเดือนก่อน

      Way better than sex. either way though, I dump my core

    • @hrshlgunjal-1627
      @hrshlgunjal-1627 หลายเดือนก่อน +1

      or Sunday morning

  • @DavidDiaz-fu5hb
    @DavidDiaz-fu5hb หลายเดือนก่อน +11

    Yes, it was actually a fun video. It does involve a bit of abstraction because we’re overlooking many things, like pagination or virtual memory related to how the operating system manages memory and how all of this is translated to physical addresses by the MMU. I know the video’s intention was just to explain the difference between a process and a program, but the creator also tried to touch on memory, so I believe it’s important to clarify those concepts for a deeper understanding :)

  • @cemreomerayna463
    @cemreomerayna463 หลายเดือนก่อน +7

    Hey! To clarify the confusion at around 2:00, concurrency has been around in the systems programming for a long time. UNIX itself, along with its predecessor MULTICS, had time-sharing in its earliest forms. However, when the first personal computers came into the market in the late 70's they did not use operating systems that supported parallelization due to hardware limitations.

  • @henrithomas8333
    @henrithomas8333 หลายเดือนก่อน +1

    I was unclear on the Python interpreter as well. Recently though I’ve come to loosely understand it like he explains:
    The interpreter has a virtual machine and a compiler. When running a py script, the source code is compiled to bytecode then that bytecode is put into memory. The Python virtual machine then runs that bytecode.
    Great video!

  • @adambickford8720
    @adambickford8720 หลายเดือนก่อน +8

    As usual, java is very clever :)
    You do get 1 jvm process per java application, but multiple instances of the jvm can share common parts. Google 'java class data sharing'.
    In java Strings are 'interned' so string literals are indeed shared in a pool.
    public static void main(String[] args) {
    var interned = "foo";
    var forcedNew = new String("foo");

    System.out.println(interned == forcedNew);
    System.out.println(interned.equals(forcedNew));

    var manuallyInterned = forcedNew.intern();
    System.out.println(interned == manuallyInterned);
    System.out.println(interned.equals(manuallyInterned));
    }

  • @lakshmanshankar
    @lakshmanshankar หลายเดือนก่อน +1

    17:50 This part is very interesting.

  • @SoledadDelSol
    @SoledadDelSol หลายเดือนก่อน

    @NeetcodeIO ~5:14 , Rust compiler does the same thing! Saves hard coded strings into the binary (via the Rust book). I learned a bunch from that book that I'm sure reflects alot of base concepts with compiling code in C. Would recommend giving it a read

  • @GalaxyHomeA9
    @GalaxyHomeA9 หลายเดือนก่อน

    I would you love if you make videos on branch education.
    This channel is amazing specially the videos of how ram, hard disk works at low level which gives a true insight of what's going on inside the computer.

  • @robchr
    @robchr หลายเดือนก่อน

    Java byte code will be interpreted and then just in time (JIT) compiled when run on the Java virtual machine (JVM). Also you can compile Java byte code directly into assembly, skipping interpretation, using Graal native image.

  • @hamoodhabibi7026
    @hamoodhabibi7026 หลายเดือนก่อน

    I really like this format! and learning how things work

  • @kaankahveci1153
    @kaankahveci1153 หลายเดือนก่อน

    I would love to see videos like this from you. Keep em coming please!

  • @basil9633
    @basil9633 หลายเดือนก่อน

    This is quite literally perfect as I am studying OS systems rn

  • @Matem-sc1ic
    @Matem-sc1ic หลายเดือนก่อน +5

    I love you both guys❤❤

  • @licokr
    @licokr หลายเดือนก่อน

    When I learned programming, it taught me java is a compiled language but now thinking of it, java code is compiled and it turns into byte code and JVM which interpret java code is used to interpret the byte code. So that makes sense. I really should stop trying to divide which one should be in a side. I liked to hear your opinions for the video, thanks!

  • @monkeygame7
    @monkeygame7 หลายเดือนก่อน

    You actually don't have to worry about stack overflow in your recursive functions if you can make them tail recursive (and your language supports that optimization [rip python]). Such a cool technique I learned about recently!

  • @vbachris
    @vbachris หลายเดือนก่อน

    3:49 machine code contains binary instructions AND static binary data that belongs to the program. imagine older computer games. there were instructions to execute for the game to make sense AND there was information stored regarding sprites or pixel images.

  • @smonster
    @smonster หลายเดือนก่อน

    could you make more reaction videos to core dumped? It’s really helpful for learning I feel like.

  • @shakkar23
    @shakkar23 หลายเดือนก่อน +1

    4:53 think lookup tables, in low level programming languages it's compiled into the .ro_data section of the executable (assuming x86), and there are equivalent sections for other architectures :)

    • @shakkar23
      @shakkar23 หลายเดือนก่อน

      5:25 if you went down here it wouldn't be operating system information but rather the distinction of read only strings versus dynamic modifiable strings in C

    • @shakkar23
      @shakkar23 หลายเดือนก่อน

      7:43 fun fact in the data section some doesn't changes, like you wouldnt want the LUT to change or global constants, but the parts that do are where globals live, or at least the static parts of the globals like an int, but an int* would still need to allocate for where it's pointing to (unless it's pointing to another global lol)

    • @shakkar23
      @shakkar23 หลายเดือนก่อน

      9:07 it can vary in contents not size haha

    • @shakkar23
      @shakkar23 หลายเดือนก่อน

      11:23 this would be fine, since it would hopefully be in the data which can be whatever size it needs (but I hope youd never exceed your predetermined size limit)

  • @siddhantkamble9502
    @siddhantkamble9502 หลายเดือนก่อน

    This was a cool video. And now I also discovered a new awesome channel. Thank you Mr. NeetCodeIO

  • @DanielKonyvka
    @DanielKonyvka หลายเดือนก่อน

    Guys, thank you, you made my day.🤩

  • @zacki5663
    @zacki5663 หลายเดือนก่อน

    this is all day-1 learnings for anyone who does reverse engineering or builds compilers, desktop applications, embedded software etc. where this is a gap is for people doing mostly services and cloud stuff

  • @jmbrjmbr2397
    @jmbrjmbr2397 หลายเดือนก่อน

    Are you solving OverTheWire?

  • @BachenBenno99
    @BachenBenno99 หลายเดือนก่อน

    Doesn’t data within the executable file maybe mean stuff like what object files the executable has to be linked to?

  • @jenex5608
    @jenex5608 หลายเดือนก่อน

    A program is a set of instructions given to a computer to execute
    A process : Is simply a running program.

  • @sri_harsha_dv
    @sri_harsha_dv หลายเดือนก่อน

    So can we think of program as a class (blueprint) and process as an instance of it?

  • @paca3107
    @paca3107 หลายเดือนก่อน

    core dumped is a pure gold if you are interested in low level.

  • @sahilverma_dev
    @sahilverma_dev หลายเดือนก่อน

    need more videos like this

  • @BilalShaikh-tn9wu
    @BilalShaikh-tn9wu หลายเดือนก่อน

    do you ever plan on doing like an OS course? ngl if you did I think I would buy premium lol

  • @optimistcarrot4915
    @optimistcarrot4915 หลายเดือนก่อน

    I like the pun at 10:25 a video about processes is already scheduled

  • @yonatanbeyn8557
    @yonatanbeyn8557 หลายเดือนก่อน

    Hi neetcode I guess you need to understand the difference between Harvard vs Neumann architecture , to fully understand the deference between data and cpu instruction. The executable is the ELF file which is specific format the Linux kernel understands and prepares to execute

    • @yonatanbeyn8557
      @yonatanbeyn8557 หลายเดือนก่อน

      ELF stand for executable and linkable format . Which is the final product of compilation it carries some metadata and a lot of staff

  • @optimistcarrot4915
    @optimistcarrot4915 หลายเดือนก่อน

    5:20 Data section of a program is immutable during run time as far as I know

  • @mykod9651
    @mykod9651 หลายเดือนก่อน +1

    would you consider going into Academia? just going by what you said , building is not your priority but learning how things work. I get that and I think Im the same way. You actually might be a good teacher and would care about what students learn. just my 2 cents

    • @idkbro7171
      @idkbro7171 หลายเดือนก่อน

      Keep the change mate

  • @omerali9412
    @omerali9412 หลายเดือนก่อน +1

    great video

  • @nikos4677
    @nikos4677 หลายเดือนก่อน

    4:12 In case he doesnt respond data contains stuff like char literals

  • @goedeck1
    @goedeck1 หลายเดือนก่อน

    The script is the same as the source code?

  • @moose-1
    @moose-1 หลายเดือนก่อน +4

    Lovin this style of Neetcode. Just gotta pump up the commentary length to match Primeagen.

    • @Tobsson
      @Tobsson หลายเดือนก่อน +3

      There isn't enough time in a day for another prime. I usually skip all his videos that's longer than 30 mins because who has time!?

    • @dashdoom8452
      @dashdoom8452 หลายเดือนก่อน

      please god no

  • @jonphelan707
    @jonphelan707 หลายเดือนก่อน

    There once was a Notion so fine,
    Whose data was stored in SQLite's design.
    It synced with great care, But a NULL pointer was there,
    Now my queries are causing a segfault in my mind!

  • @samarthjain5015
    @samarthjain5015 หลายเดือนก่อน

    How can you know for certain when AI tools answer your questions? Especially Gemini, that thing is so bad.

  • @henrikfredriksen4735
    @henrikfredriksen4735 25 วันที่ผ่านมา

    I like when you get to technical, please don't shut up!

  • @TreeLuvBurdpu
    @TreeLuvBurdpu หลายเดือนก่อน

    And he does all that in PowerShell

  • @asagiai4965
    @asagiai4965 หลายเดือนก่อน +1

    A very nice (I guess ) reaction video.
    I like Core Dumped. He can explain this low level concept clearly.
    Program vs Process -> In reference to what I'm working. Program is the whole instruction set.
    Process is the one working on those instruction.
    This is why I think you can't have multiple programs.
    But you can have multiple processes.

  • @nexovec
    @nexovec หลายเดือนก่อน

    Once you learn what the actual distinction is, the people who nitpick on this start seeming like genuine dummies.

  • @ZackWhitbord
    @ZackWhitbord หลายเดือนก่อน +1

    I dumped my core to this

  • @kingcoder31aug
    @kingcoder31aug หลายเดือนก่อน

    Make a course on system design

    • @HarshShah465
      @HarshShah465 หลายเดือนก่อน +1

      Why do people need course for everything

    • @kingcoder31aug
      @kingcoder31aug หลายเดือนก่อน

      @@HarshShah465 To learn everything that need to be learned and unfamiliar to us

    • @HarshShah465
      @HarshShah465 หลายเดือนก่อน

      Have you ever wondered how do they acquire knowledge and make course?

    • @HarshShah465
      @HarshShah465 หลายเดือนก่อน

      Why can't you learn by yourself without course?

    • @kingcoder31aug
      @kingcoder31aug หลายเดือนก่อน

      @@HarshShah465 Legends told , don't reinvent the wheel. If somebody has that knowledge acquire from them

  • @dima13693
    @dima13693 หลายเดือนก่อน +2

    4:40 - i'm surprised you're using GPT. I thought it lies with confidence so I completely discounted it for any serious use.

    • @HarshShah465
      @HarshShah465 หลายเดือนก่อน

      This was not a serious use.

  • @xalspaero
    @xalspaero หลายเดือนก่อน

    8:46 recursion is actually not good.
    lol. is this satire?

    • @XtenstialKrysis
      @XtenstialKrysis หลายเดือนก่อน

      No its not satire. recursion can quickly exhaust your memory and must be avoided as far as possible . You dont want the risk of stack overflowing when the problem could have been solved using other strategies.

    • @xalspaero
      @xalspaero หลายเดือนก่อน

      @@XtenstialKrysis for some things (trees for example) recursion is a far more elegant solution. if your stack space is extremely limited, all you need to do is guard against overflow same as a NULL pointer or whatever other hazard.

    • @randomrfkov
      @randomrfkov หลายเดือนก่อน

      Yes. It is not good for most functions.
      If you can write it functionally/procedurally, do it.
      If not, use recursion (function calling a function with current state variables as arguments).