2,192 total views, 1 views today

## GATE CSE 2017 Admission Responses

## Updates of Rank Predictor

The rank predictor for GATE 2017 is now live at http://gateoverflow.in/mymarks thanks to Pragy. You can know your marks, normalized marks and even expected ranks all of which are not mere prediction but a realistic estimate. You should not get much deviation from this but Pragy is trying to make an even better app. Please fill this form in order to receive any update happening like key being updated etc. As always we never spam users and you won’t be getting any other mail than what you subscribe for.

https://goo.gl/forms/7ivUCyOKl37pdppf2

More details on results, see http://gateoverflow.in/blog/1204/gate-2017-result-updates

4,441 total views, 2 views today

## What Resources to Use for GATE CSE Preparation?

Please see here for general advise to GATE aspirants including those doing bachelors. In this post I’m going to give a summary about what all resources to use and how to use them for getting a good rank in GATE which is usually a 2 digit rank. To start with some comments about question solving:

Solving a question means you should not just mug up solution given by someone. First you have to attempt solving. If you can all is well. Else, ask yourself where you are stuck, what you do not know. Then, refer text again, attempt again. If you cannot solve then see some good solution and fix what you missed.

Remember the 30% rule for question solving. That is, if you solve 100 questions you should not refer the solution for more than 30% of them. If you do so, you are preparing wrong.

Now, let me give a description about some resources I know.

- Standard Books: This is the best resource recommended by most GATE toppers.
- Advantages: Contents are 100% correct and reliable. Usually presented in the best possible way. Many of the tough questions in GATE come from the examples/exercises given in standard books.
- Disadvantages: Some people not good in English find it tough to follow standard books. I guess those people can try improving English and try to learn more from the examples given in text.
- What all to study?: You should know which all chapters are relevant for GATE. There is no point in reading and understanding every line of the text. You should just need to know what is important- usually what is important is those which are needed to solve example questions. Also, to understand the standard definitions given. To summarize, you should know:
- All the chapters relevant for GATE – say in Cormen, only about 20% pages are in GATE syllabus.
- All the sub-headings in chapters relevant for GATE.
- If a portion is in GATE, you should know to work out the given example in the text – for example constructing LALR parsing table construction in Dragon book though this constructing has never been asked in GATE. But if you have solved it once, you can answer many related questions which do come in GATE.
- Exercise questions – you can follow and come and go approach towards them. There is no need to solve all of them. Also, usually ‘*’ questions are not needed for GATE. I suggest to solve example questions, then previous GATE questions and some exercise questions.
- Once again, never follow local author book. I had followed one for Discrete Mathematics during B.Tech. and I could not even get 1 question correct in GATE. This is also said by most toppers. If you are strong in a subject (like being a good C programmer or good in Databases), you may avoid reading standard text book- but never read sub-standard materials and corrupt your knowledge.

- Video Lectures: This is recommended for those doing bachelors or those seeing a subject first time. If you have a reasonable depth in a subject and can follow the text, then no need of watching video lectures. That is most of these videos are meant to make a base of the subject. Same thing is applicable for Courses.
- Test Series: When I gave my GATE I had given no test series. Even many toppers 5-6 years ago hardly gave any test series. But it is the fashion nowadays. Every one wants to give ans so you also can give them, but before giving any do these:
- Solve all previous year GATE questions.
- When a concept is repeated in a question and you know it, no need to solve again.
- GATE official keys are available only from 2011 on wards. So, while solving please do not corrupt your knowledge with some wrong explanation given somewhere. If the explanation given anywhere is not satisfying your knowledge based on standard material, then consider it wrong until proven right by someone. You can ask your queries on GATE Overflow where all previous year GATE questions are there.
- GATE IT questions are also good and recommended as they are of same quality as CSE ones.
- If you need more questions do from previous year TIFR, ISI, CMI papers which are of very good standard. Also if you have more time more standard book questions can be solved. New Gradiance is a very good site for standard questions.
- Now, in the end you need to not only know the subject but also need to practice solving 65 questions in best possible way for GATE. For this you can use any test series. Previous year papers are available in GATE Overflow which can give this experience. Some test series given here are reasonable but you should not spend more time on them. This is anyway just for the finishing touch after covering subjects properly. And many of the test series have plenty of mistakes. Mistakes in answer key is fine as long as you know it, but mistake in question is bad as it corrupts a student’s knowledge. Questions for one of the prominent test series last year was made by M.Tech. students from a private engineering college. Those who are smart enough know to avoid them.

