GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Placement Papers  >  Microsoft
Go To First  |  Previous Question  |  Next Question 
 Microsoft  |  Question 2 of 14    Print  
Microsoft Database Written Test Questions
Databases

* 1. You, a designer want to measure disk traffic i.e. get a histogram
showing the relative frequency of I/O/second for each disk block. The
buffer pool has b buffers and uses LRU replacement policy. The disk
block size and buffer pool block sizes are the same. You are given a
routine int lru_block_in_position (int i) which returns the block_id of
the
block in the i-th position in the list of blocks managed by LRU. Assume
position 0 is the hottest. You can repeatedly call this routine. How
would you get the histogram you desire?

Hints and Answers

1. Simply do histogram [lru_block_in_position (b-1)] ++ at frequent
intervals... The sampling frequency should be close to the disk I/O
rate.
It can be adjusted by remembering the last block seen in position b. If
same, decrease frequency; if different, increase, with exponential
decay etc. And of course, take care of overflows in the histogram.

Semaphores

1. Implement a multiple-reader-single-writer lock given a
compare-and-swap instruction. Readers cannot overtake waiting writers.



  
Total Answers and Comments: 0 Last Update: November 11, 2005     Asked by: Beena 
  
 Sponsored Links

 

No answers are posted for this question yet.
Be the first to answer it!


 Related Questions

Computer Architecture1. Explain what is DMA? 2. What is pipelining? 3. What are superscalar machines and vliw machines? 4. What is cache? 5. What is cache coherency and how is it eliminated? 6. What is 
View Question | Asked by : Beena

Databases* 1. You, a designer want to measure disk traffic i.e. get a histogram showing the relative frequency of I/O/second for each disk block. The buffer pool has b buffers and uses LRU replacement 
View Question | Asked by : Beena

Java1. How do you find the size of a java object (not the primitive type) ? ANS. type cast it to string and find its s.length() 2. Why is multiple inheritance not provided in Java? 3. Thread t = new Thread(); 
Latest Answer : . Why is multiple inheritance not provided in Java? 3. Thread t = new Thread(); t.start(); t = null; now what will happen to the created thread? 4. How is garbage collection done in java? 5. How do you write a "ping" routine in java? 6. What are the security ...
Read Answers (1) | Asked by : Beena

1. How do you use RSA for both authentication and secrecy?2. What is ARP and how does it work?3. What's the difference between a switch and a router?4. Name some routing protocols? (RIP,OSPF etc..)5. 
Latest Answer : What is ARP and how does it work?Defination:ARP (Address Resolution Protocol) is a protocol for mapping link layer addresses to a physical machine address that is recognized in the local networkWorking:When a host wants to send a packet with to a known ...
Read Answers (1) | Asked by : Beena

Algorithms and Programming1. Given a rectangular (cuboidal for the puritans) cake with a rectangular piece removed (any size or orientation), how would you cut the remainder of the cake into two equal 
Latest Answer : Let us start from 2D object!Take a rectancle R, of any size. A point that is obtained by intersecting the two diagonals be (x,y).any line that passing through this point (x,y) divides the rectangle R equally.Similarly take an another rectangle R', ...
Read Answers (12) | Asked by : Beena

PersonalityIt is best to read some website or a book for questions like these. 1. Tell me the courses you liked and why did you like them. 2. Give an instance in your life in which you were faced with 
Latest Answer : I think you should know all development and research centers across the globe. Like I dint know there is one research center in Beijing. During Lunch interview I was asked how much did I know about microsoft work and their centers. I told them about cambridge, ...
Read Answers (1) | Asked by : Beena

Puzzles, Riddles and Others0. Classic: If a bear walks one mile south, turns left and walks one mile to the east and then turns left again and walks one mile north and arrives at its original position, 
Latest Answer : WRONG !probability n that case will be = 1/2(1) + 1/2( 49/99) ...
Read Answers (13) | Asked by : Beena

1)Given two sorted linked lists list1,list2. Combine the two list into a new sorted list with our creating new nodes.-All give the test case for testing the same2)You have to count the occurances of all words in a document. You are given a method chat * GetNextWord, that returns the next word from the document.- Which datastructure can be userd to achieve this- Write a algorithm for the same- What is the order of the above algorithm
Read Answers (3) | Asked by : Jyotsna

Given two sorted single linked lists list1,list2 write a algorithm to merge the two lists again in sorted order. No new nodes should be created.- Also give all the test cases for testing this algorithm
Read Answers (1) | Asked by : reddymjr

1.OUTPUTmain(){int j=32242,k;k=find(j);}int find(int j){if(j>0){j=(j%10)+find(j/10);printf("%d",j);}return j;}A: 3 5 7 11 132.function add a line and return input string..what is the problem 


 Sponsored Links

 
Related Articles

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

Performing XSLT Transformations inside the Database

Performing XSLT Transformations inside the Database Now that you have the employees XSL stylesheet stored in the database and the xmlusr schema is permitted to access the hr employees table you can create a script that will instruct the database to build an HTML page based on the data stored in hr e
 

Moving All the XML Processing into the Database

Moving All the XML Processing into the Database In the preceding example the database server performs only a part of the XML processing while the rest is still performed by the PHP engine Specifically the database server generates an employees XML document based on the records from the hr employees
 

Performing XML Processing inside the Database

Performing XML Processing inside the Database When building XML enabled applications on top of Oracle there are many advantages to performing the XML processing inside the database when compared to performing it on the client The key advantages to perform XML processing inside the database are as fo
 

What is Operational Database

Operational Database is the database-of-record, consisting of system-specific reference data and event data belonging to a transaction-update system. It may also contain system control data such as indicators, flags, and counters. The operational database is the source of data for the data warehouse
 

Evolution of database systems

The Evolution of Database systems File Management System Hierarchical database System  Network Database System  Relational Database System File Management System: The file management system also called as FMS in short is one in which all data is stored on a singl
 

Database Concurrency and Reliability

Database Concurrency and Reliability Overview Concurrency and reliability have long been “hot topics” of discussion among developers and users of distributed systems. The fundamental problem can be seen in a simple example, as follows. Suppose two users are working on the same
 

Database Interaction

Database Interaction Efficient interaction, efficient storage, and efficient processing are the three key properties of a successful database platform. In this article, we explore the first: efficient interaction. Interaction Category 1: Command Line Clients Many database platforms are shipped with
 

Database Systems

Early Databases In the 1960s, the System Development Corporation, one of the world’s first computer software companies and a significant military technology contractor, first used the term “data base” to describe a system to manage United States Air Force personnel. The
 

Related Categories
Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape