Friday, August 24, 2007


O operating Systems


Following are a few basic questions that cover the essentials of OS:


  1. Explain the concept of Reentrancy.

It is a useful, memory-saving technique for multiprogrammed timesharing systems. A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period. Reentrancy has 2 key aspects: The program code cannot modify itself, and the local data for each user process must be stored separately. Thus, the permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program. Each execution instance is called activation. It executes the code in the permanent part, but has its own copy of local variables/parameters. The temporary part associated with each activation is the activation record. Generally, the activation record is kept on the stack.

Note: A reentrant procedure can be interrupted and called by an interrupting program, and still execute correctly on returning to the procedure.


  1. Explain Belady's Anomaly.

Also called FIFO anomaly. Usually, on increasing the number of frames allocated to a process' virtual memory, the process execution is faster, because fewer page faults occur. Sometimes, the reverse happens, i.e., the execution time increases even when more frames are allocated to the process. This is Belady's Anomaly. This is true for certain page reference patterns.


  1. What is a binary semaphore? What is its use?

A binary semaphore is one, which takes only 0 and 1 as values. They are used to implement mutual exclusion and synchronize concurrent processes.


  1. What is thrashing?

It is a phenomenon in virtual memory schemes when the processor spends most of its time swapping pages, rather than executing instructions. This is due to an inordinate number of page faults.


  1. List the Coffman's conditions that lead to a deadlock.

  • Mutual Exclusion: Only one process may use a critical resource at a time.

  • Hold & Wait: A process may be allocated some resources while waiting for others.

  • No Pre-emption: No resource can be forcible removed from a process holding it.

  • Circular Wait: A closed chain of processes exist such that each process holds at least one resource needed by another process in the chain.



  1. What are short-, long- and medium-term scheduling?

Long term scheduler determines which programs are admitted to the system for processing. It controls the degree of multiprogramming. Once admitted, a job becomes a process.

Medium term scheduling is part of the swapping function. This relates to processes that are in a blocked or suspended state. They are swapped out of real-memory until they are ready to execute. The swapping-in decision is based on memory-management criteria.

Short term scheduler, also know as a dispatcher executes most frequently, and makes the finest-grained decision of which process should execute next. This scheduler is invoked whenever an event occurs. It may lead to interruption of one process by preemption.


  1. What are turnaround time and response time?

Turnaround time is the interval between the submission of a job and its completion. Response time is the interval between submission of a request, and the first response to that request.


  1. What are the typical elements of a process image?

  • User data: Modifiable part of user space. May include program data, user stack area, and programs that may be modified.

  • User program: The instructions to be executed.

  • System Stack: Each process has one or more LIFO stacks associated with it. Used to store parameters and calling addresses for procedure and system calls.

  • Process control Block (PCB): Info needed by the OS to control processes.


  1. What is the Translation Lookaside Buffer (TLB)?

In a cached system, the base addresses of the last few referenced pages is maintained in registers called the TLB that aids in faster lookup. TLB contains those page-table entries that have been most recently used. Normally, each virtual memory reference causes 2 physical memory accesses-- one to fetch appropriate page-table entry, and one to fetch the desired data. Using TLB in-between, this is reduced to just one physical memory access in cases of TLB-hit.


  1. What is the resident set and working set of a process?

Resident set is that portion of the process image that is actually in real-memory at a particular instant. Working set is that subset of resident set that is actually needed for execution. (Relate this to the variable-window size method for swapping techniques.)


  1. When is a system in safe state?

The set of dispatchable processes is in a safe state if there exists at least one temporal order in which all processes can be run to completion without resulting in a deadlock.


  1. What is cycle stealing?

We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the DMA controller can use the data bus when the CPU does not need it, or it may force the CPU to temporarily suspend operation. The latter technique is called cycle stealing. Note that cycle stealing can be done only at specific break points in an instruction cycle.


  1. What is meant by arm-stickiness?

If one or a few processes have a high access rate to data on one track of a storage disk, then they may monopolize the device by repeated requests to that track. This generally happens with most common device scheduling algorithms (LIFO, SSTF, C-SCAN, etc). High-density multisurface disks are more likely to be affected by this than low density ones.


  1. What are the stipulations of C2 level security?

C2 level security provides for:

  • Discretionary Access Control

  • Identification and Authentication

  • Auditing

  • Resource reuse


  1. What is busy waiting?

The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion.


  1. Explain the popular multiprocessor thread-scheduling strategies.

  • Load Sharing: Processes are not assigned to a particular processor. A global queue of threads is maintained. Each processor, when idle, selects a thread from this queue. Note that load balancing refers to a scheme where work is allocated to processors on a more permanent basis.

  • Gang Scheduling: A set of related threads is scheduled to run on a set of processors at the same time, on a 1-to-1 basis. Closely related threads / processes may be scheduled this way to reduce synchronization blocking, and minimize process switching. Group scheduling predated this strategy.

  • Dedicated processor assignment: Provides implicit scheduling defined by assignment of threads to processors. For the duration of program execution, each program is allocated a set of processors equal in number to the number of threads in the program. Processors are chosen from the available pool.

  • Dynamic scheduling: The number of thread in a program can be altered during the course of execution.


  1. When does the condition 'rendezvous' arise?

In message passing, it is the condition in which, both, the sender and receiver are blocked until the message is delivered.


  1. What is a trap and trapdoor?

Trapdoor is a secret undocumented entry point into a program used to grant access without normal methods of access authentication. A trap is a software interrupt, usually the result of an error condition.


  1. What are local and global page replacements?

Local replacement means that an incoming page is brought in only to the relevant process' address space. Global replacement policy allows any page frame from any process to be replaced. The latter is applicable to variable partitions model only.


  1. Define latency, transfer and seek time with respect to disk I/O.

Seek time is the time required to move the disk arm to the required track. Rotational delay or latency is the time it takes for the beginning of the required sector to reach the head. Sum of seek time (if any) and latency is the access time. Time taken to actually transfer a span of data is transfer time.


  1. Describe the Buddy system of memory allocation.