- GATECSE: This contains all the resources from gatecsewiki and contributes by GATECSE FB group. There is a schedule for GATE 2017 preparation and after this there will be some revision help like discussions done last year. All the discussion archives and useful weblinks are on the respective Subject pages.
- GATE Overflow: Has more than 11k questions as of now. But do not get confused. For GATE preparation you just need to focus on previous GATE questions and if you want there is a GATE only mode in GATE Overflow which hides all other questions. You can enable it here. Currently GATE Overflow has all the previous GATE CS/IT, TIFR, CMI, ISI, ISRO questions relevant for CSE and UGC NET questions are also getting added. The exam interface will allow you to practice any previous exam. In 1-2 months more features will be there – cannot comment now as I’m still working on them.
- Even after all topics are covered from standard resources some questions for GATE are tricky to solve. Cache-Virtual memory, TM decidability, digital logic, pipeline etc. are some examples. These are solved in GATE Overflow and are useful for GATE preparation
- One of the sad part of GATE Overflow is aspirants asking bad questions. Most of these are taken from some coaching material which again has no standard. Again I request you all to please follow standard materials for questions and not these stuffs. This year, more priority will be given to genuine doubts and queries from standard books and less for those copied from coaching material
- GATE Overflow is not providing any coaching. It is an interface for students to clear their doubts. So, one should have studied to have doubt. Do not think that spending time on GATE Overflow will get you a good rank. Like the 30% rule, do not spend more than 30% of your preparation time on GATE Overflow at least until you have covered most topics for GATE
- Most importantly do realize that questions are never ending. There are infinite Finite Automata and so there are infinite questions that can be asked on regular expressions. Please do not try to solve all of them, as this won’t take you anywhere. This is a mistake seen with those preparing from GATE materials.

6,157 total views, 2 views today

## Is solving previous year questions enough?

## Enough for?

It is enough to surely get 30-50 marks but that won’t get you even to an NIT unless you have some reservation. If you carefully read the below points you can get higher marks.

## How to solve?

Getting answer to the previous year GATE questions takes you nowhere as in GATE questions RARELY do get repeated. But in many topics, same type of questions get asked. One example is cache memory from CO & Computer Architecture subject. If you know properly to solve one question from this topics, you can solve many similar ones. And if you are seeing someone’s solution, make that your own by really understanding each and every step. You should never byheart someone’s solution as in most times they will just backfire in GATE.

So, if you are solving a previous paper and if you don’t know an answer, first look in a standard resource (either standard text book or resource given by some top university) and understand the topic. If you still can’t get an answer show your solution to someone and understand where you went wrong. Only if it is unavoidable check someone else’s solution. Also realize that the first few problems of a subject should take a LOT LOT more time to solve than the rest because those should be cementing your concepts as well.

## I know to solve all previous year GATE questions. Will I get into top 100?

If you really know the proper way to solve the previous GATE questions you have a high chance of getting into top 100. You should be able to get at least 80 marks from them and usually 60+ is enough for a good rank (if exam is easy this can go up to 70+ as happened in 2011). But this means you shouldn’t make any mistakes while reading the questions and interpret all questions properly- no space for silly mistakes. To get into the safe space of 90+ you have to understand the topics properly. One example is Database Normalization. If you know how to identify the keys from Functional Dependencies and able to identify the Normalization level, you can answer most (almost 90%) of the questions from this area. But to guarantee 100%, you need to understand what is normalization and why is it done, what is the significance of Functional dependencies etc.

## Understand the concepts- what does this mean?

One example is “what is the complexity of merge sort?”. If you know it is O(nlogn)O(nlogn) then it is not enough for GATE. You must know how that O(nlogn)O(nlogn) is the **TIGHTEST** upper bound for the complexity of merge sort and **HOW** that came. In short those making GATE questions know that people will be by hearting these complexities and they will make sure the question is twisted and only those who know how to derive the complexity can answer that.

## Can I understand all concepts?

Probably no. But do as much as you can and especially do understand the concepts in Algorithms and Data structures- they are the subjects where the questions are usually twisted. I have seen many people leaving Theory of Computation for preparation. But that is not a good idea. Usually questions from TOC are asked quite a bit for GATE. And these questions are easily answerable if you have studied till Turing machines and reduction. Practise do help in TOC as questions come only from a small class of problems.

## How many papers should I solve?

There are people who got top 100 even without solving a single previous year paper. So, even 1 is enough. For those who have good grip in the subjects, solving three papers of GATE 2014 is enough. If you have time you can solve papers from 2010 on wards. Only for those who prepare solely from previous GATE papers, I encourage to solve papers before 2010. And I have found that many questions from 1991-1998 to be bit tough. And many of the topics asked then are not in syllabus now. So, please be aware of these while solving those papers.

8,670 total views, 2 views today

## Which of the following logic statements are valid?

Predicate logic formulas without quantifiers can be verified using derivation. But when it comes to first order logic (predicate logic with quantifiers), the simplest way is to apply logical reasoning. Most of these questions asked will be for very small formulas and we can easily apply logical reasoning to check if they are valid. The method is to convert the logical formula into its corresponding English meaning. This is shown in the following examples:

## 1. Which of the following predicate calculus statements is/are valid?

**(1) $\forall (x) P(x) \vee \forall(x)Q(x) \implies \forall (x) (P(x) \vee Q(x))$**

(2) $\exists (x) P(x) \wedge \exists (x)Q(x) \implies \exists (x) (P(x) \wedge Q(x))$

(3) $\exists (x) (P(x) \vee Q(x)) \implies \forall (x) P(x) \vee \forall (x) Q(x)$

(4) $\exists (x) (P(x) \vee Q(x)) \implies \sim \forall (x) P(x) \vee \exists (x) Q(x)$

### Solution

(1) The corresponding English meaning: If $P(x)$ is true for all $x$, or if $Q(x)$ is true for all $x$, then for all $x$, either $P(x)$ is true or $Q(x)$ is true. This is always true and hence valid. To understand deeply, consider $X = \{3,6,9,12\}$. For LHS of implication to be true, either $P(x)$ must be true for all elements in $X$ or $Q(x)$ must be true for all elements in $X$. In either case, if we take each element $x$ in $X$, either one of $P(x)$ or $Q(x)$ will be true. Hence, this implication is always valid.

(If still in doubt, let $P(x)$ mean $x$ is a multiple of $3$ and $Q(x)$ means $x$ is a multiple of $2$)

(2) The corresponding English meaning: If $P(x)$ is true for at least one $x$, and if $Q(x)$ is true for at least one $x$, then there is at least one $x$ for which both $P(x)$ and $Q(x)$ are true. This is not always true as $P(x)$ can be true for one $x$ and $Q(x)$ can be true for some other $x$ . To understand deeply, consider $X = \{3,6,9,12\}$. Let $P(x)$ be $x$ is a multiple of $9$ and $Q(x)$ be $x$ is a multiple of $6$. Now, LHS of implication is true, since $P(x)$ is true for $x = 9$, and $Q(x)$ is true for $x = 6$. But RHS of implication is not true as there is no $x$ for which both $P(x)$ and $Q(x)$ holds. Hence, this implication is not valid.

(3) If there is at least one $x$ for which either $P(x)$ is true or $Q(x)$ is true then $P(x)$ is true for all $x$ or $Q(x)$ is true for all $x$. Just one read is enough to see this is an invalid implication.

(4)If there is at least one $x$ for which either $P(x)$ or $Q(x)$ is true then either it is not the case that $P(x)$ is true for all $x$ or $Q(x)$ is true for at least one $x$. This is clearly invalid as LHS of implication becomes true if $P(x)$ is true for some $x$ and $Q(x)$ is not true for any $x$, but RHS will be false.

