Monday, July 26, 2010
Saturday, July 24, 2010
- Multiple Processors
- multiple Memories
- Interconnection Network
- Achieve speed: Tp=Ts/p
- Solve problems requiring a large amount of memory
- SISD-Single Instruction Single data
- SIMD-Single Instruction Multiple data
- MIMD- Multiple Instruction Multiple data
- MISD- Multiple Instruction Single data
- Using a shared memory
- message passing
Friday, July 23, 2010
Thursday, July 22, 2010
copy this script to the photo folder and cd to the directory from console; then execute (remember to chmode -a+rx) by ./scriptname
for x in $(ls)
convert -size 500 $x new-$x
How to Compile and Install a new Linux kernel
Compiling custom kernel has its own advantages and disadvantages. However, new Linux user / admin find it difficult to compile Linux kernel. Compiling kernel needs to understand few things and then just type couple of commands. This step by step howto covers compiling Linux kernel version 2.6.xx under Debian GNU Linux. However, instructions remains the same for any other distribution except for apt-get command.
Step # 1 Get Latest Linux kernel code
Visit http://kernel.org/ and download the latest source code. File name would be linux-x.y.z.tar.bz2, where x.y.z is actual version number. For example file inux-2.6.25.tar.bz2 represents 2.6.25 kernel version. Use wget command to download kernel source code:
$ cd /tmp
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-x.y.z.tar.bz2
Note: Replace x.y.z with actual version number.
Step # 2 Extract tar (.tar.bz3) file
Type the following command:
# tar -xjvf linux-2.6.25.tar.bz2 -C /usr/src
# cd /usr/src
Step # 3 Configure kernel
Before you configure kernel make sure you have development tools (gcc compilers and related tools) are installed on your system. If gcc compiler and tools are not installed then use apt-get command under Debian Linux to install development tools.
# apt-get install gcc
Now you can start kernel configuration by typing any one of the command:
- $ make menuconfig - Text based color menus, radiolists & dialogs. This option also useful on remote server if you wanna compile kernel remotely.
- $ make xconfig - X windows (Qt) based configuration tool, works best under KDE desktop
- $ make gconfig - X windows (Gtk) based configuration tool, works best under Gnome Dekstop.
For example make menuconfig command launches following screen:
$ make menuconfig
You have to select different options as per your need. Each configuration option has HELP button associated with it so select help button to get help.
Step # 4 Compile kernel
Start compiling to create a compressed kernel image, enter:
Start compiling to kernel modules:
$ make modules
Install kernel modules (become a root user, use su command):
$ su -
# make modules_install
Step # 5 Install kernel
So far we have compiled kernel and installed kernel modules. It is time to install kernel itself.
# make install
It will install three files into /boot directory as well as modification to your kernel grub configuration file:
Step # 6: Create an initrd image
Type the following command at a shell prompt:
# cd /boot
# mkinitrd -o initrd.img-2.6.25 2.6.25
initrd images contains device driver which needed to load rest of the operating system later on. Not all computer requires initrd, but it is safe to create one.
Step # 7 Modify Grub configuration file - /boot/grub/menu.lst
Open file using vi:
# vi /boot/grub/menu.lst
title Debian GNU/Linux, kernel 2.6.25 Default root (hd0,0) kernel /boot/vmlinuz root=/dev/hdb1 ro initrd /boot/initrd.img-2.6.25 savedefault boot
Remember to setup correct root=/dev/hdXX device. Save and close the file. If you think editing and writing all lines by hand is too much for you, try out update-grub command to update the lines for each kernel in /boot/grub/menu.lst file. Just type the command:
Step # 8 : Reboot computer and boot into your new kernel
Just issue reboot command:
Wednesday, July 14, 2010
Oracle WebLogic Suite 11g brings together unmatched performance, scalability, efficiency, and manageability in a single, unified application server offering. It is the cornerstone Java EE platform in support of application grid computing. With Oracle Real Operations Insight and Oracle Real Operations Automation, Oracle WebLogic Suite 11g dramatically reduces cost associated with diagnostics, configuration, and deployment on production servers. The Suite integrates effortlessly with other Oracle products through Oracle GridLink for RAC, Oracle Enterprise Grid Messaging, and other connection technologies to form a foundation for your entire Oracle portfolio. Oracle WebLogic Suite 11g is optimized for modern IT systems to deliver more processing on fewer servers.
Tuesday, July 13, 2010
Monday, July 12, 2010
The permissions and ownership properties that are available for NTFS under Linux are not written into the individual files to be retained when the filesystem is unmounted or the computer is turned off. Permissions and ownership obtained under Linux are temporary artifices imposed via the mount command and maintained temporarily by the operating system. They are transient properties that last only until the NTFS partition is unmounted.
The fdisk command can list partitions, like so:
If it's mounted, you'll see it in the response to the console command df -Th which shows the usage and locations of all mounted partitions. Look for lines containing the Type fuseblk:
Filesystem Type Size Used Avail Use% Mounted on
/dev/sdb1 fuseblk 80G 27G 53G 34% /media/disk
You can also see your NTFS partitions in the GUI viewers. KDE users look in the "My Computer" link on the Desktop. Gnome users look in Gnome's Nautilus under the Computer --> Filesystem icon. Partitions are also viewable in Yast --> System --> Partitioner.
Any internal NTFS partitions that you create or add after installation of openSUSE will not be mounted for you and you'll have to mount them yourself as shown below.
These default mounts in openSUSE are controlled by entries in the filesystem table, a text file called fstab located at /etc/fstab. Here's an example of an entry from my fstab file for an NTFS partition on partition 1 of the first drive (all on one line):
Many users, if not most, prefer to have write access to the NTFS partitions. That simple adjustment is covered in the next paragraph.
That was the quick fix for giving write permissions to partitions mounted read-only by the openSUSE installation program. There are other options for mounting NTFS partitions and these are covered below.
Tip #1: in most cases we don't have to use the locale= option. I'm going to leave it out from now on.
Suppose that you want to mount a partition permanently in a folder you create for it (e.g. mount_point), located anywhere you like in your filesystem, say at /path_to/mount_point.
To mount your NTFS partition permanently, add your version of the following line into the file system table, fstab. [and leave the last line in the file as a blank line.] Recommended option for world-writeable mount:
Here's an alternate option for fstab: If you want the permissions to be linux-like, you can specify a particular owner for the mount folder and its contents with this sort of line in fstab:
Tip #2: The numerical form above appears all over the net, but I've found that names work just as well so I recommend using names for openSUSE versions 11.x because it's much simpler:
[Tip #3: If you want to find a user's UID & GID, run the terminal command: id chand]
Second you must know the details of your NTFS partition. Use the sudo /sbin/fdisk -learlier example we got this result revealing sdb1: command to look at your disks. In our
If you prefer the partition to belong to a particular user, e.g. chand with UID=1000 and GID=100, then use this version:
[Tip #3: If you want to find a user's UID & GID, run the terminal command: id chand]
OpenSUSE from version 11.1 inclusive:
The openSUSE devs arranged for external (USB) NTFS partitions to automount read-write with permissions drwxrwxrwx beginning version 11.1. Prior to that the automount was read-only. See the next paragraph for earlier releases.
OpenSUSE pre version 11.1: When you plug a USB NTFS drive into openSUSE it automounts read-only by design of the openSUSE developers. If you want it mounted read-write, you can either unmount it and then remount it using one of the CLI commands I've outlined above or you can change the system default way of automounting NTFS drives so they will always automount read-write. To do that you essentially put a link into the directory /sbin that redirects the automount process to the ntfs-3g driver. The following command will create the permanent adjustment:
Failed mounts -- The "force" option (obsolete from openSUSE 11.2 onwards): If the partition is unmounted in a disorderly fashion, e.g. power failure, unmounted improperly by a user, etc, then the so-called "dirty" bit remains set and a consistency check (e.g. by booting to Windows and running chkdsk) is needed before the drive can be mounted again. You can bypass this requirement by including the force option. Just add the word force into the comma-separated list of options in your mount instructions.
Commencing openSUSE 11.2 the force option was superceded in the ntfs-3g driver by the recover and norecover options. The default is the recover option, so you don't have to explicitly include it. The option causes an attempt to recover and repair a corrupted or inconsistent NTFS volume if possible. See the man pages.
Failed Mounts -- Resetting the "dirty" bit in windows: Sometimes you get a message like this one beginning "$LogFile indicates unclean shutdown. Mount is denied because NTFS is marked to be in use.......". These are symptomatic of disorderly processes previously interrupting a clean dismount or shutdown. If you have Windows (2000 or higher) installed or handy, boot the drive in that and allow Windows to right the situation either automatically by running a consistency check on booting or by running chkdsk /f yourself from the command prompt. Alternatively you can run chkdsk /p from the repair facility after you boot from the Windows install CD and run to the end where you select to repair the installed system.
The GUI application ntfs-config:
openSUSE comes with the RPM ntfs-config, although it's not installed by default. You have to start it with this command in a console issued as root (enter su first): ntfs-config. It brings up a GUI that shows all your NTFS partitions and allows you to mount them as read-only or as read-write filesystems with simple one-click actions. You should not use this application on external drives because ntfs-config writes an entry to fstab for a permanent mount. If you reboot with that entry still remaining in fstab, you will have an error situation that will prevent booting to a Desktop Manager if the USB drive is not powered on when next you reboot. I recommend against installing or using this application for external drives because it's obsolete IMO.
Table for umask, dmask, fmask:With regard to the Linux-like permissions you get when you use the umask=xxxx option, you may adjust adjust the folder, document or user permissions quite widely. You should read the man pages. Check out the umask, dmask and fmask options. Here's a handy little table of octal permissions to use for directory permissions:
- owner=rwx group=rwx other=rwx; i.e for drwxrwxrwx use umask=0000
- owner=rwx group=rwx other=r-x; i.e for drwxrwxr-x use umask=0002
- owner=rwx group=rwx other=---; i.e for drwxrwx--- use umask=0007
- owner=rwx group=r-x other=r-x; i.e for drwxr-xr-x use umask=0022
- owner=rwx group=--- other=---; i.e for drwx------ use umask=0077
Thursday, July 8, 2010
What is summarization?
The process of taking a range of IP addresses and advertising them in one address block. The most well-known summarization/supernet is the RFC1918 Class B Range. More commonly we know the range to be 172.16.0.0 - 172.31.255.255, however the supernet is 172.16.0.0/12. You see what has happened there? We've taken a range of addresses and squashed it into one advertisement.
What are the benefits of summarization?
Quite clearly, if we have just one address instead of lots of individual addresses then the routing table is going to be smaller. This in turn means that memory requirements are reduced.
The less obvious benefit is that summarization means you're tracking whether or not you're connected to some subnets of a summary, not the up/down state of every link. Thus when the link goes up or down, you don't have a flurry of traffic announcing the state change.*
How to summarize/supernet?
This is what you really want to know isn't it? Well it's dead simple.
The first method shows you the long way.
1. Starting from the left of the IP address, identify the first octet that has a change of address in it. For example, the Class B RFC1918 range, the IP address first changes in the second octet (i.e. 172.16.x.x - 172.31.x.x).
2. Write out the binary equivalent of the address up to and including the changing octet. So for example the range above is:
10101100.00010000 = 172.16
10101100.00010001 = 172.17
10101100.00010010 = 172.18
10101100.00010011 = 172.19
10101100.00010100 = 172.20
10101100.00010101 = 172.21
10101100.00010110 = 172.22
10101100.00010111 = 172.23
10101100.00011000 = 172.24
10101100.00011001 = 172.25
10101100.00011010 = 172.26
10101100.00011011 = 172.27
10101100.00011100 = 172.28
10101100.00011101 = 172.29
10101100.00011110 = 172.30
10101100.00011111 = 172.31
3. From this list, count from the left how many bits are the same in each address. If we look at it we see that the first 12 bits for each address is the same so that gives us our mask in slash notation. We therefore start at our first address 172.16.0.0 and append our mask so the summary address is 172.16.0.0/12.
Well that was quite simple. But can we be quicker? Yes we can is the good news, after all, you don't want to eat up time in the exam by writing out addresses in binary. So here goes:
1. How many subnets are in the range? The RFC1918 Class B range is 16 subnets.
2. What power of 2 equals our range? 16 subnets = 24 so the answer is four.
3. Subtract the figure from step 2 from the default mask of our address range. In this example our default mask is 16 so the mask after subtracting 4 is /12.
4. Add this mask to the first address in the range - 172.16.0.0/12 in this example
Quick, eh? This is how it works in my head, "mmmm, 16 addresses, 2 to the 4 is 16, mask is 16, minus 4 is 12, so summary address must be first address with /12 mask."
One last example:
Summarise the following:
There are 4 subnets. 2 to the power of 2 gives us 4 so default mask of 24, minus 2, gives us /22. Address is therefore 192.168.0.0/22.
More difficult supernetting question
There are, however, a few pitfalls with supernetting/summarization. Sometimes you may not be able to get all of the addresses into a supernet without wasting addresses. Experience with supernetting questions will help you to identify this. An example below shows you how this could happen:
You need to summarize the following range:
What summary address should you use? Well there's 10 subnets. 2 to the power of 3 only gives us 8 subnets which is too small so we need to look at 2 to the power of 4 which is 16. The problem is that if we count in 16s our addresses straddle two subnets: 10.16.16.0 to 10.16.31.255 and 10.16.32.0 to 10.16.47.255. We have the same problem if we use the power of 5 giving us a range of 32 addresses (10.16.31.0 is in a different subnet than the other addresses in the range). We therefore have to go out to 2 to the power of 6 = 64 in order to get all of our addresses in the range (i.e. 10.16.0.0 to 10.16.63.255). What a waste of address space!!
The best answer is the following:
Break the space down into three ranges. We can summarize 10.16.32.0 to 10.16.39.255 with 3 bits (i.e. there are 8 subnets and 2 to the power of 3 is 8). We simply leave the other two address as they are. We have therefore avoided any wasted address space.
If you are unsure that you have the correct answers why not download a subnet calculator to double-check your answers? There is a great one by 3Com and can be downloaded from here.