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!
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 :)
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.
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!
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");
@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
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.
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.
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!
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!
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.
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 :)
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
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)
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)
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
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
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
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!
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.
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.
@@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.
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).
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!
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!!
Amazing content guys ❤❤❤
nothing beats coffee and neetcode on a Saturday morning
or Saturday night
Way better than sex. either way though, I dump my core
or Sunday morning
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 :)
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.
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!
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));
}
17:50 This part is very interesting.
@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
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.
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.
I really like this format! and learning how things work
I would love to see videos like this from you. Keep em coming please!
This is quite literally perfect as I am studying OS systems rn
I love you both guys❤❤
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!
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!
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.
could you make more reaction videos to core dumped? It’s really helpful for learning I feel like.
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 :)
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
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)
9:07 it can vary in contents not size haha
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)
This was a cool video. And now I also discovered a new awesome channel. Thank you Mr. NeetCodeIO
Guys, thank you, you made my day.🤩
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
Are you solving OverTheWire?
Doesn’t data within the executable file maybe mean stuff like what object files the executable has to be linked to?
A program is a set of instructions given to a computer to execute
A process : Is simply a running program.
So can we think of program as a class (blueprint) and process as an instance of it?
core dumped is a pure gold if you are interested in low level.
need more videos like this
do you ever plan on doing like an OS course? ngl if you did I think I would buy premium lol
I like the pun at 10:25 a video about processes is already scheduled
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
ELF stand for executable and linkable format . Which is the final product of compilation it carries some metadata and a lot of staff
5:20 Data section of a program is immutable during run time as far as I know
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
Keep the change mate
great video
4:12 In case he doesnt respond data contains stuff like char literals
The script is the same as the source code?
Lovin this style of Neetcode. Just gotta pump up the commentary length to match Primeagen.
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!?
please god no
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!
How can you know for certain when AI tools answer your questions? Especially Gemini, that thing is so bad.
I like when you get to technical, please don't shut up!
And he does all that in PowerShell
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.
Once you learn what the actual distinction is, the people who nitpick on this start seeming like genuine dummies.
I dumped my core to this
Make a course on system design
Why do people need course for everything
@@HarshShah465 To learn everything that need to be learned and unfamiliar to us
Have you ever wondered how do they acquire knowledge and make course?
Why can't you learn by yourself without course?
@@HarshShah465 Legends told , don't reinvent the wheel. If somebody has that knowledge acquire from them
4:40 - i'm surprised you're using GPT. I thought it lies with confidence so I completely discounted it for any serious use.
This was not a serious use.
8:46 recursion is actually not good.
lol. is this satire?
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.
@@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.
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).