• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux virtual memory management

Alex

Diamond Member
hi,
i have a quick research to do about the differences of Virtual Memory management in Linux compared to Windows... so far all I could find was the presence of the "OOM-Killer"...

is there anything else notable that i should know?

also i was wondering if there are any significant differences with how linux handles the following things:
[*]process priority
[*]program loading commands
[*]program termination commands

if anyone can break this down for me or point me in the right direction i'd be very grateful! 🙂

i googled all of the above but its all very technical and complex and i just wanted a kinda simple "dumbed-down" summary if possible... thanks! 🙂
 
It's not possible to dumb down an explanation of VM and still have the text be correct no matter which OS you're talking about.

Here's a doc describing the CFS scheduler that was recently merged: http://people.redhat.com/mingo...r/sched-design-CFS.txt

As for the other two, I have no idea what you mean by "program loading commands" or "program termination commands" with respect to the kernel.
 
sorry i was translating directly from portuguese...

i mean shell commands basically to run programs and terminate them... like in windows executable files have an .exe extension and you double-click them to run them...

how does it work in linux? command-prompt style i mean, like how do you know what file is an executable? and how do you run it?
also how do you stop a running program?

what exactly happens when you run and close programs in terms of memory allocation and process priority? is it similar to windows?

thanks! 🙂
 
Any file that's executable has the executable bit set, it's a property instead of a magic file extension. This also means that you can set the execute bit on a non-executable file and try to run it but that obvious won't work.

Both OSes remove all open files, virtual memory, etc when a process exits. There's no commands that are run when a program exits but both kernels clean up after the process.
 
Originally posted by: Nothinman
Any file that's executable has the executable bit set, it's a property instead of a magic file extension. This also means that you can set the execute bit on a non-executable file and try to run it but that obvious won't work.

Both OSes remove all open files, virtual memory, etc when a process exits. There's no commands that are run when a program exits but both kernels clean up after the process.

thanks Nothinman! 🙂 that really clears things up!

so how can you identify the executable bit set when doing an ls for example?
i assume the command to execute and terminate programs depends on what terminal you are using (bash, etc) right?
 
so how can you identify the executable bit set when doing an ls for example?

Most distros setup ls to colorize output by default these days so green files are executable, if your terminal isn't doing that then you need to run 'ls -l' and look at the permissions.

i assume the command to execute and terminate programs depends on what terminal you are using (bash, etc) right?

The builtin commands may be slightly different but external stuff like /usr/bin/kill is the same no matter what shell you're using.
 
Originally posted by: Nothinman
so how can you identify the executable bit set when doing an ls for example?

Most distros setup ls to colorize output by default these days so green files are executable, if your terminal isn't doing that then you need to run 'ls -l' and look at the permissions.

i assume the command to execute and terminate programs depends on what terminal you are using (bash, etc) right?

The builtin commands may be slightly different but external stuff like /usr/bin/kill is the same no matter what shell you're using.

cool if you don't mind me dragging this on just a little bit more (i'm a total linux n00b)...

i would run 'ls -l' to get a directory listing with permissions and what permission exactly would i be looking for in an executable file?
and then running it would depend on the terminal i'm using correct?
 
There's 3 of them listed as "rwx", take a guess which one is execute...

Running it should work the same in all shells, the only difference might be handling of the PATH variable but I think they're all consistent with that.
 
Originally posted by: Nothinman
There's 3 of them listed as "rwx", take a guess which one is execute...

Running it should work the same in all shells, the only difference might be handling of the PATH variable but I think they're all consistent with that.

hehehhehe thanks! 🙂

i'm starting to feel like a pro now! 😀

so if i could bother you for one more thing: in a nutshell how is multitasking handled in linux? more specifically, process permissions, is it kinda like windows where each process has a kinda first come first served cycle and memory allocation but can be influenced by altering the 'process priority' ?
 
Is there a reason you can't boot up a Linux LiveCD or a VM and poke around on your own? You probably could've figured out all of the permissions stuff on your own already.

in a nutshell how is multitasking handled in linux? more specifically, process permissions, is it kinda like windows where each process has a kinda first come first served cycle and memory allocation but can be influenced by altering the 'process priority' ?

Those would be process nice levels (i.e. priority) not permissions. Each process has it's own UID/GID which determins what resources it can access and that's handled separately from it's nice level.
 
Back
Top