Free memory is maintained in linked lists, each of equal sized blocks. Any such block is of size 2^k. When some memory is required by a process, the block size of next higher order is chosen, and broken into two. Note that the two such pieces differ in address only in their kth bit. Such pieces are called buddies. When any used block is freed, the OS checks to see if its buddy is also free. If so, it is rejoined, and put into the original free-block linked-list.


  1. What is time-stamping?

It is a technique proposed by Lamport, used to order events in a distributed system without the use of clocks. This scheme is intended to order events consisting of the transmission of messages. Each system 'i' in the network maintains a counter Ci. Every time a system transmits a message, it increments its counter by 1 and attaches the time-stamp Ti to the message. When a message is received, the receiving system 'j' sets its counter Cj to 1 more than the maximum of its current value and the incoming time-stamp Ti. At each site, the ordering of messages is determined by the following rules: For messages x from site i and y from site j, x precedes y if one of the following conditions holds....(a) if Ti<Tj or (b) if Ti=Tj and i<j.


  1. How are the wait/signal operations for monitor different from those for semaphores?

If a process in a monitor signal and no task is waiting on the condition variable, the signal is lost. So this allows easier program design. Whereas in semaphores, every operation affects the value of the semaphore, so the wait and signal operations should be perfectly balanced in the program.



  1. In the context of memory management, what are placement and replacement algorithms?

Placement algorithms determine where in available real-memory to load a program. Common methods are first-fit, next-fit, best-fit. Replacement algorithms are used when memory is full, and one process (or part of a process) needs to be swapped out to accommodate a new program. The replacement algorithm determines which are the partitions to be swapped out.


  1. In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?

For load-time dynamic linking: Load module to be loaded is read into memory. Any reference to a target external module causes that module to be loaded and the references are updated to a relative address from the start base address of the application module.

With run-time dynamic loading: Some of the linking is postponed until actual reference during execution. Then the correct module is loaded and linked.


  1. What are demand- and pre-paging?

With demand paging, a page is brought into memory only when a location on that page is actually referenced during execution. With pre-paging, pages other than the one demanded by a page fault are brought in. The selection of such pages is done based on common access patterns, especially for secondary memory devices.


  1. Paging a memory management function, while multiprogramming a processor management function, are the two interdependent?

Yes.


  1. What is page cannibalizing?

Page swapping or page replacements are called page cannibalizing.


  1. What has triggered the need for multitasking in PCs?

  • Increased speed and memory capacity of microprocessors together with the support fir virtual memory and

  • Growth of client server computing


  1. What are the four layers that Windows NT have in order to achieve independence?

  • Hardware abstraction layer

  • Kernel

  • Subsystems

  • System Services.


  1. What is SMP?

To achieve maximum efficiency and reliability a mode of operation known as symmetric multiprocessing is used. In essence, with SMP any process or threads can be assigned to any processor.


  1. What are the key object oriented concepts used by Windows NT?

  • Encapsulation

  • Object class and instance


  1. Is Windows NT a full blown object oriented operating system? Give reasons.

No Windows NT is not so, because its not implemented in object oriented language and the data structures reside within one executive component and are not represented as objects and it does not support object oriented capabilities .


  1. What is a drawback of MVT?

It does not have the features like

  • ability to support multiple processors

  • virtual storage

  • source level debugging


  1. What is process spawning?

When the OS at the explicit request of another process creates a process, this action is called process spawning.


  1. How many jobs can be run concurrently on MVT?

15 jobs


  1. List out some reasons for process termination.

  • Normal completion

  • Time limit exceeded

  • Memory unavailable

  • Bounds violation

  • Protection error

  • Arithmetic error

  • Time overrun

  • I/O failure

  • Invalid instruction

  • Privileged instruction

  • Data misuse

  • Operator or OS intervention

  • Parent termination.


  1. What are the reasons for process suspension?

  • swapping

  • interactive user request

  • timing

  • parent process request


  1. What is process migration?

It is the transfer of sufficient amount of the state of process from one machine to the target machine


  1. What is mutant?

In Windows NT a mutant provides kernel mode or user mode mutual exclusion with the notion of ownership.


  1. What is an idle thread?

The special thread a dispatcher will execute when no ready thread is found.


  1. What is FtDisk?

It is a fault tolerance disk driver for Windows NT.


  1. What are the possible threads a thread can have?

  • Ready

  • Standby

  • Running

  • Waiting

  • Transition

  • Terminated.


  1. What are rings in Windows NT?

Windows NT uses protection mechanism called rings provides by the process to implement separation between the user mode and kernel mode.


  1. What is Executive in Windows NT?

In Windows NT, executive refers to the operating system code that runs in kernel mode.


  1. What are the sub-components of I/O manager in Windows NT?

  • Network redirector/ Server

  • Cache manager.

  • File systems

  • Network driver

  • Device driver


  1. What are DDks? Name an operating system that includes this feature.

DDks are device driver kits, which are equivalent to SDKs for writing device drivers. Windows NT includes DDks.


  1. What level of security does Windows NT meets?

C2 level security.






1



Verbal

1. Depreciation: deflation, depression, devaluation, fall, slump

2. Deprecate : feel and express disapproval,

3. Incentive : thing one encourages one to do (stimulus)

4. Echelon : level of authority or responsibility

5. Innovation : make changes or introduce new things

6. Intermittent : externally stopping and then starting

7. Detrimental: harmful

8. Conciliation : make less angry or more friendly

9. Orthodox: conventional or traditional, superstitious

10. Fallible : liable to error

11. Volatile : ever changing

12. Manifest: clear and obvious

13. Connotation : suggest or implied meaning of expression

14. Reciprocal: reverse or opposite

15. Agrarian : related to agriculture

16. Vacillate : undecided or dilemma

17. Expedient : fitting proper, desirable

