Truth, Computing and Fail

  • Home
  • About

Wuss R Us

anomit | September 20, 2008

This is the most strongly worded article I have ever come across on TMJ. Which is as manly as Prince gets.

I'm a mean motherfucker

The closest form of the so called PDAs being reported in that article I have seen in my 2+ years of stay here is hugging. Yes, nothing more than that. There is no French Lassiez Faire thing going on here, and even if it was, balls on your face if you think you have the moral high ground to complain about it.

The entire foundation around which the premise of a bunch of haggard fools going around policing people who are actually ‘adults’, in the legal sense of the word, is as strong as a crumbling cookie. I’m tempted to make a ridiculous looking attempt at putting across some equally damning yet very logical counter arguments that actually exist on paper as law of the Country and also accepted unequivocally across the civilized world as something called Human Rights, which…well, some people living in the medieval ages are still in the dark about.

1. The cultural sensibility marauding monster that PDA is, can also be termed as a peaceful assembly of two persons and the last time I had studied Social Sciences in school, every right to it existed in the Indian Constitution and in other countries too.

2. I touched upon this earlier too. They are adults and hence fully qualified to choose where they want to go and with whom. Do we really need a law to explicitly state this?

Since I’m not a lawyer, I can’t dig out citations of some Supreme Court or an International Court judgment but hey, you get the point, don’t you?

I don’t know from where did this current trend of some institution, which isn’t anyways legally empowered, to decide about how others go on about their lives caught on. For all the glossy promotional campaigns about this place being an ‘International University Town’, you’d get to see thirteen different kinds of barricades and walls at every step. Also throw into this grand concept about two dozens of illiterate security guards and a semi literate, jobless, unqualified for any kind of education ‘Hostel Caretaker’ who are clearly enjoying their day in the sun and making hay while it shines, and you get the perfect picture of a campus that I’ve no doubt other Universities abroad will be in a rat race to implement before anyone else does. India Shining indeed. What else can be a better example of a place to pursue your academic career other than this?

PS: From what I and some of my friends have got to know, our blogs and twitter accounts are being monitored by the people ‘higher up’. But then, I don’t belong to the clan mentioned in the post title. What I have learnt in all these years of my schooling and upbringing is to stand up to the truth, whatever it may be and I know I’m not wrong. I may not be a great orator like Winston Churchill but that’s what blogs are for. :D

Comments
1 Comment »
Categories
My Life
Comments rss Comments rss
Trackback Trackback

Round robin process scheduling simulation

anomit | September 11, 2008

No big deal. Everyone has to do it once for their UNIX concepts practical work I guess. What irked me was that the teacher and some of the ‘good students’ were hell bent on arguing that non-preemptive process scheduling simulations do not require any kind of data regarding the arrival time of processes in the ready queue. I still don’t understand how that simulates a real life scenario, that is, after the completion of a process, to which other process would the scheduler perform a context switch. Could someone point me out if I am missing something here?

Anyways, this is the code I wrote today during the practical class:

#include<stdio.h>

struct processinfo

{

        int id;

        int burst;

        int arr;

};

typedef struct processinfo process;

/*checks if all the processes have finished execution*/

int check(process* p,int n)

{

        int i=0,flag=0;

        for(i=0;i<n;i++)

        {

                if(p[i].burst!=0)

                {

                        flag=1;

                        break;

                }

        }

        return flag;

}

int main()

{

        int n;

        printf("No. of processes:");

        scanf("%d",&n);

        process p[n];

        int i=0,j=0;

        int wt[n]/*the waiting time array*/,last[n]/*last[i] stores the last executed instant of the process i*/;

        for(i=0;i<n;i++)

        {

        	printf("Proccess id:");

        	scanf("%d",&p[i].id);

                printf("Arrival time:");

                scanf("%d",&p[i].arr);

                printf("Burst time:");

                scanf("%d",&p[i].burst);

                wt[i]=0;

                last[i]=0;

        }

        /*gah, bubble sort*/

       /*anyways we won't be doing any sorting in a real scheduler, I guess*/

        for(i=0;i<n-1;i++)
		{

        	for(j=i+1;j<n;j++)

        	{

                if(p[j-1].arr>p[j].arr)

                {

                 process temp=p[j-1];

                 p[j-1]=p[j];

                 p[j]=temp;

                }

        	}

		}

int timequantum=2/*the time quantum*/,time=0/*running time*/;

while(1)

{

        if(!check(p,n))

                break;

	int k=0;

for(k=0;k<n;k++)

{

        if(p[k].burst!=0)

        {

                if(p[k].burst<timequantum)

                {

                        wt[k]+=time-last[k];

                        time+=p[k].burst;

                        p[k].burst=0;

                }

                else

                {

                        p[k].burst-=timequantum;

                        wt[k]+=time-last[k];

                        time+=timequantum;

                }
                last[k]=time;
        }

}

 }//end of while

for(i=0;i<n;i++)

	printf("\nWaiting time for Process %d:%d",p[i].id,wt[i]);

return 0;

}
Comments
2 Comments »
Categories
Coding, GNU/Linux
Tags
scheduler, unix
Comments rss Comments rss
Trackback Trackback

What’s in

  • Symlinks in a libfs virtual file system: The Pains
  • Small rant on the FUSE API reference
  • Kernel module debugging: a simple technique
  • Vim/Cscope quickie
  • PyCon India or Code Jam?

Blogroll

  • Akshay Kothari
  • Ankur Shrivastav (OS)
  • Ankur Sinha
  • Harsh J
  • Hullap
  • LUG manipal
  • Swap

Tags

aircrack airfail airtel assembly blues build c Coding college country cryptography dean faculty file systems fuckery gnuplot hacking India kernel linux mangalore manipal mpd music NASM plugin plugins politicians pub culture python rant rock sam scheduler simulation SSFNet stupidity supernatural suppression syscall syscalls unix vim xchat xml

Archives

  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • January 2009
  • November 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • October 2007
  • September 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007

License

Creative Commons License
This work by Anomit Ghosh is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 India License.
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox