Sei sulla pagina 1di 3

#

gagan
guest
Posted 2 months ago #
What is the concept of micro kernel architecture
#
Venki
Member
Posted 2 months ago #
Keep minimal functionality in the kernel and implement required other functional
ities as pluggable modules.
For example, kernel can export services for scheduling, memory management (memor
y mapping or MMU, allocating memory for kernel objects, virtual memory, swapping
, etc.), minimal IPC services, synchronization services, driver framework, etc..
. as part of kernel. Other components are implemented as loadable modules.
-----------------
1.
gagan
guest
Posted 2 months ago #
How interrupts are handled in operating system
2.
Venki
Member
Posted 2 months ago #
Interrupts are asynchronous events usually used to interface peripherals.
The OS provides API to map interrupt handlers as per needs of application progra
m.
For example, when IO device is ready, it will interrupt the processor to r
ead/write data. The handler associated with the interrupt will do the intended f
unctionality. The handler runs in the context of thread in execution.
3.
VN
guest
Posted 2 months ago #
There will be a interrupt polling process which keeps polling for the inte
rrupt (which might be indicated by a HW register) . When the bit corresponding t
o the interrupt is set, the polling process picks it up and an interrupt service
routine is called .
==============================

Virtual memory is different from Virtual Address Space (VAS). There are operatin
g systems without virtual memory, yet support virtual address space. VAS avoids
generation of absolute addresses for program variables. VAS along with MMU helps
compiler to work with entire VAS i.e. 4 GB. At run time only portion of physica
l address space is mapped to this program VAS.
Virtual memory is to enhance memory capacity of system by means of virtual RAM (
disk). The olden day concept analogues to Virtual Memory is Overlays. VM makes e
asy to deal with data files larger then RAM.
----
virtual memory & vas are related
process get 4gb virtual space ..it is nothing but gets a pagetable that can hold
page address of total 4gb memory
in which 2gb process on usage & 2gb for os dll's like gdi.ll,kernel32.dll..etc
cpu generate 32 bit logical address
cr3 register conatain address of pagedirectory
left most 10 bit ..index to pagedirectory....get the pagetable address
next 10 bit ...index in to page table ...get the phsical frame address
now remaing 12 bits ..index in to frame ..get the exact instruction
now fatch the entire block in to memory

-----------------
I have taken the adobe written test and these are the sample questions they used
to ask.
There are 4 written tests.
1. Aptitude:(Multiple choice paper)very simple geometry & algebra. 1 minute per
question.properties such as sum of angles of a triangle etc.for attempting the f
irst part:There are 2 columns and if entry in column a is greater than b then ti
ck: a if entry in column b is greater tick:b if both are equal tick: c\ if canno
t determine: d
jaisey ki they will give u a right angle triangle with 2 angles X & Y and third
is ofcourse 90.now in the 2 columns they might right x , y respectively. Then si
nce it cannot be determined which is greater so the answer would be d.
Some algebra like ki jo questions bachpan mein kiye they... linear equations ban
a kar ho jaatey hain jo.
There are 42. Analytical:(Multiple choice or one word answer type) puzzles. Be a
nalytical in this paper relax and try to make some meaningful diagrams out of th
e questions or something and you would be able to solve it.
3. c/c++ or Java (choice)Writing code.Since I gave the c/c++ paper I know only t
hat:1. write a recursive program that prints: 1, 1, 2, 3, 5... (upto n terms whe
re n is the input). This is fibonacci series.2. write a program for breadth firs
t search of a graph. bfs(Graph *g, int currentIndex, NodeValue value ) //note Gr
aph is actually a structure containing the adjacency matrix and data about the g
raph. (typedefed), value is the element being searched. current index is the ind
ex the search is on. assume 0 to be the root node.
{
// assumed taking a visit matrix of size g->NumberOfNodes X g->NumberOfN
odes.
std::queue q;
q.push_back(0); // 0 is the index of root. pushing in root.
while (!q.empty())
{
currentIndex = q.front();
q.pop();
visit[currentIndex] = 1;
visitNode(currentIndex, value); // do whatever.
for (i = 0; i <>NumberOfNodes; i++)
{ // visit all children of currentNode.
if (g->adj_matrix[currentIndex][i] == 1 && visited[i] ==
0)
q.push_back(i);
}
}
}
4. Engineering:-Giving reasons for answers is compulsory.
Automata Theory: Simple DFA... like make a dfa that accepts even number of a's a
nd odd number of b's. NOthing more than DFA is asked.Searching/Sorting : all kin
ds of searching and sorting.
DataStructures: Tree traversals. pre-order in-order post order.Sample question:
given a pre-order and in-order traversal draw the tree.
Complexity: big-O notation only. Sample questions: write an algorithm to find an
element in a sorted array and also derive its complexity.
what is the complexity of following code:-for (i =0; i< n; i++) for (j =0 j < i;
j/=2) { .... }
Answer: I think it should be n log(n). what do u say?

Test:
1. Write an algo whihc calculates X pow m in O(log n) time
2. what this function is doing F(a,) return 0 if b > a return F((a-b),b) else
3.See the following and answer if (a>b) 25%and (B>c) 75% how many times the foo_
2() will be called if the program is executed 5000 times. if(a>b) { foo_1(); } e
lse { if(b>c){ foo_2(); } }
4.invert all odd bits of a number
5.invert 20th bit of a number
6. for 100 sorted elements array
a. what will be avg complexity of searching an element in the array
b. write a code for searching an element
7.write strindex(char *c,char*t) whihc finds the rightmost index of t in c
8.write some preprocessors in C
9.what does sizeof returns
10 write a function prototype which returns a char * and takes a function pointe
r which returns void* and takes int and char * as input11.write prototype of pri
ntf function
12.write a DFA which accepts aabb*.
13.create a tree for which inorder and preorder traversal is given
14.insert a node at pth position from end of a list in O(n) time.
15.what is B+ tree.wrtie a algorithem for following 1.given an array of 100 elem
ents and the numbers in the array are in the range from 0-9 what will be complex
ity of your algo
16.write algo of Binary search
17.print 1 1 2 3 5 8 13 without using recursion.
18.write string reversal algo and derive the complexity also.
2 examples of preprocessor directive
use of preprocessor flag
WAP (write a program) to find whether a given no is a power of 2 using
bitwise operators.
why there is no virtual static function?
you have allocated a big chunk of memory. Now write your mymalloc and
myfree func to use this memory only.
you have one big unsorted file in hard disk, which is bigger than your
RAM size. Now WAP to sort this file

Potrebbero piacerti anche