18. Simulate : produce artificially resembling an existing one.

19. Access : to approach

20. Compensation: salary

21. Truncate : shorten by cutting

22. Adherence : stick

23. Heterogeneous: non similar things

24. Surplus : excessive

25. Assess : determine the amount or value

26. Cognizance : knowledge

27. Retrospective : review

28. Naive : innocent, rustic

29. Equivocate : tallying on both sides, lie, mislead

30. Postulate : frame a theory

31. Latent : dormant, secret

32. Fluctuation : wavering,

33. Eliminate : to reduce

34. Affinity : strong liking

35. Expedite : hasten

36. Console : to show sympathy

37. Adversary : opposition

38. Affable : lovable or approachable

39. Decomposition : rotten

40. Agregious : apart from the crowd, especially bad

41. Conglomeration: group, collection

42. Aberration: deviation

43. Augury : prediction

44. Creditability : ability to common belief, quality of being credible

45. Coincident: incidentally

46. Constituent : accompanying

47. Differential : having or showing or making use of

48. Litigation : engaging in a law suit

49. Moratorium: legally or officially determined period of delay before
fulfillment of the agreement of paying of debts.

50. Negotiate : discuss or bargain

51. Preparation : act of preparing

52. Preponderant : superiority of power or quality

53. Relevance : quality of being relevant

54. Apparatus : appliances

55. Ignorance : blindness, in experience

56. Obsession: complex enthusiasm

57. precipitate : speed, active

58. corroborative: refutable

59. obnoxious : harmless

60. sanction: hinder

61. empirical: experimental

62. aborigine: emigrant

63. corpulent : emaciated

64. officious: pragmate

65. Agitator : Firebrand :: Renegade : Turncoat

66. Burst : Sound :: Tinder : Fire

67. Star : cluster :: Tree : clump

68. Piston : Cylinder :: elevator : shaft

69. Mitigate : punishment :: commute : sentence

70. Erudite : scholar :: illiterate : ignorant

71. Fire : Ashes :: explosion : debris

72. mason : wall :: Author : Book

73. Fire : Ashes :: Event : memories

74. (a) cheerleaders : pompoms
(b) audience:seats
(c) team:goalposts
(d) conductor:podium
(e) referee:decision

Ans. (a)

75. archipelago:islands::

(a) arbor:bower
(b) garden:flower
(c) mountain:valley
(d) sand:dune
(e) constellation:star

Ans. (a)


76. crow:boastful ::

(a) smirk:witty
(b) conceal:s;y
(c) pout:sulky
(d) blush:coarse
(e) bluster:unhappy

Ans. (a)


77. bracket:shelf ::

(a) hammer:anvil
(b) girder:rivet
(c) strut:rafter
(d) valve:pipe
(e) bucket:well

Ans. (a)


78. taxonomy:classification ::

(a) etymology:derivation
(b) autonomy:authorization
(c) economy:rationalization
(d) tautology:justification
(e) ecology:urbanisation

Ans. (a)


79. moderator:debate ::

(a) legislator:election
(b) chef:banquet
(c) auditor:lecture
(d) conspirator:plot
(e) umpire:game

Ans. (a)


80. glossary:words ::

(a) catalogue:dates
(b) atlas:maps
(c) almanac:synonyms
(d) thesaurus:rhymes
(e) lexicon:numbers

Ans. (a)


81. lumber: bear ::

(a) roost:hen
(b) bray:donkey
(c) waddle:goose
(d) swoop:hawk
(e) chirp:sparrow

Ans. (a)


82. celerity:snail ::

(a) indolence:sloth
(b) cunning:weasel
(c) curiosity:cat
(d) humility:peacock
(e) obstinacy:mule

Ans. (a)


83. wood:sand ::

(a) coal:burn
(b) brick:lay
(c) oil:polish
(d) metal:burnish
(e) stone:quarry

Ans. (a)


84. carpenter:saw ::

(a) stenographer:typist
(b) painter:brush
(c) lawyer:brief
(d) runner:sneakers
(e) seamstress:scissors

Ans. (a)


85. horns:bull ::

(a) mane:lion
(b) wattles:turkey
(c) antlers:stag
(d) hooves:horse
(e) wings:eagle

Ans. (a)


86. gullible:duped ::

(a) credible:cheated
(b) careful:cautioned
(c) malleable:moulded
(d) myopic:mislead
(e) articulate:silenced

Ans. (a)


87. marathon:stamina ::

(a) relay:independence
(b) hurdle:perseverance
(c) sprint:celerity
(d) job:weariness
(e) ramble:directness

Ans. (a)


88. Skin:man ::

(a) hide:animal
(b) jump:start
(c) peel:potato
(d) eat:food
(e) wool:cloth

Ans. (a)


89. Bamboo:Shoot ::

(a) Bean:Sprout
(b) Peas:Pod
(c) Potato:Eye
(d) Carrot:Root
(e) Leaf:Stem

Ans. (a)


90. Deflect:Missile ::

(a) Siege:Castle
(b) Distract:Attraction
(c) Protect:Honour
(d) Drop:Catch
(e) Score:Goal

Ans. (a)


91. Editor:magazine ::

(a) captain:ship
(b) actor:movie
(c) director:film
(d) player:team
(e) jockey:horse

Ans. (a)


92. Volcano : Lava ::

(a) Fault:earthquate
(b) crack:wall
(c) tunnel:dig
(d) water:swim
(e) floor:polish

Ans. (a)


93
. Disregarded
(a) heed
(b) hopeful
(c) evade
(d) dense

Ans. (a)

94. Obviate
(a) becloud
(b) necessitate
(c) rationalize
(d) execute

Ans. (b)


95. Superficial
(a) profound
(b) exaggerated
(c) subjective
(d) spirited

Ans. (a)

96. chief : tribe :: governer : state


97. epaulette : shoulder :: tiara : head


98. guttural : throat :: gastric : stomach


