You are on page 1of 11

Visit www.latestoffcampus.com for placement papers, interview tips & job updates.

Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

iSOFT Technical Latest Sample Placement Paper
1. What is a Real-Time System? ANS: A real time process is a process that must respond to the events within a certain time period. A real time operating system is an operating system that can run real time processes successfully. 2. What is multiple inheritance (virtual inheritance)? What are its advantages and disadvantages? ANS: Multiple Inheritance is the process whereby a child can be derived from more than one parent class. The advantage of multiple inheritance is that it allows a class to inherit the functionality of more than one base class thus allowing for modeling of complex relationships. The disadvantage of multiple inheritance is that it can lead to a lot of confusion (ambiguity) when two base classes implement a method with the same name. 3. What is a Safe State and what is its use in deadlock avoidance? ANS: When a process requests an available resource, system must decide if immediate allocation leaves the system in a safe state. System is in safe state if there exists a safe sequence of all processes. Deadlock Avoidance: ensure that a system will never enter an unsafe state. 4. What a derived class inherits or doesn't inherit? ANS: Inherits: Every data member defined in the parent class (although such members may not always be accessible in the derived class!) Every ordinary member functions of the parent class (although such members may not always be accessible in the derived class!) The same initial data layout as the base class. Doesn't Inherit : The base class's constructors and destructor. The base class's assignment operator. The base class's friends.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

5. What is cache memory? ANS: Cache memory is random access memory (RAM) that a computer microprocessor can access more quickly than it can access regular RAM. As the microprocessor processes data, it looks first in the cache memory and if it finds the data there (from a previous reading of data), it does not have to do the more time-consuming reading of data from larger memory. 6. When should you use multiple inheritance? ANS: There are three acceptable answers:- "Never, “Rarely," and "When the problem domain cannot be accurately modeled any other way." Consider an Asset class, Building class, Vehicle class, and CompanyCar class. All company cars are vehicles. Some company cars are assets because the organizations own them. Others might be leased. Not all assets are vehicles. Money accounts are assets. Real estate holdings are assets. Some real estate holdings are buildings. Not all buildings are assets. Ad infinitum. When you diagram these relationships, it becomes apparent that multiple inheritance is a likely and intuitive way to model this common problem domain. The applicant should understand, however, that multiple inheritance, like a chainsaw, is a useful tool that has its perils, needs respect, and is best avoided except when nothing else will do. 7. What is Context Switch? ANS: Switching the CPU to another process requires saving the state of the old process and loading the saved state for the new process. This task is known as a context switch. Context-switch time is pure overhead, because the system does no useful work while switching. Its speed varies from machine to machine, depending on the memory speed, the number of registers which must be copied, the existed of special instructions(such as a single instruction to load or store all registers).
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