A little modification to the statement is enough to make it valid:

$$\exists (x) (P(x) \vee Q(x)) \implies \sim (\forall (x) \sim P(x)) \vee \exists (x) Q(x)$$

which means if there is at least one $x$ for which either $P(x)$ or $Q(x)$ is true then

either it is not the case that $\sim P(x)$ is true for all $x$ (which means P(x) is true for some $x$) or $Q(x)$ is true for some $x$.

## Note

De Morgan’s law is applicable in first order logic and is quite useful:

$$\forall(x)(P(x)) \equiv \neg \exists (x)(\neg P(x))$$

This is a logical reasoning statement which means if $P(x)$ is true for all $x$, then there can never exist an $x$ for which $P(x)$ is not true. This formula is quite useful in proving validity of many statements as is its converse given below:

$$\exists(x)(P(x)) \equiv \neg \forall (x)(\neg P(x))$$

10,489 total views, 11 views today

## Number of Binary trees possible with n nodes

## What is the no. of distinct binary trees possible with n labeled nodes?

### Solution

For a binary tree with $n$ nodes, the no. of edges is $n-1$. So, this problem can be reduced to the no. of ways in which we can make $n-1$ edges from $n$ vertices. An edge can be made either as a left child of a node or as a right child. Hence, for $n$ nodes, we have $2n$ possibilities for the first edge, $2n-1$ for the second edge and so on. Thus, for $n-1$ edges, the total no. of ways

= $2n \times (2n-1) \times (2n-2)\times ….\times (2n – (n – 2))$

= $2n \times (2n-1) \times (2n-2) \times …. \times (n + 2)$

=$ \frac{(2n)!} { (n+1)!}$

## What is the no. of distinct binary trees possible with n unlabeled nodes? (No. of structurally different binary trees possible with n nodes)

### Solution

If the nodes are similar (unlabeled), then the no. of distinct binary trees will be the above value divided by the no. of distinct permutations possible for a binary tree structure, which will be $n!$ for a tree with $n$ nodes.

$ \frac{(2n)!} { (n+1)! n!}$

=$\frac{2nCn}{n+1}$

(This is the $n^{th}$ Catalan number)

## What is the no. of distinct binary search trees possible with n nodes?

### Solution

Counting the no. of distinct binary search trees possible for n nodes, is similar to counting the no. of distinct binary trees possible for n nodes assuming nodes are unlabeled. Hence, this value will also be

=$\frac{2nCn}{n+1}$

($n^{th}$ Catalan number)

Alternatively, for each valid binary search tree, we can get $n!$ binary trees by permuting the vertices, of which only 1 permutation is a$BST$. Hence, the total no. of binary search trees possible with $n$ nodes will be

$\frac{\text{No. of distinct binary trees with $n$ distinct nodes}} {n!}$

= $ \frac{(2n)!} { (n+1)! n!}$

=$\frac{2nCn}{n+1}$

($n^{th}$ Catalan number)

(We can also use the fact that for a given tree structure, there can be only 1 $BST$. Hence, no. of different $BST$s with n nodes will be equal to the no. of different binary tree structures possible for n nodes)

30,043 total views, 12 views today

## P, NP, NP-Complete, NP-Hard

It might be because of the name but many graduate students find it difficult to understand $NP$ problems. So, I thought of explaining them in an easy way. (When explanation becomes simple, some points may be lost. So, please do refer standard text books for more information)

## $P$ Problems

As the name says these problems can be solved in polynomial time, i.e.; $O(n)$, $O(n^2)$ or $O(n^k)$, where $k$ is a constant.

## $NP$ Problems

Some think $NP$ as Non-Polynomial. But actually it is Non-deterministic Polynomial time. i.e.; “yes” instances of these problems can be solved in polynomial time by a non-deterministic Turing machine and hence can take up to exponential time (some problems can be solved in sub-exponential but super polynomial time) by a deterministic Turing machine. In other words these problems can be verified (if a solution is given, say if it is correct or wrong) in polynomial time. Examples include all P problems. One example of a problem not in $P$ but in $NP$ is Integer Factorization.