99. inept : clever :: languid : active


100. Erudite : scholar :: illiterate : ignorant


1



Technical Questions

1. A 2MB PCM(pulse code modulation) has

a) 32 channels
b) 30 voice channels & 1 signalling channel.
c) 31 voice channels & 1 signalling channel.
d) 32 channels out of which 30 voice channels, 1 signalling channel, & 1 Synchronizatio channel.

Ans: (c)

2. Time taken for 1 satellite hop in voice communication is

a) 1/2 second
b) 1 seconds
c) 4 seconds
d) 2 seconds

Ans: (a)

3. Max number of satellite hops allowed in voice communication is :

a) only one
b) more han one
c) two hops
d) four hops

Ans: (c)

4. What is the max. decimal number that can be accomodated in a byte.

a) 128
b) 256
c) 255
d) 512

Ans: (c)

5. Conditional results after execution of an instruction in a micro processor is stored in

a) register
b) accumulator
c) flag register
d) flag register part of PSW(Program Status Word)

Ans: (d)





6. Frequency at which VOICE is sampled is

a) 4 Khz
b) 8 Khz
c) 16 Khz
d) 64 Khz

Ans: (a)

7. Line of Sight is

a) Straight Line
b) Parabolic
c) Tx & Rx should be visible to each other
d) none

Ans: (c)

8. Purpose of PC(Program Counter) in a MicroProcessor is

a) To store address of TOS(Top Of Stack)
b) To store address of next instruction to be executed.
c) count the number of instructions.
d) to store base address of the stack.

Ans: (b)

9. What action is taken when the processor under execution is interrupted by a non-maskable interrupt?

a) Processor serves the interrupt request after completing the execution of the current instruction.
b) Processor serves the interupt request after completing the current task.
c) Processor serves the interupt request immediately.
d) Processor serving the interrupt request depends upon the priority of the current task under execution.

Ans: (a)

10. The status of the Kernel is

a) task
b) process
c) not defined.
d) none of the above.

Ans: (b)



11. To send a data packet using datagram , connection will be established

a) before data transmission.
b) connection is not established before data transmission.
c) no connection is required.
d) none of the above.

Ans: (c)


12. Word allignment is

a) alligning the address to the next word boundary of the machine.
b) alligning to even boundary.
c) alligning to word boundary.
d) none of the above.

Ans: (a)

13 When a 'C' function call is made, the order in which parameters passed to the function are pushed into the stack is

a) left to right
b) right to left
c) bigger variables are moved first than the smaller variales.
d) smaller variables are moved first than the bigger ones.
e) none of the above.

Ans: (b)

14 What is the type of signalling used between two exchanges?

a) inband
b) common channel signalling
c) any of the above
d) none of the above.

Ans: (a)

15 Buffering is

a) the process of temporarily storing the data to allow for small variation in device speeds
b) a method to reduce cross talks
c) storage of data within transmitting medium until the receiver is ready to receive.
d) a method to reduce routing overhead.

Ans: (a)


16. Memory allocation of variables declared in a program is

a) allocated in RAM.
b) allocated in ROM.
c) allocated on stack.
d) assigned to registers.

Ans: (c)


17. A software that allows a personal computer to pretend as a computer terminal is

a) terminal adapter
b) bulletin board
c) modem
d) terminal emulation

Ans: (d)

18. Find the output of the following program

int *p,*q;
p=(int *)1000;
q=(int *)2000;
printf("%d",(q-p));

Ans: 500


19. Which addressing mode is used in the following statements:

(a) MVI B,55
(b) MOV B,A
(c) MOV M,A

Ans. (a) Immediate addressing mode.
(b) Register Addressing Mode
(c) Direct addressing mode


20. RS-232C standard is used in _____________.

Ans. Serial I/O






21. Memory. Management in Operating Systems is done by

a) Memory Management Unit
b) Memory management software of the Operating System
c) Kernel

Ans: (b)


22. What is done for a Push opertion?

Ans: SP is decremented and then the value is stored.

23. Binary equivalent of 52

Ans. 110100


24. Hexadecimal equivalent of 3452

Ans. 72A


25. Explain Just In Time Concept ?

Ans. Elimination of waste by purchasing manufacturing exactly when needed


26. A good way of unit testing s/w program is

Ans. User test


27. OOT uses

Ans. Encapsulated of detect methods


28.EDI useful in

Ans. Electronic Transmission


29. MRPII different from MRP

Ans. Modular version of man redundant initials


30. Hard disk time for R/W head to move to correct sector

Ans. Latency Time


31. The percentage of times a page number bound in associate register is called

Ans. Bit ratio


32. Expand MODEM

Ans. Modulator and Demodulator


33. RDBMS file system can be defined as

Ans. Interrelated


34. Super Key is

Ans. Primary key and Attribute


35. Windows 95 supports

(a) Multiuser
(b) n tasks
(c) Both
(d) None

Ans. (a)


36.In the command scanf, h is used for

Ans. Short int


37.A process is defined as

Ans. Program in execution


38.A thread is

Ans. Detachable unit of executable code)


39.What is the advantage of Win NT over Win 95

Ans. Robust and secure




40.How is memory management done in Win95

Ans. Through paging and segmentation


41.What is meant by polymorphism

Ans. Redfinition of a base class method in a derived class


42.What is the essential feature of inheritance

Ans. All properties of existing class are derived


43.What does the protocol FTP do

Ans. Transfer a file b/w stations with user authentification


44.In the transport layer ,TCP is what type of protocol

Ans. Connection oriented


45.Why is a gateway used

Ans. To connect incompatible networks


46.How is linked list implemented

Ans. By referential structures


47.What method is used in Win95 in multitasking

Ans. Non preemptive check


48.What is a semaphore

Ans. A method synchronization of multiple processes


49.What is the precedence order from high to low ,of the symbols ( ) ++ /

Ans.( ) , ++, /




50.Preorder of A*(B+C)/D-G

