LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-18-2011, 10:11 AM   #1
tolekutma
LQ Newbie
 
Registered: Sep 2010
Posts: 7

Rep: Reputation: 0
Memory analyze in Linux (Shared Memory)


Hi,

i am looking in on the memory handling of Linux,
Especial in case of memory that is shared between different processes (as it appear in /proc/<pid>/smaps).

How can I identify which processes are sharing a block of memory as it spear in smpas?

(solution that will require me to write scripts or other SW in C are more then welcome, no problem with that).

Thanks
 
Old 12-20-2011, 08:18 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

Quote:
Originally Posted by tolekutma View Post
Hi,

i am looking in on the memory handling of Linux,
Especial in case of memory that is shared between different processes (as it appear in /proc/<pid>/smaps).

How can I identify which processes are sharing a block of memory as it spear in smpas?

(solution that will require me to write scripts or other SW in C are more then welcome, no problem with that).

Thanks
Simplified Kernel diagram is in the form of a matrix map with click-able links.

Linux Kernel Interactive Map can be used to help understand the functionality for each subcategory intercommunication or control.

IBM has several good white papers to aid;
Quote:
Anatomy of the Linux kernel: 'The Linux® kernel is the core of a large and complex operating system, and while it's huge, it is well organized in terms of subsystems and layers. In this article, you explore the general structure of the Linux kernel and get to know its major subsystems and core interfaces. Where possible, you get links to other IBM articles to help you dig deeper'
By using any of the above referenced links you should be able to expand your understanding for 'memory'.

Plus do not forget 'top' for when you wish to see active tasks;
Quote:
excerpt from 'man top';
top - display Linux tasks

Synopsis
top -hv | -bcHisS -d delay -n iterations -p pid [, pid ...]
The traditional switches '-' and whitespace are optional.

Description
The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel. The types of system summary information shown and the types, order and size of information displayed for tasks are all user configurable and that configuration can be made persistent across restarts.
The program provides a limited interactive interface for process manipulation as well as a much more extensive interface for personal configuration -- encompassing every aspect of its operation. And while top is referred to throughout this document, you are free to name the program anything you wish. That new name, possibly an alias, will then be reflected on top's display and used when reading and writing a configuration file.
...
10. SEE ALSO
free(1), ps(1), uptime(1), atop(1), slabtop(1), vmstat(8), w(1).
Be sure to look at the 'Mem' option.

Quote:
excerpt from KernelBooks;
Understand The Linux Virtual Memory Manager, online This book is specifically dedicated to the virtual memory manager of the Linux kernel, and so goes into deep details about the internals of this important but complex subsystem of the kernel. It clearly is a must read for the ones interested in memory management.
The above links and others can be found at 'Slackware-Links'. More than just Slackware® links!
__________________
You can look at Linux Command Guide or Ultimate Linux Newbie Guide to assist with system work.

Regards and God speed,

Gary

The Magic is in the Magician not the wand! ©

Slackware®-Links | Slackware® Unofficial Announcement Repository | Slackware® Home
Slackware® Essentials | Slackware® Basics | How to Ask Questions the Smart Way
Linux Counter # 249288 Get counted!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to allocate dynamic memory to shared memory golden_boy615 Programming 7 04-25-2018 02:34 PM
Does /dev/shm reduce memory available for non-shared memory segments? mightyscotchpine Linux - Server 1 09-22-2009 06:58 PM
Linux shared memory segment access problem and x86 Virtual Memory layout. regmee Linux - Kernel 1 08-23-2008 12:11 AM
Difference between resident memory,shared memory and virtual memory in system monitor mathimca05 Linux - Newbie 1 11-11-2007 04:05 AM
is shared memory expandable in memory size? Thinking Programming 4 08-16-2005 09:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration