Sunday, June 22, 2008

free software song

http://en.wikipedia.org/wiki/Free_Software_Song

http://www.gnu.org/music/writing-fs-song.html

Join us now and share the software;
You'll be free, hackers, you'll be free.

Hoarders may get piles of money,
That is true, hackers, that is true.
But they cannot help their neighbors;
That's not good, hackers, that's not good.

When we have enough free software
At our call, hackers, at our call,
We'll throw out those dirty licenses
Ever more, hackers, ever more.

Join us now and share the software;
You'll be free, hackers, you'll be free.

:)

the power of pervasive computing

i attended a workshop on multi-core architecture in my second year wher i was exposed to few interesting fields of research.though they focussed on multi-core architecture,programming and hardware technology,etc
i understood that all these things focussed on only one thing-connectivity.
i saw few videos in which they exposed few devices which used intel multi-core and all were connected to each other..
to be more clear i can giv a small scenario ..its like wher u turn on ur a.c before u come home jus by sendin an sms,u control ur washing machine from ur mobile phone.as soon as u enter home ur tv starts an interactive application asking u for ur favourite program..gettin share market status on ur mobile phone,etc,etc
it was all good to see but i was wondering how these ppl managed to provide connectivity betwwen these many devices.
this field of research is called pervasive computing and in some areas refered to as Ubiquitous computing.

there is a lot of research work going on in this field..and lot of new innovative ideas are turnin into reality..
my final project which contained 11 modules had 5 modules which come under pervasive computing..but i was not aware of the fact that i am workin on pervasive computing :) actually i was trying to control a comp or laptop using a mobile phone.in which i actually emulated the dos environment on the mobile screen and it was successful..now wen talking about the use and need of an application like this it is really really useful cos this application can be used from nywher to anywher..

a whole lan or wan can be controlled just using a mobile phone..jus imagine tat once u get an access to a network u can control it ,download files from any of the comps,etc or turn bad and shut down and destroy the whole network..

hhmm..destructive ideas apart..


few days back came to knw that in japan a robotics company hav managed to provide connectivity between a robo and a mobile phone as a result the master of the robo can giv instructions to it from wher ever he/she is..

mostly i wud hav been a gprs/wap connectivity bcos no other wireless protocol is so pervasive(upto to my knowledge)

but how come they managed embeddin a gprs device in a robo..wat an innovation..check this out in
http://www.springerlink.com/content/p431402015115626/

we can keep discussing things like this wen it comes to pervasive computing..ther r a lot of things tat we can achieve and implement in this field and as a result life becomes more easy..

not only for a luxurious life..this technology can also be implemented for the physically disabled ppl..and in agriculture ,business,etc ,etc.. my brother once attended a conference organized by tcs in pune.and it was addressed by
many great researchers from microsoft,etc..and also the algo geek c.a.r.hoare(quick sort).. on his return my brother discussed with me ,the various projects going on in this area and almost all the projects wher been carried out for a social cause.. i was very much surprised by the projects he explained ..an realized the power of engineering....
one for farmers,a project for blind ppl,a proj for poor school children,a project for naive computer and calculator users,etc..

and to conclude i wud like to throw some light on the percomp project which is been carried out in the Embedded Systems and Pervasive Computing Lab at Federal University of Campina Grande.
www.percomp.org
to be contd....................
comments and ideas invited...........................

Tuesday, April 8, 2008

The symbol of liberation: a Hi-Tech madrassa

An extract from an article worth reading.

Set amidst the sylvan surroundings of Rajasthan's Ramgarh town, 10 km from the Jaipur railway station, is a sprawling stretch of 173 green acres encircled by a tranquil valley and cool lake - this is where you will find a completely new experiment with the traditional madrassa education system, the Madrassa Jameatul Hidaya.

Usually, madrassas, or Islamic seminaries, are seen by the media as ghettoes of antiquity, orthodoxy and obscurantism. Madrassas have become the butt of suspicion following a series of investigations after the Sep 11 terrorist strikes in the US. They end up proving their credentials of faith and by providing the authorities with certificates of loyalty.
But can you imagine a madrassa with computers, electronic labs, cricket, basketball and volleyball teams and debating societies in English and Hindi? Jameatul Hidaya is one such institution where maulanas work on computers.
The institution is an apt example of how a madrassa must be in these days of hi-tech life. These maulanas are working with the motto: The holy Quran in one hand and a computer in the other.
Maulana Mohammad Fazl-ur-Rahim Mujaddedi, an Islamic scholar and the Ameer-e-Jameatul Hidaya (proctor) of the seminary states: "For Indian Muslims, it's a dream come true.