Ans.*+ABC/-DG

51.What is the efficiency of merge sort

Ans. O(n log n)


52.In which layer are routers used

Ans.In network layer


53.Which of the following sorting algorithem has average sorting behavior --
Bubble sort,merge sort,heap sort,exchange sort

Ans. Heap sort


54.In binary search tree which traversal is used for getting ascending order values--Inorder ,post order,preorder

Ans.Inorder


55.What are device drivers used for

Ans.To provide software for enabling the hardware


56.What is fork command in unix

Ans. System call used to create process


57.What is make command in unix

Ans. Used forcreation of more than one file


58.In unix .profile contains

Ans. Start up program


59.In unix 'ls 'stores contents in

Ans.inode block


60. Which of the following involves context switch,

(a) system call
(b) priviliged instruction
(c) floating poitnt exception
(d) all the above
(e) none of the above

Ans: (a)


61. In OST, terminal emulation is done in

(a) sessions layer
(b) application layer
(c) presentation layer
(d) transport layer

Ans: (b)

62. For 1 MB memory, the number of address lines required,

(a)11
(b)16
(c)22
(d) 24

Ans. (b)

63. Semaphore is used for

(a) synchronization
(b) dead-lock avoidence
(c) box
(d) none

Ans. (a)

64. Which holds true for the following statement

class c: public A, public B

a) 2 member in class A, B should not have same name
b) 2 member in class A, C should not have same name
c) both
d) none

Ans. (a)

65.Preproconia.. does not do which one of the following

(a) macro
(b) conditional compliclation
(c) in type checking
(d) including load file

Ans. (c)


66. Piggy backing is a technique for

a) Flow control
b) Sequence
c) Acknowledgement
d) retransmition

Ans. (c)



67. Which is not a memory management scheme?

a) buddy system
b) swapping
c) monitors
d) paging

Ans : c

68. There was a circuit given using three nand gates with two inputs and one output.
Find the output.

a) OR
b) AND
c) XOR
d) NOT

Ans. (a)



69.Iintegrated check value(ICV) are used as:

Ans. The client computes the ICV and then compares it with the senders value.

70. When applets are downloaded from web sites , a byte verifier performs _________?

Ans. Status check.



71. An IP/IPX packet received by a computer using... having IP/IPX both how the packet is handled.

Ans. Read the, field in the packet header with to send IP or IPX protocol.

72. The UNIX shell ....

a) does not come with the rest of the system
b) forms the interface between the user and the kernal
c) does not give any scope for programming
d) deos not allow calling one program from with in another
e) all of the above

Ans. (b)

73. In UNIX a files i-node ......?

Ans. Is a data structure that defines all specifications of a file like the file size,
number of lines to a file, permissions etc.

74. The very first process created by the kernal that runs till the kernal process is halts is

a) init
b) getty
c) both (a) and (b)
d) none of these

Ans. (a)

75. In the process table entry for the kernel process, the process id value is

(a) 0
(b) 1
(c) 2
(d) 255
(e) it does not have a process table entry

Ans. (a)


76. Which of the following API is used to hide a window

a) ShowWindow
b) EnableWindow
c) MoveWindow
d) SetWindowPlacement
e) None of the above

Ans. (a)

77. Which function is the entry point for a DLL in MS Windows 3.1

a) Main
b) Winmain
c) Dllmain
d) Libmain
e) None

Ans. (b)

78. The standard source for standard input, standard output and standard error is

a) the terminal
b) /dev/null
c) /usr/you/input, /usr/you/output/, /usr/you/error respectively
d) None

Ans. (a)

79. The redirection operators > and >>

a) do the same function
b) differ : > overwrites, while >> appends
c) differ : > is used for input while >> is used for output
d) differ : > write to any file while >> write only to standard output
e) None of these

Ans. (b)

80. The command grep first second third /usr/you/myfile

a) prints lines containing the words first, second or third from the file /usr/you/myfile
b) searches for lines containing the pattern first in the files
second, third, and /usr/you/myfile and prints them
c) searches the files /usr/you/myfiel and third for lines containing the words first or second and prints them
d) replaces the word first with the word second in the files third and /usr/you/myfile
e) None of the above

Ans. (b)

81. You are creating a Index on EMPNO column in the EMPLOYEE table. Which statement will you use?
a) CREATE INdEX emp_empno_idx ON employee, empno;
b) CREATE INdEX emp_empno_idx FOR employee, empno;
c) CREATE INdEX emp_empno_idx ON employee(empno);
d) CREATE emp_empno_idx INdEX ON employee(empno);

Ans. c


82. Which program construct must return a value?
a) Package
b) Function
c) Anonymous block
d) Stored Procedure
e) Application Procedure

Ans. b


83. Which Statement would you use to remove the EMPLOYEE_Id_PK PRIMARY KEY constraint and all depending constraints fromthe EMPLOYEE table?
a) ALTER TABLE employee dROP PRIMARY KEY CASCAdE;
b) ALTER TABLE employee dELETE PRIMARY KEY CASCAdE;
c) MOdIFY TABLE employee dROP CONSTRAINT employee_id_pk CASCAdE;
d) ALTER TABLE employee dROP PRIMARY KEY employee_id_pk CASCAdE;
e) MOdIFY TABLE employee dELETE PRIMARY KEY employee_id_pk CASCAdE;

Ans. a


84. Which three commands cause a transaction to end? (Chosse three)
a) ALTER
b) GRANT
c) DELETE
d) INSERT
e) UPdATE
f) ROLLBACK

Ans. a ,b ,f

85. Under which circumstance should you create an index on a table?
a) The table is small.
b) The table is updated frequently.
c) A columns values are static and contain a narrow range of values
d) Two columns are consistently used in the WHERE clause join condition of SELECT
statements.

Ans.d

86. What was the first name given to Java Programming Language.

a) Oak - Java
b) Small Talk
c) Oak
d) None

Ans.a