## $NP$ Complete Problems$(NPC)$

Over the years many problems in $NP$ have been proved to be in $P$ (like Primality Testing). Still, there are many problems in $NP$ not proved to be in $P$. i.e.; the question still remains whether $P = NP$ (i.e.; whether all $NP$ problems are actually $P$ problems).

$NP$ Complete Problems helps in solving the above question. They are a subset of $NP$ problems with the property that all other $NP$ problems can be reduced to any of them in polynomial time. So, they are the hardest problems in $NP$, in terms of running time. If it can be showed that any $NPC$ Problem is in $P$, then all problems in $NP$ will be in $P$ (because of $NPC$ definition), and hence $P = NP = NPC$.

All $NPC$ problems are in $NP$ (again, due to $NPC$ definition). Examples of $NPC$ problems

## $NP$ Hard Problems $(NPH)$

These problems need not have any bound on their running time. If any $NPC$ Problem is polynomial time reducible to a problem $X$, that problem $X$ belongs to $NP$ Hard class. Hence, all $NP$ Complete problems are also $NPH$. In other words if a $NPH$ problem is non-deterministic polynomial time solvable, it is a $NPC$ problem. Example of a $NP$ problem that is not $NPC$ is Halting Problem.

From the diagram, its clear that $NPC$ problems are the hardest problems in $NP$ while being the simplest ones in $NPH$. i.e.; $NP ∩ NPH = NPC$

### Note

Given a general problem, we can say its in $NPC$, if and only if we can reduce it to some $NP$ problem (which shows it is in NP) and also some $NPC$ problem can be reduced to it (which shows all NP problems can be reduced to this problem).

Also, if a $NPH$ problem is in $NP$, then it is $NPC$

6,525 total views, 3 views today

## Chapter 1:C program – A System View

I assume that all of you would have got the setup of running a C program ready. Some clarifications on my previous instructions:

- Turbo C is a 16 bit compiler made for MS−DOS. Some school student may say that it’s easy to start with but I say it is difficult to program in Turbo C. Now, we are living in the world of 64-bit compilers and so we should learn to program for that.
- Why linux? Absolutely no need to use linux for learning C. But I would like to give an overview of the whole computer system (in this chapter itself), and it would be based on linux. As a computer science student if you don’t know how to use linux, you are like a purse without money. So, start using at least now.
- Why AWS? It is not needed if you are having some linux distribution on your machine. But otherwise it is a very good idea to use AWS. It gives a shell on a linux system and you have full control of the OS. And it is free also (for normal usage). Moreover, AWS is used by many companies, and this would be a simple exercise to get used to it.

Now, if you are having a gcc or iccicc compiler on windows, its very much okay. But just one clarification: We won’t be using the word “Turbo C” further in any of the discussions.

## What a C program does?

First of all why are we using C language? We can start from there:

### Digital Circuits

We all know that the most important thing inside our CPU is the processor. It is made up of digital components like flip-flops and those who have studied digital circuits would understand that the digital circuits produce output from the input, when supplied with power and a clock. The speed at which the output is produced is determined by the clock speed of the CPU, because the clock determines the speed of transfer of bits between different units (and that’s why a 3 GHz processor is faster than a 1 GHz processor). But this will be effective only if the processor has the input data available. (Most times there is delay for the CPU to get the input data and that’s why the actual running time of a process on a 1GHz processor is not 3 ×, compared to the same process running on a 3GHz processor.)

### Computer Organization

The reason for the above problem is that data is given to processor from memory and the time to take a data from memory to processor is like 100 ×, the speed at which the processor works. So, we use many techniques like buffering, caching etc. to minimize this effect.