linux kernel module

there are many tutorials on how to write a basic kernel module..
but only a part of ppl succeed in writing and running a proper module..
cos there are various reasons which may lead to failure ..like ur distribution,the path where you have placed your kernel source directories,kernel versions,etc,etc..
k..in this post am gonna present a basic kernel module which will print "hello " when inserted into the kernel and "bye " when you remove it from the kernel..
here we go!!
requisites:
kernel 2.6.*
i have checked this on redhat,fedora and debian..it never ran on a suse box :(
//file name :hello.c

#include
#include
MODULE_LICENSE("Dual BSD/GPL");

static int hello_init(void)
{
printk(KERN_ALERT "hello\n");
return 0;
}
static void hello_exit(void)
{
printk(KERN_ALERT "bye\n");
}

module_init(hello_init);
module_exit(hello_exit);

does this needs an explanation?nyways..the header files asusual..the license which the source supports..here it is dual..supporting both gpl and bsd..
two user-defined functions......hello_init and hello_exit..the names can be nything cos they r user-defined..
u can define the body as ur wish..here i have attempted to print "hello" when the function hello_init is run
and "bye" when hello_exit is run..
as we have printf library function,printk is used to print in the kernel ,i mean used in lkmp..
for kernel versions 2.4.* the syntax of printk was
printk(<1> "hello\n");
i guess..
here <1> denotes the priority..the lower the number the higher the priority.(as we all know :) )
fine..
then we provide two entry points.
1.module_init
2.module_exit
in the first one we ask the hello_init to be executed i.e., module_init(hello_init)
and the same applies for the second one too .................

and now its time to compile and run..
but how?
first write a Makefile
$ vi Makefile
obj-m := hello.o
and save the file

now you gotta compile it..
by using the make command with -C switch
here u hav to mention the path where u have compiled the kernel source(oops i forgot to tell how to compile the kernel source..k..in the next post for sure :) )
in my comp and most of the comps the path will be /usr/src/kernels/linux-*
in my comp the command is to be


$ make -C /usr/src/kernels/2.6.23.1-42.fc8-i686 M=$PWD modules

on the terminal u wil get the following:

make: Entering directory `/usr/src/kernels/2.6.23.1-42.fc8-i686'
CC [M] /home/sakthi/lkmp/hello.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/sakthi/lkmp/hello.mod.o
LD [M] /home/sakthi/lkmp/hello.ko
make: Leaving directory `/usr/src/kernels/2.6.23.1-42.fc8-i686'


if u get this then its done :)
if u dont :( pls check the path name and Makefile once..
now if u see the folder where u have ur hello.c u can find the following files:
hello.o
hello.mod.c
hello.ko
hello.mod.o

and now its time to run (execute the .ko file) the module..
hey b4 that u need to change the run level yaar..sometimes if u in gui it wont run..
press ctrl+alt+f1

and now
$insmod ./hello.ko
u will get:
hello

if u check ur /proc/kallsysms file and /proc/modules file u can find ur module name man!!
$cat /proc/kallsymsgrep hello
$cat /proc/modulesgrep hello

and now its time to remove
$rmmod ./hello.ko
bye will be displayed..
to come back to gui.......ctrl+alt+f7
its done..so u have written,compiled,inserted and removed back a proper kernel module successfully :)
try this out..its good..
all the best
Ameer Irshad

Thursday, March 20, 2008

anatomy of device drivers