8. What is Pure Virtual Function? Why and when it is used? ANS: The abstract class whose pure virtual method has to be implemented by all the classes which derive on these. Otherwise it would result in a compilation error. This construct should be used when one wants to ensure that all the derived classes implement the method defined as pure virtual in base class. 9. What is CPU Scheduler? ANS: Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them. CPU scheduling decisions may take place when a process: 1. Switches from running to waiting state. 2. Switches from running to ready state. 3. Switches from waiting to ready. 4. Terminates. Scheduling under 1 and 4 is non-preemptive. All other scheduling is preemptive. 10. How can I handle a destructor that fails? ANS: Write a message to a log-_le. But do not throw an exception. The C++ rule is that you must never throw an exception from a destructor that is being called during the "stack unwinding" process of another exception. For example: If someone says throw Foo (), the stack will be unwound so all the stack frames between the throw Foo () and the} catch (Foo e) {will get popped. This is called stack unwinding. During stack unwinding, all the local objects in all those stack frames are destructed. If one of those destructors throws an exception (say it throws a Bar object), the C++ runtime system is in a no-win situation: should it ignore the Bar and end up in the} catch (Foo e) {where it was originally headed? Should it ignore the Foo and look for a} catch (Bare) {handler? There is no good answer: either choice loses information. So the C++ language guarantees that it will call terminate () at this point, and terminate () kills the process. Bang you're dead.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

11. What is Dispatcher? ANS: Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; this involves: Switching context, Switching to user mode, Jumping to the proper location in the user program to restart that program, dispatch latency – time it takes for the dispatcher to stop one process and start another running. 12. What is Virtual Destructor? ANS: Using virtual destructors, you can destroy objects without knowing their type - the correct destructor for the object is invoked using the virtual function mechanism. Note that destructors can also be declared as pure virtual functions for abstract classes. if someone will derive from your class, and if someone will say "new Derived", where "Derived" is derived from your class, and if someone will say delete p, where the actual object's type is "Derived" but the pointer p's type is your class. 13. What is DRAM? In which form does it store data? ANS: DRAM is not the best, but it’s cheap, does the job, and is available almost everywhere you look. DRAM data resides in a cell made of a capacitor and a transistor. The capacitor tends to lose data unless it’s recharged every couple of milliseconds, and this recharging tends to slow down the performance of DRAM compared to speedier RAM types. 14. How can I handle a constructor that fails? ANS: Throw an exception. Constructors don't have a return type, so it's not possible to use return codes. The best way to signal constructor failure is therefore to throw an exception. 15. Can a copy constructor accept an object of the same class as parameter, instead of reference of the object? ANS: No. It is specified in the definition of the copy constructor itself. It should generate an error if a programmer specifies a copy constructor with a first argument that is an object and not a reference.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

16. What is fragmentation? Different types of fragmentation? ANS: Fragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request. External Fragmentation: External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a request, but it is not contiguous. Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used. 17. What is hard disk and what is its purpose? ANS: Hard disk is the secondary storage device, which holds the data in bulk, and it holds the data on the magnetic medium of the disk. Hard disks have a hard platter that holds the magnetic medium, the magnetic medium can be easily erased and rewritten, and a typical desktop machine will have a hard disk with a capacity of between 10 and 40 gigabytes. Data is stored onto the disk in the form of files. 18. What is a "pure virtual" member function? ANS: The abstract class whose pure virtual method has to be implemented by all the classes which derive on these. Otherwise it would result in a compilation error. This construct should be used when one wants to ensure that all the derived classes implement the method defined as pure virtual in base class. 19. What is Extensible Stylesheet Language (XSL)? ANS: XSL is a proposed styling language for formatting XML (extensible Markup Language) documents. The proposal was submitted to the W3C by Microsoft, Inso, and ArborText.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

20. How virtual functions are implemented C++? ANS: Virtual functions are implemented using a table of function pointers, called the vtable. There is one entry in the table per virtual function in the class. This table is created by the constructor of the class. When a derived class is constructed, its base class is constructed _rst which creates the vtable. If the derived class overrides any of the base classes virtual functions, those entries in the vtable are overwritten by the derived class constructor. This is why you should never call virtual functions from a constructor: because the vtable entries for the object may not have been set up by the derived class constructor yet, so you might end up calling base class implementations of those virtual functions. 21. What is the difference between Hard and Soft real-time systems? ANS: A hard real-time system guarantees that critical tasks complete on time. This goal requires that all delays in the system be bounded from the retrieval of the stored data to the time that it takes the operating system to finish any request made of it. A soft real time system where a critical real-time task gets priority over other tasks and retains that priority until it completes. As in hard real time systems kernel delays need to be bounded. 22. What are all the implicit member functions of the class? Or what are all the functions which compiler implements for us if we don't define one? ANS: (a) default ctor (b) copy ctor (c) assignment operator (d) default destructor (e) address operator 23. What is the important aspect of a real-time system or Mission Critical Systems?
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

ANS: A real time operating system has well defined fixed time constraints. Process must be done within the defined constraints or the system will fail. An example is the operating system for a flight control computer or an advanced jet airplane. Often used as a control device in a dedicated application such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems. Real-Time systems may be either hard or soft real-time. Hard real-time: Secondary storage limited or absent, data stored in short term memory, or read-only memory (ROM), Conflicts with time-sharing systems, not supported by general-purpose operating systems. Soft real-time: Limited utility in industrial control of robotics, Useful in applications (multimedia, virtual reality) requiring advanced operatingsystem features. 24. What are the differences between a C++ struct and C++ class? ANS: The default member and base class access specifies are different. This is one of the commonly misunderstood aspects of C++. Believe it or not, many programmers think that a C++ struct is just like a C struct, while a C++ class has inheritance, access specifes, member functions, overloaded operators, and so on. Actually, the C++ struct has all the features of the class. The only differences are that a struct defaults to public member access and public base class inheritance, and a class defaults to the private access specified and private base-class inheritance. 25. What is the state of the processor, when a process is waiting for some event to occur? ANS: Waiting state. 26. What is a container class? What are the types of container classes? ANS: A container class is a class that is used to hold objects in memory or external storage. A container class acts as a generic holder. A container class has a predefined behavior and a well- known interface.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

A container class is a supporting class whose purpose is to hide the topology used for maintaining the list of objects in memory. When a container class contains a group of mixed objects, the container is called a heterogeneous container; when the container is holding a group of objects that are all the same, the container is called a homogeneous container. 27. What is virtual memory? ANS: Virtual memory is hardware technique where the system appears to have more memory that it actually does. This is done by timesharing, the physical memory and storage parts of the memory one disk when they are not actively being used. 28. What is assignment operator? ANS: Default assignment operator handles assigning one object to another of the same class. Member to member copy (shallow copy). 29. What resources are used when a thread created? How do they differ from those when a process is created? ANS: When a thread is created the threads does not require any new resources to execute the thread shares the resources like memory of the process to which they belong to. The benefit of code sharing is that it allows an application to have several different threads of activity all within the same address space. Whereas if a new process creation is very heavyweight because it always requires new address space to be created and even if they share the memory then the inter process communication is expensive when compared to the communication between the threads. 30. What is the cause of thrashing? How does the system detect thrashing? ANS: Once it detects thrashing, what can the system do to eliminate this problem? - Thrashing is caused by under allocation of the minimum number of pages required by a process, forcing it to continuously page
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

fault. The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming. It can be eliminated by reducing the level of multiprogramming. 31. What is Throughput, Turnaround time, waiting time and Response time? ANS: Throughput – number of processes that complete their execution per time unit. Turnaround time – amount of time to execute a particular process. Waiting time – amount of time a process has been waiting in the ready queue. Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment). 32. While running DOS on a PC, which command would be used to duplicate the entire diskette? ANS: diskcopy 33. What is difference between malloc ()/free () and new/delete? ANS: malloc allocates memory for object in heap but doesn't invoke object's constructor to initialize the object. New allocates memory and also invokes constructor to initialize the object. malloc() and free() do not support object semantics, does not construct and destruct objects E.g. string * ptr = (string *)(malloc (sizeof(string))) Are not safe, and does not calculate the size of the objects that it construct. 34. What is the difference between delete and delete []? ANS: Whenever you allocate memory with new [], you have to free the memory using delete []. When you allocate memory with 'new', then use 'delete' without the brackets. You use new [] to allocate an array of values (always starting at the index 0). 35. What is Memory alignment?? ANS: The term alignment primarily means the tendency of an address pointer value to be a multiple of some power of two. So a pointer with two byte alignment has a zero in the least signi_cant bit. And a pointer
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