87.When a bicycle is in motion,the force of friction exerted by the ground on the two wheels is such that it acts

(a) In the backward direction on the front wheel and in the forward direction on the rear wheel.
(b) In the forward direction on the front wheel and in the backward direction on the rear wheel.
(c) In the backward direction on both the front and rear wheels.
(d) In the backward direction on both the front and rear wheels.

Ans. (d)


88. A certain radioactive element A, has a half life = t seconds.
In (t/2) seconds the fraction of the initial quantity of the element so far decayed is nearly

(a) 29%
(b) 15%
(c) 10%
(d) 45%

Ans. (a)


89. Which of the following plots would be a straight line ?

(a) Logarithm of decay rate against logarithm of time
(b) Logarithm of decay rate against logarithm of number of decaying nuclei
(c) Decay rate against time
(d) Number of decaying nuclei against time

Ans. (b)


90. A radioactive element x has an atomic number of 100.
It decays directly into an element y which decays directly into element z.
In both processes a charged particle is emitted.
Which of the following statements would be true?

(a) y has an atomic number of 102
(b) y has an atomic number of 101
(c) z has an atomic number of 100
(d) z has an atomic number of 101

Ans. (b)


91. If the sum of the roots of the equation ax2 + bx + c=0 is equal to the sum of the squares of their reciprocals
then a/c, b/a, c/b are in

(a) AP
(b) GP
(c) HP
(d) None of these

Ans. (c)


92. A man speaks the truth 3 out of 4 times.
He throws a die and reports it to be a 6.
What is the probability of it being a 6?

(a) 3/8
(b) 5/8
(c) 3/4
(d) None of the above

Ans. (a)


93. If cos2A + cos2B + cos2C = 1 then ABC is a

(a) Right angle triangle
(b) Equilateral triangle
(c) All the angles are acute
(d) None of these

Ans. (a)


94. Image of point (3,8) in the line x + 3y = 7 is

(a) (-1,-4)
(b) (-1,4)
(c) (2,-4)
(d) (-2,-4)

Ans. (a)




95. The mass number of a nucleus is

(a) Always less than its atomic number
(b) Always more than its atomic number
(c) Sometimes more than and sometimes equal to its atomic number
(d) None of the above

Ans. (c)


96. The maximum KE of the photoelectron emitted from a surface is dependent on

(a) The intensity of incident radiation
(b) The potential of the collector electrode
(c) The frequency of incident radiation
(d) The angle of incidence of radiation of the surface

Ans. (c)


97. Which of the following is not an essential condition for interference

(a) The two interfering waves must be propagated in almost the same direction or
the two interfering waves must intersect at a very small angle
(b) The waves must have the same time period and wavelength
(c) Amplitude of the two waves should be the same
(d) The interfering beams of light must originate from the same source

Ans. (c)


98. When X-Ray photons collide with electrons

(a) They slow down
(b) Their mass increases
(c) Their wave length increases
(d) Their energy decreases

Ans. (c)






99. An electron emits energy

(a) Because its in orbit
(b) When it jumps from one energy level to another
(c) Electrons are attracted towards the nucleus
(d) The electrostatic force is insufficient to hold the electrons in orbits

Ans. (b)


100. How many bonds are present in CO2 molecule?

(a) 1
(b) 2
(c) 0
(d) 4

Ans. (d)



























1


Sunday, August 19, 2007

OPERATING SYSTEMS

1. Explain the concept of Reentrancy.
It is a useful, memory-saving technique for multiprogrammed timesharing systems. A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period. Reentrancy has 2 key aspects:
i.) The program code cannot modify itself,
ii.) The local data for each user process must be stored separately.
Thus, the permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program. Each execution instance is called activation. It executes the code in the permanent part, but has its own copy of local variables/parameters. The temporary part associated with each activation is the activation record. Generally, the activation record is kept on the stack.
Note: A reentrant procedure can be interrupted and called by an interrupting program, and still execute correctly on returning to the procedure.

2. Explain Belady's Anomaly.
Also called FIFO anomaly. Usually, on increasing the number of frames allocated to a process' virtual memory, the process execution is faster, because fewer page faults occur. Sometimes, the reverse happens, i.e., the execution time increases even when more frames are allocated to the process. This is Belady's Anomaly. This is true for certain page reference patterns.

3. What is a binary semaphore? What is its use?
A binary semaphore is one, which takes only 0 and 1 as values. They are used to implement mutual exclusion and synchronize concurrent processes.

4. What is thrashing?
It is a phenomenon in virtual memory schemes, when the processor spends most of its time swapping pages, rather than executing instructions. This is due to an inordinate number of page faults.

5. List the Coffman's conditions that lead to a deadlock.
a) Mutual Exclusion: Only one process may use a critical resource at a time.
b) Hold & Wait: A process may be allocated some resources while waiting for others.
c) No Pre-emption: No resource can be forcible removed from a process holding it.
d) Circular Wait: A closed chain of processes exist such that each process holds at least one resource needed by another process in the chain.

6. What are short-, long- and medium-term scheduling?
Long term scheduler determines which programs are admitted to the system for processing. It controls the degree of multiprogramming. Once admitted, a job becomes a process.
Medium term scheduling is part of the swapping function. This relates to processes that are in a blocked or suspended state. They are swapped out of main-memory until they are ready to execute. The swapping-in decision is based on memory-management criteria.
Short term scheduler, also know as a dispatcher executes most frequently, and makes the finest-grained decision of which process should execute next. This scheduler is invoked whenever an event occurs. It may lead to interruption of one process by preemption.

7. What are turnaround time and response time?
Turnaround time is the interval between the submission of a job and its completion. Response time is the interval between submission of a request, and the first response to that request.

8. What are the typical elements of a process image?
a)User data: Modifiable part of user space. May include program data, user stack area, and programs that may be modified.
b) User program: The instructions to be executed.
c) System Stack: Each process has one or more LIFO stacks associated with it. Used to store parameters and calling addresses for procedure and system calls.
d) Process Control Block (PCB): Info needed by the OS to control processes.