Okay, so now our aim is to give data to the CPU and it has these circuits called Functional Units to perform the specified tasks. Each functional unit does some job like addition, multiplication etc. and they give the result when provided with the input(s). But these input and output are in binary, as all these units are digital. That is, the input to CPU will be a series of 00‘s and 11‘s and the output will also be a series of 0‘s and 1‘s. So, what happens to the CPU when we give some string of 00‘s and 11‘s? Not all such strings will produce a valid output and this is entirely dependent on the processor. The processor manufacturer clearly specifies what’s the meaning of each combination 0‘s and 1‘s and that is called the language of the processor which is entirely determined by its architecture.

### Computer Architecture

Most of our systems are ×86 architecture and it has its own Instruction set. So, lets take an example string of 0‘s and 1‘s in it:

1 |
00000101 00000000 00000000 00000000 00000001 |

This set of strings will add 1 to the content of EAX register (a register is a very fast memory inside the processor for holding data, and EAX is one among them in x86 architecture) which is a 32-bit register . The first byte is 00000101 which is given to the Instruction decode unit inside the processor which tells the CPU that it must add the next 32 bits to the contents of EAX register. Now, the next 32-bits will be given to the ADD unit which will add it to the contents of EAX register. In our example, the 32 bits represents just 1 and so the addition results in an increment of 1.

[Small question: Instead of ADD, if we use INC instruction, it results in better performance. How?]

So, this is how the CPU works- everything is in binary. We can get the meaning of each binary string from the Intel Instruction manual

To make things slightly easier they encode the bit-strings as HEX codes. So, the above bit string will become

1 |
05 00 00 00 01 |

Even then, it is difficult to write a program like this. Because human mind is not good at remembering numbers. So, then came Assembly language. Here, we use mnemonics to represent each operation. For example ADD is the mnemonic to do addition, SUB is the mnemonic to do subtraction etc. So, instead of the above binary string, now we can write

1 |
ADD EAX, 01 |

and the assembler will translate it into

1 |
05 00 00 00 01 |

Ahh! Much easier world for a programmer. But imagine writing an assembly program to print the factorial of n. How much time is needed to write it using these kinds of mnemonics, for each operation in the algorithm? Wouldn’t it be better if we say the algorithm and then that is translated to binary string by <someone>? Yes, that’s where C language comes. We can straight away represent most algorithms in CC, and the CC compiler will translate it into the binary string in the same way an assembler would do for assembly language.

So, lets write the CC code for the above addition.

1 2 |
int a; a = a + 1; |

This will do the same job as

1 |
ADD EAX, 01 |

assuming a is the value we had in EAX.

Now, to start executing a program we need an entry point to the code. This is often named as main. The program starts executing from the first instruction inside main. So, to make our CC code complete, we do the following

1 2 3 4 5 6 |
#include<stdio.h> int main () { int a; a = a + 1; printf(" a = %d\n", a); } |

For now lets assume that the printf statement prints the value of a. But, CC language has a restriction that before any variable is used, its type must be specified. So, before using printf, we must tell its type. Its type is written in a file called ‘‘stdio.h“ so we can include that file (which will make all the contents of that file as part of our file) or we can just give the correct type of printf as

1 |
int printf(const char *, ...); |

Directly writing the declaration of printf is not recommended and I just gave it to show the functionality of #include<stdio.h>. Many people still think that code of printing is inside ‘‘stdio.h“‘ and that’s completely wrong. Code of printf is part of standard C library which is available as libc (there must be a file called libc.so in linux and printf code is inside that). The usage of libc.so file is that the same code can be used by many programs (all linking to the same library code) so that reduces the main memory required to run the programs.

So, this usage of sharing libc saves the total memory required when these 4 programs are concurrently executing. (If you want to see how many processes are executing at this moment on your system, just type top in a shell).

By default gcc will link to any function inside libc, if we call them in our program. But if we use any other library function, we have to explicitly tell gcc to link to that library. For example, to use sin(x) in a code we have to link to math library (libm) as follows:

1 2 |
gcc prog.c -o prog -lm (l is written instead of lib, so libm becomes lm, libc becomes lc ...) |