now that wen i have got a good response for this post on device drivers i wud love to thankyou all and share more..now let us examine the anatomy of the device driver..
i mean the major components of a driver..from my previous post we can percept that device driver is a software with a set of entry
points that can be called by the operating system.it can also contain *data structures private to the driver*references to kernel data structures external to the driver*routines private to the driver..here i dont mean entry points..instead routines..
now let me stop boring you ppl with the theory part and jump into programming.. :) :)
most drivers are written as a single source file or set a set of dependent files and
compiled usign make command..(before that we gotta write the Makefile specifying the order
of compilation of all the .o files)
the initial part of the driver source file is called as a prologue and the rest contains entry points.
the prologue contains the initialization part as most of the .c files are written.
* #include-header files * #define-all the constants used in the driver * all the variable declarations and data structures
as said before the remaining part contains the entry points
like init,exit,open,read,write,close and all
k let me continue in my next post..got some work :(

Friday, March 14, 2008

device drivers

an essential part of the operating system..

a very interesting and challenging subject for system programmers..
device drivers are the programs which allow high-level programs to interact with the hardware..
now all that am going to talk about is device drivers in unix and unix-like os.

in a programmer's point of view there are four types of drivers..
* char drivers(read/write char by char eg..floppy,mouse)
* block drivers(block by block.eg.filesystems..hard drivers)
* terminal drivers(ttys)
* stream drivers(don knw much abt these.neva worked..must be related to stream interface functions)

in unix/linux device drivers can be part of the kernel or can be loadable modules..
modules are the programs which can be loaded into the kernel during run-time..these are generally called

kernel-modules..(refer d book kernel-module programming

u can find many books on linux kernel module programming(lkmp)..but make sure that they deal with kernel 2.6 and above..
cos lkmp slightly differs from 2.4.* to 2.6.*.

after writing the kernel module we can load them into the kernel using the insmod..
if ur module name is hello.c
then u gotta load its .ko
bit4054@VITLINUX$ insmod ./hello.ko


to check whether ur module is loaded or not u can check the name of the loaded module in /proc/modules
just give
bit4054@VITLINUX$ cat /proc/modules

and also u can check for the symbol table in

bit4054@VITLINUX# cat /proc/kallsyms

the above file contains the kernel symbol table..

and to remove the module

bit4054@VITLINUX$ rmmod ./hello.ko

in this way a module is written and loaded into the kernel..

like wise u can write a device driver..
there are few basic operations which are essential in a driver programming..

open()

read()

write()

ioctl()

poll()

close()

but its a very painful task cos u gotta knw about the h/w at the bit-level

there are many APIs that wil help u in writing a driver..and u need good testing environments..
few of the APIs are:


  • Advanced Linux Sound Architecture (ALSA) - The standard modern Linux sound driver interface
  • I/O Kit - an open-source framework from Apple for developing Mac OS X device drivers
  • Installable File System (IFS) - a filesystem API for IBM OS/2 and Microsoft Windows NT
  • Network Driver Interface Specification (NDIS) - a standard network card driver API
  • Open Data-Link Interface (ODI) - a network card API similar to NDIS
  • Scanner Access Now Easy (SANE) - a public domain interface to raster image scanner hardware
  • Uniform Driver Interface (UDI) - a cross platform driver interface project
  • Windows Display Driver Model (WDDM) - the new graphic display driver architecture for Windows Vista
  • Windows Driver Foundation (WDF)
  • Windows Driver Model (WDM)



i have tried writing and running few basic kernel modules but still learning to write device drivers..

u can refer many books linux device drivers alessandro rubini 3rd edition..(note:2nd edition deals only with kernel 2.4.*)

writing unix device drivers.(don remember the author name)..

and am sure this post wil give u a very very basic knowledge on drivers..

linux on IBM's BlueGene

When i was browsing about high performance computing for a seminar i came across links on

blue gene..the fastest super computer from IBM..they announced blue gene in 1999 which was

initially developed to facilitate and speed up scientific research..like..human protein

modelling,etc..now used in various labs for various reasons one among which is nuclear

test simulations

Blue Gene is the successor of deep blue,the super computer which defeated gary kasprov in a chess competition..

• it has 65000 processors..

• speed ranging in petaflops

• one quadrillion operations per second....


Tuesday, January 15, 2008

QURAN-the light of the world

hello friends!anybody interested in reading the Holy QURAN understanding word for word(Arabic for English) may refer the link below..
http://www.studyquran.co.uk/Quran_ArabicEnglish_WordforWord_Translation.htm

or just click here

Thursday, January 3, 2008

when your command prompt is disabled

When you attempt to run CMD.exe or a batch file, you may receive the message "The command prompt has been disabled by your administrator". This is caused by restrictions placed in Registry. DisableCMD value is set to 1 or via Group Policy. To enable Task Manager, try any of these methods:

Method 1: Using the console registry tool
Click Start, Run and type this command exactly as given below: (better - Copy and paste)

REG add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t REG_DWORD /d 0 /f
Method 2: Edit the registry directly
Open Registry Editor (Regedit.exe) and navigate to:

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System]

In the right-pane, double-click DisableCMD and set it's data to 0


Method 3: Using Group Policy Editor in Windows XP Professional.
Click Start, Run, type gpedit.msc and click OK.

Navigate to User Configuration \ Administrative Templates \ System

Double-click the Prevent access to the command prompt

You can then disable or set the policy to Not Configured. Disabling or setting this policy to Not Configured should solve the problem.