9. What is the Translation Lookaside Buffer (TLB)?
In a cached system, the base addresses of the last few referenced pages is maintained in registers called the TLB that aids in faster lookup. TLB contains those page-table entries that have been most recently used. Normally, each virtual memory reference causes 2 physical memory accesses-- one to fetch appropriate page-table entry, and one to fetch the desired data. Using TLB in-between, this is reduced to just one physical memory access in cases of TLB-hit.

10. What is the resident set and working set of a process?
Resident set is that portion of the process image that is actually in main-memory at a particular instant. Working set is that subset of resident set that is actually needed for execution. (Relate this to the variable-window size method for swapping techniques.)

11. When is a system in safe state?
The set of dispatchable processes is in a safe state if there exist at least one temporal order in which all processes can be run to completion without resulting in a deadlock.

12. What is cycle stealing?
We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the DMA controller can use the data bus when the CPU does not need it, or it may force the CPU to temporarily suspend operation. The latter technique is called cycle stealing. Note that cycle stealing can be done only at specific break points in an instruction cycle.

13. What is meant by arm-stickiness?
If one or a few processes have a high access rate to data on one track of a storage disk, then they may monopolize the device by repeated requests to that track. This generally happens with most common device scheduling algorithms (LIFO, SSTF, C-SCAN, etc). High-density multi-surface disks are more likely to be affected by this, than the low density ones.

14. What are the stipulations of C2 level security?
C2 level security provides for:
1. Discretionary Access Control
2. Identification and Authentication
3. Auditing
4. Resource Reuse

15. What is busy waiting?
The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion.

16. Explain the popular multiprocessor thread-scheduling strategies.
Load Sharing: Processes are not assigned to a particular processor. A global queue of threads is maintained. Each processor, when idle, selects a thread from this queue. Note that load balancing refers to a scheme where work is allocated to processors on a more permanent basis.
Gang Scheduling: A set of related threads is scheduled to run on a set of processors at the same time, on a 1-to-1 basis. Closely related threads / processes may be scheduled this way to reduce synchronization blocking, and minimize process switching. Group scheduling predated this strategy.
Dedicated processor assignment: Provides implicit scheduling defined by assignment of threads to processors. For the duration of program execution, each program is allocated a set of processors equal in number to the number of threads in the program. Processors are chosen from the available pool.
Dynamic scheduling: The number of thread in a program can be altered during the course of execution.

17. When does the condition 'rendezvous' arise?
In message passing, it is the condition in which, both, the sender and receiver are blocked until the message is delivered.

18. What is a trap and trapdoor?
Trapdoor is a secret undocumented entry point into a program, used to grant access without normal methods of access authentication. A trap is a software interrupt, usually the result of an error condition.

19. What are local and global page replacements?
Local replacement means that an incoming page is brought in only to the relevant process' address space. Global replacement policy allows any page frame from any process to be replaced. The latter is applicable to variable partitions model only.

20. Define latency, transfer and seek time with respect to disk I/O.
Seek time is the time required to move the disk arm to the required track. Rotational delay or latency is the time to move the required sector to the disk head. Sums of seek time (if any) and the latency is the access time, for accessing a particular track in a particular sector. Time taken to actually transfer a span of data is transfer time.

21. Describe the Buddy system of memory allocation.
Free memory is maintained in linked lists, each of equal sized blocks. Any such block is of size 2^k. When some memory is required by a process, the block size of next higher order is chosen, and broken into two. Note that the two such pieces differ in address only in their kth bit. Such pieces are called buddies. When any used block is freed, the OS checks to see if its buddy is also free. If so, it is rejoined, and put into the original free-block linked-list.

22. What is time stamping?
It is a technique proposed by Lamport, used to order events in a distributed system without the use of clocks. This scheme is intended to order events consisting of the transmission of messages. Each system 'i' in the network maintains a counter Ci. Every time a system transmits a message, it increments its counter by 1 and attaches the time-stamp Ti to the message. When a message is received, the receiving system 'j' sets its counter Cj to 1 more than the maximum of its current value and the incoming time-stamp Ti. At each site, the ordering of messages is determined by the following rules:
For messages x from site i and messages y from site j, x precedes y if one of the following conditions holds if Ti < Tj or if Ti = Tj and i < j.

23. How are the wait/signal operations for monitor different from those for semaphores?
If a process in the monitor signals and no task is waiting on the condition variable, the signal is lost. So this allows easier program design. Whereas in semaphores, every operation affects the value of the semaphore, so the wait and signal operations should be perfectly balanced in the program.

24. In the context of memory management, what are placement and replacement algorithms?
Placement algorithms determine where in the available main-memory to load the incoming process. Common methods are first-fit, next-fit, and best-fit. Replacement algorithms are used when memory is full, and one process (or part of a process) needs to be swapped out to accommodate the new incoming process. The replacement algorithm determines which are the partitions (memory portions occupied by the processes) to be swapped out.

25. In loading processes into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?
For load-time dynamic linking: Load module to be loaded is read into memory. Any reference to a target external module causes that module to be loaded and the references are updated to a relative address from the start base address of the application module.
With run-time dynamic loading: Some of the linking is postponed until actual reference during execution. Then the correct module is loaded and linked.

26. What are demand- and pre-paging?
With demand paging, a page is brought into the main-memory only when a location on that page is actually referenced during execution. With prepaging, pages other than the one demanded by a page fault are brought in. The selection of such pages is done based on common access patterns, especially for secondary memory devices.

27. What is mounting?
Mounting is the mechanism by which two different file systems can be combined together. This is one of the services provided by the operating system, which allows the user to work with two different file systems, and some of the secondary devices.

28. What do you mean by dispatch latency?
The time taken by the dispatcher to stop one process and start running another process is known as the dispatch latency.