Once we compile the code gcc will be producing the output in a file called prog which is given with the −o option. If we don’t give any −o−o option, output by default goes to a file called a.out. This will be in binary format and we cannot see it as text. This binary contains the bitstrings to be given to the processor as we discussed in the beginning. But some codes like that of printf is not inside this binary and is at a common location, which is called by our binary. Can we make copy the printf code and other library functions to be inside our binary? Yes, we can with the following command:

1 2 |
gcc prog.c -o progS -lm -static (progS is just a different name) |

Now, just see the size difference of the two binaries using ls command

1 |
ls -l prog |

Now, to get the output by running the executable, we have to do

1 2 |
./prog (./ just tells that prog is in the current directory) |

Once the binary is produced by the compiler, before we get the output, there are many stages:

- Loading: Copying the content of the binary file to memory
- Linking: Fixing the calls in the binary which are to shared libraries as in the case of printf
- Process starts: Now the OS makes a process for our program (it gets a pid) and it’ll be in ready state.
- When the turn comes, our process will get executed (it can be stopped in between to give other processes their turn)
- When our process is being executed, the binary strings inside it (which are instructions to the processor) are send one by one to the processor, which executes them
- Memory Management: For all the memory required by the process, the Memory Management Unit (MMU) ensures that the memory addresses used inside the object code (which are virtual addresses) are properly mapped to physical memory locations on the RAM

So, even after the compilation (which of course includes its own phases) there are so many phases before we get the output of a CCprogram.

We’ll stop this chapter after mentioning about how we get segmentation fault in our programs.

## Segmentation Fault

When a process is made by the OSOS, it allots some memory to it. This can be increased during its execution, upon request to the OSOS, and can go up to a limit set by the OSOS. So, when this process goes to execution state, it can only access the memory allotted to it. (This is done by giving a pagetable to each process and all memory accesses are done through it). Whenever a process tries to access a memory which is not allotted to it, segmentationfault occurs. Segmentation fault also occurs, if a process tries to write something to a read only memory area. For example, a program memory consists of many parts called segments and there are code segment, data segment and stack segment. Of these, the data segment is again divided into Read Only (RO) data segment and Read Write (RW) data segment. Among these segments only the RW data segment and stack segment are allowed to be modified by a process. (Some systems allow code segment also to be writable and can be used for writing self modifiable code) If a process tries to modify any other segment, then also segmentation fault happens. (Segmentation fault also happens due to some special hardware instructions, but we can ignore them as this won’t happen for general programs compiled in a normal way.)

In this first chapter we have skimmed across compilers, memory management, process management, computer organization and computer architecture, which covers the basics of a Computer System. So, in order to run a very simple program itself we require all these. If you understand the basic functioning of these topics, that will be enough for an exam like GATE. From next chapter onward, we’ll go inside C.

1,765 total views, no views today

## IISc- what’s different from IITs?

When I joined for IISc, I didn’t have a second thought. But nowadays people are really confused about IISc and IITB. So, just thought of sharing some information about IISc.

## Pros

- IISc is the premier research institute in India. So, expect the best faculties here though not everything that glitters is gold.
- Being research intensive, almost every topic being taught is of latest standard. You won’t see outdated contents anywhere in IISc.
- Many exams are for testing the knowledge of students. Last day study hardly works. But this is called learning.
- Though there are not much stats available, placements in IISc CSA dept are the best in India ignoring International placements. But a handful of students do get placed internationally via offcampus.
- IISc profs would happily recommend you for Ph.D. postions abroad and you can get a well funded Ph.D. position.
- IISc campus is one of the best if not the best in India.
- No TA duty and this time can be used for personal skills development
- More freedom for students, can take individual net connection, bring own bike/car etc.
- More stress on practicals at the same time less stress on implementation.
- Most popular on Machine Learning, Theoretical Computer Science, Compilers and Architecture, Databases, Information Retrieval, Game Theory and Programming Languages.

## Cons

- Not much to say compared to any other Indian Universities. 1-2 profs are not IISc standard and you can easily know this while talking to seniors.
- Being an old Institute politics is there but fortunately CSA dept is pretty clean.
- CSA dept is not doing research in all CS areas and for areas like Distributed and Cloud Computing students have to go to SERC.

5,622 total views, 2 views today