Twitter Delicious Facebook Digg Stumbleupon Favorites More

Wednesday 31 August 2011

Operating System Calls

To use the functions which are provided by an Operating System we use system calls, in other words we can say  system calls provides an interface to the services provided by an operating system.

Types of System Call

What is Operating System


                    Operating System

To define a Operating System we must have to know, what is the work of an operating system, since the work done by operating system is different in different situation hence defining an operating system in terms of either of
the particular area of work, just can't define it fully.
So from the last paragraph one question comes what is an operating system, why can't we define it easily, and an answer of these question is nothing but the implementation of OS in different way.
               First we consider the work of an OS for a single user, for a single user an OS is nothing but a software which gives him the facility to play video, audio, pictures, internet surfing and some more stuff, in this case the operating system has a little bit to do with the resource utilization.
               But if the user is on a terminal from where a number of computers are connected and all are accessing the terminal then there is a lots of work of resource utilization is evolved, here operating system is working as a resource utilizer.

            If we view the OS from the system prospective then it work as a resource allocator since if a system is   running then there are many resource like CPU time, main memory, VDU(visual display unit), Keyboards, Printers etc are to be allocated in such a way that there should be no any conflict and from this view operating system works as the allocator, which reduces conflict and manages the process in utilizing them.
         From the above discussion we understood that OS works different in different situation. Hence we can define Operating System as:


Operating System is a tool to solve the computing needs of its users with an efficient utilization of the resources.
or you can say,
Operating System is a bridge between user and hardware.(general definition)





Sunday 21 August 2011

Linked List

Linked List
Linked list is a linear Data Structure, in which every element or node contains two different parts one of which is the info i.e information or data field and other is the pointer field which contains the address of next node.


Node is a container of a single element of a set. We can implement link list using two different approach

1.         Using Array.(i.e static memory allocation)
2.         Using Linked list (i.e Dynamic  memory allocation)

Array implementation of linked list in C.
Since list is a simply a collection of nodes hence array , may be the one the implementation of linked list.
      Using array one node can be defined as.

      #define NUMNODES 500
      Struct nodetype {
            Int  info, next;
       };
                 Struct nodetype node[NUMNODES];

Here we are creating 500 node using array but one thing that here “node can not be ordered by the array ordering” each must contain within itself a pointer to its successor.
Limitations of array implementations 
Here we have seen that the array can be used to implement linked list in which node are un- ordered and the “next” field tracks the information of the next element of that list.
       But using array as link-list  creates two problem.


1.      1. First the size of the array is fixed at compile time hence there is a great chance of overflow for any large   
         size of the array. 
    2. Second problem is that we have to allocate the whole array at compile time and if there is a need of less 
         number of nodes that memory goes waste and the storage can not be used for other purpose.


Using dynamic memory allocation:
Struct info {
          Int info;
          struct node *next;
};        
        typedef  struct node *NODEPTR;



  Allocation of space:

    If we declare
             NODEPTR = P;
            P = (NODEPTR)malloc(sizeof(struct node));
     
       Will create a node of ‘node’ type and p will contain the address of that node.




Header nodes:
Sometime we need an extra node attached to the list which do not contain the info part  but contains the address of the first element of the list, this type of node is called as header node.
                          In the first look it may seem that we are wasting the memory of the header node, as info field of is not used but header node may contain information like the address of last element of the list or number of elements in list and many more things.


                                                                : Circular link list :
As we all know that linked list is an ADT and one of the functions of this ADT is the traversing of the list, since the last node contains the null values we can not come to the first node using single linked list, in such a situation we use circular linked list. In circular linked list the last node contains the address of first node.


Here is a small problem:  If we traverse list using p=p->next where p is a node and next is the address of the next node contained, then we can not determine whether we  have traverse the whole list or not since the list is circular.
                   Solution for this problem is to keep another pointer p and check every time where list is the start of the linked list
Alternative method is to place a header node as first node of a circular list. This list may be evaluated using 
a special type of value in its info field which is totally different info value from the list info.

                                              : Doubly linked list:

Although circular list has advantage over linear list, it has still some disadvantage that we can not traverse the list in backward direction, for such condition doubly linked list is required.
                   In doubly linked list there are two address field one of which contains the address of the previous node and other contains the address of its next node.
Array implementation:                                                           
 #define NUMNODES 500
Struct node {
    int info;
    int left, right;
 };
 Struct node NODE[NUMNODES];
Dynamic implementation:
  Struct node {
     int info;
      int node *left, *right;
};
typedef struct node *NODEPTR;



 It may be a circular doubly linked list, whose last node’s next pointer will contain the address of the first node.

Wednesday 17 August 2011

Validation of Result

1. GATE score is valid for two years
2. The Score Card of the Qualified student will give the Percentile Score for that discipline and the   
     performance index. The percentile score in each discipline is calculated like this.
    
                                                                  Where     P = Percentile score
                                                                                                           N=total number of candidate appearing in their discipline
                                                                                                           n = number of candidate having the same all India rank in
                                           the same discipline
                      r = all India rank

 PERFORMANCE  INDEX(PI)  in a discipline is calculated as follows
                                                         
                                          Where   m = marks obtained by the candidate in a paper
                                                                          a = average marks in the paper
                                                                          s = standard division in the paper
                                                                          K1 + K2 = constants which are same for all disciplines
                           
3.  The GATE evaluation process is carried out with utmost care. Request for revaluation of answer scripts and             
      retotaling of marks will not be entertained.
 
                                                         
                                                                                             

Why GATE


In order to pursue M.Tech program in a leading institute of the country we must opt for GATE. The benefits of M.Tech are as listed below:

1. Companies coming for Campus Placement in leading Institutes are better as well as large in number.
2. Salaries offered for M.Tech are higher as compared to B.E.
3. M.Tech degree leads to specialization and furthering of interest in a certain area which may lead to Ph.D
4. M.Tech degree is a must for those wishing to apply for Faculty/Research positions in educational Institutes/R&D centers.
5. Scholarship of Rs. 5000.0 per month by the Government of India is paid during the entire period of 18 months of M.Tech.
6. The M.Tech program is a 3 semester (18 months) program.


NOTE

1. Candidates who get less than 70 percentile get no score card.
2. After publication of GATE results, students must apply to individual Institutes to get their application forms.
3. Institutes advertise M.Tech admissions in leading newspapers from 1st April till end July. However some Institutes do not advertise and therefore students have to get the forms themselves.
4. The concerned Institute may conduct written test and/or interview for the purpose of admission.
5. If your Gate score in Computer Science is
       
  • 96 percentile or more then try for IITs.
  • In between 85 - 96 percentile then apply for top RECs, JADAVPUR, SHIBPUR, ROORKEE, etc. 
  • Less than 85 - look for appropriate institutes.
so work best to get your goal.

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Blogger Templates