29. What is multi-processing?
The ability of an operating system to use more than one CPU in a single computer system. Symmetrical multiprocessing refers to the OS's ability to assign tasks dynamically to the next available processor, whereas asymmetrical multiprocessing requires that the original program designer choose the processor to use for a given task at the time of writing the program.

30. What is multitasking?
Multitasking is a logical extension of multi-programming. This refers to the simultaneous execution of more than one program, by switching between them, in a single computer system.

31. Define multithreading?
The concurrent processing of several tasks or threads inside the same program or process. Because several tasks can be processed parallely and no tasks have to wait for the another to finish its execution.

32. Define compaction.
Compaction refers to the mechanism of shuffling the memory portions such that all the free portions of the memory can be aligned (or merged) together in a single large block. OS to overcome the problem of fragmentation, either internal or external, performs this mechanism, frequently. Compaction is possible only if relocation is dynamic and done at run-time, and if relocation is static and done at assembly or load-time compaction is not possible.

33. What do you mean by FAT (File Allocation Table)?
A table that indicates the physical location on secondary storage of the space allocated to a file. FAT chains the clusters (group of sectors) to define the contents of the file. FAT allocates clusters to files.

34. What is a Kernel?
Kernel is the nucleus or core of the operating system. This represents small part of the code, which is thought to be the entire operating system, it is most intensively used. Generally, the kernel is maintained permanently in main memory, and other portions of the OS are moved to and from the secondary storage (mostly hard disk).

35. What is memory-mapped I/O?
Memory-mapped I/O, meaning that the communication between the I/O devices and the processor is done through physical memory locations in the address space. Each I/O device will occupy some locations in the I/O address space. I.e., it will respond when those addresses are placed on the bus. The processor can write those locations to send commands and information to the I/O device and read those locations to get information and status from the I/O device. Memory-mapped I/O makes it easy to write device drivers in a high-level language as long as the high-level language can load and store from arbitrary addresses.

36. What are the advantages of threads?
 Threads provide parallel processing like processes but they have one important advantage over process, they are much more efficient.
 Threads are cheaper to create and destroy because they do not require allocation and de-allocation of a new address space or other process resources.
 It is faster to switch between threads. It will be faster since the memory-mapping does not have to be setup and the memory and address translation caches do not have to be violated.
 Threads are efficient as they share memory. They do not have to use system calls (which are slower because of context switches) to communicate.

37. What are kernel threads?
The processes that execute in the Kernel-mode that processes are called kernel threads.

38. What are the necessary conditions for deadlock to exist?
 Process claims exclusive control for the Resources allocated to them. (Mutual exclusion condition).
 Resources cannot be de-allocated until the process completes they are used for its complete execution. (No preemption condition).
 A process can hold one resource and wait for other resources to be allocated. (Wait for condition)
 Circular wait condition.

39. What are the strategies for dealing with deadlock?
 Prevention- Place restrictions on resource requests so that deadlock cannot occur.
 Avoidance- Plan ahead so that you never get in to a situation where deadlock is inevitable.
 Recovery- when deadlock is identified in the system, it recovers from it by removing some of the causes of the deadlock.
 Detection – detecting whether the deadlock actually exists and identifies the processes and resources that are involved in the deadlock.

40. Paging a memory management function, while multiprogramming a processor management function, are the two interdependent?
Yes.

41. What is page cannibalizing?
Page swapping or page replacements are called page cannibalizing.

42. What has triggered the need for multitasking in PCs?
 Increased speed and memory capacity of microprocessors together with the support fir virtual memory and
 Growth of client server computing

43. What are the four layers that Windows NT have in order to achieve independence?
 Hardware abstraction layer
 Kernel
 Subsystems
 System Services.

44. What is SMP?
To achieve maximum efficiency and reliability a mode of operation known as symmetric multiprocessing is used. In essence, with SMP any process or threads can be assigned to any processor.

45. What are the key object oriented concepts used by Windows NT?
 Encapsulation
 Object class and instance

46. Is Windows NT a full blown object oriented operating system? Give reasons.
No Windows NT is not so, because its not implemented in object oriented language and the data structures reside within one executive component and are not represented as objects and it does not support object oriented capabilities .

47. What is a drawback of MVT?
It does not have the features like
 ability to support multiple processors
 virtual storage
 source level debugging

48. What is process spawning?
When the OS at the explicit request of another process creates a process, this action is called process spawning.

49. How many jobs can be run concurrently on MVT?
15 jobs

50. List out some reasons for process termination.
 Normal completion
 Time limit exceeded
 Memory unavailable
 Bounds violation
 Protection error
 Arithmetic error
 Time overrun
 I/O failure
 Invalid instruction
 Privileged instruction
 Data misuse
 Operator or OS intervention
 Parent termination.

51. What are the reasons for process suspension?
 swapping
 interactive user request
 timing
 parent process request

52. What is process migration?
It is the transfer of sufficient amount of the state of process from one machine to the target machine

53. What is mutant?
In Windows NT a mutant provides kernel mode or user mode mutual exclusion with the notion of ownership.

54. What is an idle thread?
The special thread a dispatcher will execute when no ready thread is found.

55. What is FtDisk?
It is a fault tolerance disk driver for Windows NT.

56. What are the possible threads a thread can have?
 Ready
 Standby
 Running
 Waiting
 Transition
 Terminated.

57. What are rings in Windows NT?
Windows NT uses protection mechanism called rings provides by the process to implement separation between the user mode and kernel mode.

58. What is Executive in Windows NT?
In Windows NT, executive refers to the operating system code that runs in kernel mode.

59. What are the sub-components of I/O manager in Windows NT?
 Network redirector/ Server
 Cache manager.
 File systems
 Network driver
 Device driver

60. What are DDks? Name an operating system that includes this feature.
DDks are device driver kits, which are equivalent to SDKs for writing device drivers. Windows NT includes DDks.

61. What level of security does Windows NT meets?
C2 level security