Archive for November, 2011

Shared memory and Semaphores are types of IPC. IPC stands for Inter Process Communication. There are couple more IPCs, namely Pipes & Message Queue. I am not going to go deep into the details of these IPCs because its not in the context here. Lets directly go to the commands under discussion:

ipcs: To display the shared memory and semaphores.

Example: ipcs command with -a option lists all the IPC facilities which can be read by the current process. It provides details about message queue, semaphore and shared memory.

# ipcs -a

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0xc616cc44 1056800768 oracle    660        4096       0
0x0103f577 323158020  root      664        966        1
0x0000270f 325713925  root      666        1          2

------ Semaphore Arrays --------
key        semid      owner      perms      nsems
0x0103eefd 0          root      664        1
0x0103eefe 32769      root      664        1
0x4b0d4514 1094844418 oracle    660        204

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages
0x000005a4 32768      root       644        0            0

Command to list all Message Queues, -q.

$ ipcs -q

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages
0x000005a4 32768      root       644        0            0


There are seven disciplines you must develop if you want to achieve all that is possible for you. You can learn these disciplines through practice and repetition until they become automatic.

1. Goal Setting
Every morning, take three to five minutes to write out your top goals in the present tense. Get a spiral notebook for this purpose. By writing out your ten goals at the beginning of each day, you will program them deep into your subconscious mind.

This daily goal writing will activate your mental powers. It will stimulate your mind and make you more alert. Throughout the day, you will see opportunities and possibilities to move more rapidly toward your goals.

2. Planning and Organizing
Take a few minutes, preferably the night before, to plan out every activity of the coming day. Always work from a list. Always think on paper. This is one of the most powerful and important disciplines of all for high performance.

3. Priority Setting
The essence of all time management, personal management, and life management is contained in your ability to set the proper priorities on the use of your time. This is essential for high performance.

4. Concentration on your Highest-Value Activities
Your ability to work single-mindedly on your most important task will contribute as much to your success as any other discipline you can develop.

5. Exercise and Proper Nutrition
Your health is more important than anything else. By disciplining yourself to exercise regularly and to eat carefully, you will promote the highest possible levels of health and fitness throughout your life.

6. Learning and Growth
Your mind is like a muscle. If you don’t use it, you lose it. Continuous learning is the minimum requirement for success in any field.

7. Time for Important People in your Life
Relationships are everything. Be sure that in climbing the ladder of success, you do not find it leaning against the wrong building. Build time for your relationships into every day, no matter how busy you get.

Action Exercise
These seven disciplines will ensure that you perform at the highest level and get the greatest satisfaction and results from everything you do. Study these seven disciplines and then make a plan for how you can incorporate each of them into your daily life.

Note: If you feel that some more disciplines can be added to this list, then please free to discuss here.