with four byte alignment has a zero in both the two least signi_cant bits. And so on. More alignment means a longer sequence of zero bits in the lowest bits of a pointer. 36. What are the basic functions of an operating system? ANS: Operating system controls and coordinates the use of the hardware among the various applications programs for various uses. Operating system acts as resource allocator and manager. Since there are many possibly conflicting requests for resources the operating system must decide which requests are allocated resources to operating the computer system efficiently and fairly? Also operating system is control program which controls the user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices. 37. Can I use realloc () on pointers allocated via new? ANS: No! When realloc () has to copy the allocation, it uses a bitwise copy operation, which will tear many C++ objects to shreds. C++ objects should be allowed to copy themselves. They use their own copy constructor or assignment operator. Besides all that, the heap that new uses may not be the same as the heap that malloc () and realloc () use! 38. Why is it my ': hover’ declaration for links does not work? ANS: Assuming you have already checked that your style sheet declarations do conform to correct CSS syntax, it could be that you have overlooked the importance of a correct order of style declarations for links. The CSS2 specification makes this following note on the importance of placing the dynamic pseudo-classes ': hover’ and ': active’ in correct positions in a list of style declarations. Note that the 'a: hover' must be placed after the 'a: link' and 'a: visited' rules, since otherwise the cascading rules will hide the 'color' property
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus

of the 'a: hover' rule. Similarly, because 'a: active' is placed after 'a: hover', the active color will apply when the user both activates and hovers over the 'a' element. 39. Document Style Semantics and Specification Language (DSSSL)? ANS: Document Style Semantics and Specification Language is an international standard, an expression language, a styling language for associating processing (formatting and transformation) with SGML documents, for example XML. 40. Why paging is used? ANS: Paging is solution to external fragmentation problem which is to permit the logical address space of a process to be noncontiguous, thus allowing a process to be allocating physical memory wherever the latter is available.

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on Facebook @ www.facebook.com/LatestOffCampus