Category: Engineering Education

My Visit to KITE Colleges

  During my stay in Hyderabad , I had the opportunity to visit  a wonderful institute  named  kite colleges. It is,  in fact, two colleges situated in same campus. The colleges started functioning this year.  At present only first year classes are going on.  They are located approximately 60km from Hyderabad  in the Ranga Reddy district.

022520092816 022520092830          

The college is  amazing in many ways given the quality  of teaching and infrastructure in most of the   private/government colleges in India. First of all, the management seems to have a vision  on the future of the colleges and seems to be committed to implementing  it. Secondly, they have invested  lot of capital to fulfil the vision,

When I visited the college, at the instance of  Mr. Ramesh  who is aptly designated as the technology officer of the college, I was expecting a normal college with all the  gimmicks to attract parents. When I was shown the facilities  I was rather wonderstruck.

022520092795022520092799

  All  the class rooms are world class with modern furniture and  equipped with projectors. The computer center has lots of Dell  machines ( which Ramesh says is of industrial quality) The computer center is so well designed  and will be a  neighbors envy.

On the electronics front they have several Agilent DSOs ( we have only one :(  ) and most of the other equipments  imported. The furniture at  electronics lab is also worth mention.

022520092808 022520092825

The college is at present powered with two 2 MBPS lines. They have a blade server with 6 blades which runs a variety of services.

   What impressed me most was the methodology of teaching.:- learning by doing.  It was most evident in their IT workshop where you can learn a lot of thing by actually doing it. I  believe that  this is the right methodology to learn anything.

The college runs some BPO services which enables students to work and pay for their fees like in western countries. Students manage canteen , gardening  and lot of other services.

022520092802 022520092822

The institution is only in its first year. The vision of management in building up a world class institution   seems to be working.  I don’t know whether the  present structure and activities will scale up when it becomes a full fledged college.

  The students are all accommodated in the campus. I have not spoken to any students during my visit ( which I should have ). I would like to hear how the students and faculty find this innovative institution. 

Update from prepare future

It was pretty heavy work for 2 days.  Yesterday, I was taught about file io and  related system calls followed by environment variables ,  things like parsing command lines etc. I could not finish all the exercises as I went out to see the city. Took a local bus tio HiTech city and then caught an MMTS train and went to Necklace road.  Wandered around tank bund and returned back to JNTU around 10pm. Today, I came early and finished the exercises.

IPC mechanism  were discussed in the morning.  It was followed by an inspirational talk from Venkatesh Choppella from IITM-K Trivandrum on network security from the perspective of software engineering.  Some of my classmates are getting baffled by the exercises and skipping them as there is no compulsion.  Hope I will hold on till the end.  One good thing is that they have restricted Internet from 18.00 to 19.00. :D.  Internet keeps your mind wondering ;I can testify it now. No wonder people invented complex gizmo’s before Internet.

Here there is an Internal portal named E-Sikshak through which they are trying to deliver content, but it seems to malfunction every now and then.  I got this document while exploring E -Sikshak It was in MS Word format and I converted it to a pdf.

Learning Pthreads

I am beginning to enjoy the Prepare Future program on Linux internal and   driver development. Today’s class was about pthreads. I had some prior experience on pthreads library while at CUSAT.   It was refreshed today.

Pthreads is a user space library for  manipulating threads.

Here is what we did today.  First we wrote a small program which created a thread.

It is here.

#include<stdio.h>
#include <sys/types.h>
#include <pthread.h>

void * thread_function ( void *arg)
{
printf(“In Thread\n”);
pthread_exit(“Success”);
}

int main()
{
pthread_t tid;
void * ret_status;
pthread_create( &tid,NULL, &thread_function,NULL);

printf(“In Main\n”);

pthread_join(tid ,&ret_status);

return (0);

}

For compiling this I used.

$gcc -D_REENTRANT -o pt1 pt1.c -l pthread

Then  i tried out   semaphore and mutex in pthread library.

The important semaphore operations are

sem_init  –   int sem_init(sem_t *sem, int pshared, unsigned int value);

sem_ wait    int sem_wait(sem_t *sem);

sem_post         int sem_post(sem_t *sem);

sem_destroy   int sem_destroy(sem_t *sem);

I was forced to RTFM the manual. 😀

I wrote this then.

#include<stdio.h>
#include <sys/types.h>
#include <pthread.h>
#include <semaphore.h>

int y=0;
sem_t sigsem;

void * thread1 ( void *arg)
{
int x;
sem_wait(&sigsem);

x=y+3;

printf(“In Thread1\n”);
printf(” x is %d\n”,x);

pthread_exit(“Success thread1 “);
}

void * thread2 ( void *arg)
{
y=45;
sem_post(&sigsem);
printf(“In Thread2\n”);
printf(” y is %d\n”,y);
pthread_exit(“Success thread2”);
}

int main()
{
pthread_t tid1,tid2;
void * ret_status;

sem_init( &sigsem,0,0);

pthread_create( &tid1,NULL, &thread1,NULL);
pthread_create( &tid2,NULL, &thread2,NULL);
printf(“In Main\n”);

pthread_join(tid1 ,&ret_status);
pthread_join(tid2 ,&ret_status);

sem_destroy(&sigsem);

return (0);

}
This was followed by producer consumer problem as below.

#include<stdio.h>
#include <sys/types.h>
#include <pthread.h>

//sem_t sigsem;
int buffer[10];

void * producer ( void *arg)
{
int i,index;
index=0;

for (i =0;i<40 ;++i)
{

printf(“Producer  trying to produce an item……….\n”);

buffer[index] =i;

printf (“producer put  %d  at buffer [%d]\n”, i,index);

index++;
if (index==10)
index=0;
}

pthread_exit(“Producer ends”);
}

void * consumer ( void *arg)
{
int i,index=0;
for (i=0;i<40;++i)
{
printf(” Consumer  trying to consume  an item ……….\n”);
printf ( ” Consumer ate  %d from buffer[%d]\n”, buffer [index] ,index);

index++;
if (index==10)
index=0;
}

pthread_exit(“Consumer ends”);
}

int main()
{
pthread_t tid1,tid2;
void * ret_status;
pthread_create( &tid1,NULL, &producer,NULL);
pthread_create( &tid2,NULL, &consumer,NULL);

pthread_join(tid1 ,&ret_status);
pthread_join(tid2 ,&ret_status);

return (0);

}
The mutex in it  was then rewritten with pthread_mutex functions. Again lot of RTFM.

Then as an assignment we did the readers and writers problem.

#include<stdio.h>
#include <sys/types.h>
#include <pthread.h>
#include <semaphore.h>

sem_t  mutex,rcmutex;
int reader_count=0;
int buffer=10;

void reader_action(int r )
{

printf ( “\nReader %d  buffer is %d “,r, buffer);
}

void  write_action (int i)
{
int j;
buffer+=10;
for (j=0;j<10;++j) ; //Waste some time

printf ( “\n Writing for %d time buffer is %d “,i, buffer);

}

void * reader1 ( void *arg)
{

sem_wait(&rcmutex);
reader_count++;
if(reader_count==1)
sem_wait(&mutex);
sem_post(&rcmutex);

reader_action(1);

sem_wait(&rcmutex);

reader_count–;
if ( reader_count==0)
sem_post(&mutex);

sem_post(&rcmutex);

pthread_exit(“Success reader1 “);
}

void * reader2 ( void *arg)
{

sem_wait(&rcmutex);
reader_count++;
if(reader_count==1)
sem_wait(&mutex);
sem_post(&rcmutex);

reader_action(2);

sem_wait(&rcmutex);

reader_count–;
if ( reader_count==0)
sem_post(&mutex);

sem_post(&rcmutex);

pthread_exit(“Success reader2 “);
}

void * writer ( void *arg)
{
int i;
for (i=0 ; i<10;++i)
{

sem_wait (&mutex);
write_action(i);
sem_post(&mutex);
}
pthread_exit(“Success writer”);
}

int main()
{
pthread_t tid1,tid2,tid3,tid4,tid5,tid6;
void * ret_status;

sem_init( &mutex,0,1);
sem_init( &rcmutex,0,1);

pthread_create( &tid1,NULL, &reader1,NULL);
pthread_create( &tid2,NULL, &writer,NULL);
pthread_create( &tid3,NULL, &reader2,NULL);
pthread_create( &tid4,NULL, &reader1,NULL);
pthread_create( &tid5,NULL, &reader2,NULL);
pthread_create( &tid6,NULL, &reader1,NULL);

pthread_join(tid1 , &ret_status);
pthread_join(tid2 ,&ret_status);
pthread_join(tid3 ,&ret_status);
pthread_join(tid4 , &ret_status);
pthread_join(tid5 , &ret_status);
pthread_join(tid6 , &ret_status);

sem_destroy(&mutex);
sem_destroy(&rcmutex);
return (0);

}
The course is progressing smoothly. and looks interesting several fellow participants are also stimulating.

I forgot to take the card reader, so I am unable to post photos.  I had a walk around the JNTU campus in the morning and took several photos. May be I will beautify these blog enties with  photos and proper code snippets ( and build   proper pthread tutorial)   when I return.

At JNTU Hyderabad for Prepare Future

I am presently attending a 2 weeks training program  conducted by  CDAC Hyderabad  at JNTU. This  is 2 weeks faculty updation program named Prepare future. I am attending Linux internals and driver development under system software track.

The course syllabus looks pretty impressive as given below.

  • Introduction to Linux System Programming
  • Linux Architecture
  • Linux Shell
  • GNU Tool Chain (GCC, GDB, MAKE, GPROF & GCONV)
  • System Calls and Working with Files
  • Linux Environment
  • Process Management & IPC
  • POSIX Compliant Thread Programming
  • Socket Programming
  • Linux Kernel Programming and Module Programming
  • Character Drivers
  • Concurrency, Race Conditions & IOCTL
  • Timers & Character Drivers
  • Block Drivers & Network Drivers
  • Introduction to USB Drivers

The course started today with an introduction to Linux architecture, system calls and programming interface. There  was nothing new to me, but I enjoyed the lecture by Ms Lakshmi  as  it refreshed my ideas about several concepts.   The second session was an introduction to shell,gcc and make.  It was not  a perfect lecture and the inexperience of the faculty was quite visible.

The afternoon was spent in the lab., with exercises on gcc make and gdb.  The lab sessions are held on  OpenSuse. In fact I am using it for the first time. As a long time debian user I have some discomfort.May be I will catch up by tomorrow.

The interesting thing about the program is that I have an option to sit in the lab as long as I like.  I feel like I was in CUSAT computer science department.

There are nearly 15 other participants. Most of them are from research organisations like CDAC , DRDO and DOE.  Even though the course is for faculty updation  I don’t find many faculty members attending the training. ( I am the only one from Kerala.)

How to become a certified (Pseudo) Free software Activist

My recent posts on the state of free software in Kerala,  have drawn flak from several pseudo free software activists.  Some of them have even called me an agent of Microsoft.  I think this post is going to generate some more heat and the pun is intentional.

Recently Kerala State IT mission and  C-DIT have launched a new initiative called Centre for advanced  training in free and open source software(CATFOSS).  You can read about the objectives of the centre in this lenghty article.  ( Google  cache here)

Last week CATFOSS  announced admission to a six  month training program in advanced free and open source software.  As an academic, I was interested in this novel program. I looked at the website and discovered  several interesting information.

<Quote from CATFOSS>

In order to resist this process, two decades back, Mr. Richard Stallman founded the Free and Open Source Software (FOSS) movement in 1983. As the name FOSS itself implies, the ideology behind the FOSS movement has been that the fruits of the ICT revolution should flow freely among the users of this technology, the world over

<Quote from CATFOSS ends>

As far as I know, RMS has some objections to  Open Source  Software. Look at his article “why open source misses the point of free software” .

I was educated in a Government school and my English is not very good.  Still, I will recommend the website as an excellent model for precise writing . See this.

<Quote from CATFOSS>
One of the major problems the State government had to face in the process of to propogating FOSS was the lack of trained human reources and non-availability of FOSS based tools. Thus, the Centre for Advanced Training in Free and Open Source Software (CATFOSS), proposed to be initiated by the end of November 2008 at Ernakulam in the ITes Habitat in collaboration with Kerala State IT Mission (KSTIM) and Centre for Development of Imaging Technology (C-DIT) will unquestionably be a courageous step and perhaps the first of its kind in India to develop highly qualified manpower who can enrich the applications of FOSS based software tools in a time bound manner, thereby bridging a very crucial gap in the e-governance sector and IT industry in Kerala and elsewhere.

<Quote from CATFOSS ends>

Brochures and websites show you only the tip of the iceberg. Let us look at what else  CATFOSS offers.  If you are interested in the  recently announced  Advanced Training in Free and Open Source Software,   you can apply online here.   ( Google cache here). The course fee is only Rs50000/- and employment opportunities are very good  even during  the current recession.  The seats are limited,  so rush your application.

Let us see what you will learn. The prospectus is here.  (Google Cache here)

< Quote from Prospectus>

Curriculum
The curriculum at CATFOSS will have the following objectives :
a) Introduction to free software ecosystem, its philosophy and technical aspects.
b) Empowerment to spearhead free software projects.
c) Thorough knowledge in free software development work flow.
d) Indepth knowledge in designing, implementing, deploying and maintaining a free software
based solution for the society.
<< Quote from Prospectus ends>

Wow! Lot of advanced things to learn.  Is there any company recruiting  Free software activists? May be the  Kerala government can accommodate some. Who else ? God only knows . We, keralites  are living in God’s  own country.

There is a bonus. CATFOSS will teach you soft skills free of cost along with the course.  Look at the academic committe who formulated this crap.

Finally, how much public money is needed for this. Only  82 lakhs. 😀 .

Free software enthusiast of Kerala , wake up.  There is a new course designed for  you. You can become  a Free Software Activist in six months. Results assured. Rush the seats are limited.

Update: The  CATFOSS site has been take down. The google cache is here. I am adding relavant links from google cache.