Tuesday, 18 July 2017

A sort story about a man lived in the north-east of India and having little skill in IT . Part I


Profile:
I am Okram Rakesh Singh from Thoubal DIstrict ,Manipur and i have passed B.Tech (Computer Sc) from NIT Manipur 2014. And I have 3 years + in experience in IT . Now currently working in High Court Manipur as Developer in IT Section.

Streaming Line:
I started my schooling from 1996 admitting in a government primary school and after then to a Private School ,EGF school in my home Thoubal Ningombam. Till class 7th, i had no interest in education and didn't get any inspiration  from teachers and seniors. However , life is full of strange , I don't how it was  happened . I suddenly started reading books of Science and Mathematics . And everything started changing . Really speaking , I have weakness in English vocabulary even though i try . I shy too . I know teacher don't like me too as I ask questions to them those they can't answer.
At that time we had Optional Paper in standard 9th and 10th . And i toke Hr. Mathematics as my Optional as I have passionate about it ,but not Computer .

After getting passed out my Hr School Exam ,I admitted in a private Hr Sec School , namely Fancier Abhiram Thoubal, in free . I got a teacher whom I would mention as  the most suitable person as teacher i have met so far in my life . His name is Hijam Dijen Singh , Maths Teacher. I used to argue him in lot of topics and he was always polite to me guiding in the right direction . I knew he is not perfect as I presumed ,but he was awesome. You know 12th standard is turning point of life for every
student. Here is the point where i made mistake . I fall in love to a girl .Sorry, i would not mention her name. I skipped everything like reading books , helping family. etc. The result of that was a lesson to me. As my beloved teacher asked me to apply for Engineering Exam , AIEEE , I applied it with his money as my family unable to give at that time. I clear 12th with just 70 % scoring 50 in English. I was heart broken seeing the result while everyone was enjoying the moment. Family members mentioned me with bad words. I thought everything was finished. However , I got a chance to rebuild my career in another which i hadn't even thought it.  I was selected in Engineering Entrance and got admission in NIT Manipur in Computer Science.

My new journey of life started again with full depressed heart. I decided not to enjoy , only the books. They would be my new friends. I first 2 years , i faced a lot of problem in Engineering Science as side effect of my 12th Standard leakage. After the 2 years , I was in pace with my new partner Computer Programming. Even though I was new in programming with syntax and computer basic ideas, i knew i could do it as i have my strong in mathematics logic which is my strong point. I do coding in full swing ,i hope . I would like to mention one thing that everyone might taken it in wrong sense . I was the lead Computer Sc Student in my batch . But because of teachers i was pulled down and made someone . I  knew they would as they were from beginning.  I know my weakness as I have sort-temper . Because of this, I lost many chances in  placement.  I got 2 placement offer, but i joint my home-state company Cobigent.

  

Tuesday, 25 September 2012

Multilevel feedback using queue & array


//Here in this programe i am using two queue
#include<iostream.h>
#include<conio.h>
int front=-1,rear=-1,front1=-1,rear1=-1;
#define MAX 29
int a[MAX];
void en(int x)//for insertion to thequeue
{
   
     if(rear==MAX-1)
     return;
     rear=rear+1;
     a[rear]=x;
     if(front==-1)
     front=0;
     };
    void en1(int x)
{
   
     if(rear1==MAX-1)
     return;
     rear1=rear1+1;
     a[rear1]=x;
     if(front1==-1)
     front1=0;
     };
     int de()//for deletion from the queue
     {int e;//for returning the index of the element
         e=front;
         if(front==rear)
      {
                     front=-1;
       rear=-1;}
       else
       front=front+1;
       return a[e];
       };
        int de1()
     {int e;
         e=front1;
         if(front1==rear1)
      {
                     front1=-1;
       rear1=-1;}
       else
       front1=front1+1;
       return a[e];
       };
     
main()
{
      int p[15],b[15],n,b1[15],pn,t[15],w[15],q,q1;
      cout<<"Enter n";//for giving the no. of the process
      cin>>n;
      cout<<"entr  p& b";
      for(int i=0;i<n;i++)//for entering the process no. & burst time of each process
      {cin>>p[i]>>b[i];
      b1[i]=b[i];
      t[i]=0;
      w[i]=0;
      en(i);}

      for(int i=1;i<=3;i++)
      {if(i%2!=0)
          {    while(front!=-1)
             {
                   pn=de();
                   if(i==1)
                   { q=8;
                 
                   if(b[pn]>q)
                  {b[pn]=b[pn]-q;
                   q1=q;}
                    else
                   { q1=b[pn];
                     b[pn]=0;
                     }}
                     else
                   { q1=b[pn];
                     b[pn]=0;
                     }
                   for(int i=0;i<n;i++)//for calculation of waitng time of the processes while one process is running
                   {
                           if(i!=pn & b[i]>0)
                           w[i]=w[i]+q1;
                           }
                     if(b[pn]>0)
                      en1(pn);
                      }//endin of the 1st while statement
        }//endin of the 1st if statement                
      else
                while(front1!=-1)
              {  pn=de1();
                   q=16;
                   if(b[pn]>q)
                  {b[pn]=b[pn]-q;
                   q1=q;}
                  else
                   { q1=b[pn];
                     b[pn]=0;
                     }
                  for(int i=0;i<n;i++ )//for calculation of waiting time when one process executing
                   {
                           if(i!=pn & b[i]>0)
                           w[i]=w[i]+q1;
                           }
                     if(b[pn]>0)
                      en(pn);
              }                        
           } //ending of else statement        
         for(int i=0;i<n;i++)//for the calculation of turn around time of each process
         t[i]=w[i]+b1[i];
         cout<<"Process\n";
         for(int i=0;i<n;i++)//for displaying result
         cout<<p[i]<<"\t"<<b1[i]<<"\t"<<w[i]<<"\t"<<t[i]<<"\n";
            getch();
            } //end of main