1. Relax: If you think too much about an encounter, you'll likely freeze in the middle of the conversation and appear nervous. Going on a job interview and social gatherings evoke anxiety in many people. One way to overcome this problem is to stop worrying about how others may perceive you. It takes two people to have a meaningful conversation. Offer a smile, and confidently ask simple questions such as, "how are you," "are you having fun."
2. Use Humor: If you have a funny side to your personality, break the ice with a joke. Be tasteful. Everyone may not appreciate your sick sense of humor or crude jokes. You don't have to be the party clown, nor does your joke have to create a bellow of laughter.
3. Don't Monopolize the Conversation: When nervous, some people have the tendency to "shoot off at the mouth." In other words, they ramble uncontrollably. If trying to make a good first impression, don't talk too much. If the person asks you a simple question such as, "where are you from," offer a short 30 second answer. This is not an invitation to disclose you entire past, and talk for ten uninterrupted minutes. The person is probably not interested in where you attended elementary school, or the fact that you've lived in ten different cities.
4. Know When to End the Conversation: Person with poor communication skills dread the "awkward silence." If the conversation starts to die, you could casually change the topic and ask the person a question that's completely off subject; or you could simply say, it's been nice talking with you," and move on.
Bring your own conversation piece
If you're heading off to a party or get-together where you suspect that you won't know a lot of the other guests, it's a good idea to bring something with you that is highly likely to be a good conversation piece. If you're a hat person, choose one that has a great story that goes with it (or make one up on the way) and be prepared to tell people about it when they ask. Or wear an unusual accessory or piece of jewelry that will catch people's attention and compel them to ask you about it. If you're bringing a gift to a party, add an eye-catching flourish to the wrapping, which will stimulate some other creative soul to ask you about your original wrapping technique, or about the nature of the gift. Conversation pieces provide a non-threatening way to start a conversation.
Effectively, you're giving people an excuse to come and talk to you, by making yourself appear approachable and interesting because there's something about you that is an obvious talking point. You don't want to arrive looking bland and exactly like everyone else; you're trying to stimulate discussion, not a reaction of bored disinterest.
Wednesday, December 31, 2008
25 Words That Can Hurt Your C.V.'s Chance Of Success
So, you're experienced? Before you advertise this in your C.V., be sure you can prove it.
Often, when job seekers try to sell themselves to potential employers, they load their C.V.s with vague claims that are transparent to recruiting managers, according to Scott Bennett, author of "The Elements of Resume Style" (published by AMACOM). By contrast, the most successful job seekers avoid these vague phrases on their C.V.s in favour of accomplishments.
Instead of making empty claims to demonstrate your work ethic, use brief, specific examples to demonstrate your skills. In other words, show, don't tell.
Bennett offers these examples:
Instead of... "Experience working in fast-paced environment"
Try... "Registered 120+ third-shift accident and emergency patients per night"
Instead of... "Excellent written communication skills"
Try... "Wrote jargon-free User Guide for 11,000 users"
Instead of... "Team player with cross-functional awareness"
Try... "Collaborated with clients, the Accounts Receivable Department and Sales to increase speed of receivables and prevent interruption of service to clients."
Instead of... "Demonstrated success in analysing client needs"
Try... "Created and implemented comprehensive needs assessment mechanism to help forecast demand for services and staffing."
The worst offenders
It’s good to be hard-working and ambitious, right? The recruiting manager won't be convinced if you can't provide solid examples to back up your claims. Bennett suggests being extremely careful before using these nice-sounding but empty words in your C.V.
· Aggressive
· Ambitious
· Competent
· Creative
· Detail-oriented
· Determined
· Efficient
· Experienced
· Flexible
· Goal-oriented
· Hard-working
· Independent
· Innovative
· Knowledgeable
· Logical
· Motivated
· Meticulous
· People person
· Professional
· Reliable
· Resourceful
· Self-motivated
· Successful
· Team player
· Well-organised
Often, when job seekers try to sell themselves to potential employers, they load their C.V.s with vague claims that are transparent to recruiting managers, according to Scott Bennett, author of "The Elements of Resume Style" (published by AMACOM). By contrast, the most successful job seekers avoid these vague phrases on their C.V.s in favour of accomplishments.
Instead of making empty claims to demonstrate your work ethic, use brief, specific examples to demonstrate your skills. In other words, show, don't tell.
Bennett offers these examples:
Instead of... "Experience working in fast-paced environment"
Try... "Registered 120+ third-shift accident and emergency patients per night"
Instead of... "Excellent written communication skills"
Try... "Wrote jargon-free User Guide for 11,000 users"
Instead of... "Team player with cross-functional awareness"
Try... "Collaborated with clients, the Accounts Receivable Department and Sales to increase speed of receivables and prevent interruption of service to clients."
Instead of... "Demonstrated success in analysing client needs"
Try... "Created and implemented comprehensive needs assessment mechanism to help forecast demand for services and staffing."
The worst offenders
It’s good to be hard-working and ambitious, right? The recruiting manager won't be convinced if you can't provide solid examples to back up your claims. Bennett suggests being extremely careful before using these nice-sounding but empty words in your C.V.
· Aggressive
· Ambitious
· Competent
· Creative
· Detail-oriented
· Determined
· Efficient
· Experienced
· Flexible
· Goal-oriented
· Hard-working
· Independent
· Innovative
· Knowledgeable
· Logical
· Motivated
· Meticulous
· People person
· Professional
· Reliable
· Resourceful
· Self-motivated
· Successful
· Team player
· Well-organised
Why Should We Hire You?
This is one of those broad questions that can take you down the wrong road unless you have done some thinking about what to say ahead of time. This question deals with your ability to sell yourself. Think of yourself as the product. Why should the customer buy?
Answers that WON'T WORK -
“Because I need a job.” – This answer is about YOU – “they” want to know what you can do for “them.”
“I am a hard worker.” – This is a really trite answer – almost anyone can say he or she is a hard worker.
“I saw your ad and could do the job. – This answers lacks passion and purpose.
STRONGER ANSWERS that would get the interviewer’s attention –
“Because I have three years experience working with customers in a very similar environment.”
“Because I have what it takes to fill the requirements of this job - solve customer problems using my excellent customer service skills.”
“Because I have the experience and expertise in the area of customer support that is required in this position.”
This is a time to let the customer (the interviewer) know what your product (YOU) can do for them and why they should listen to what you have to offer. The more detail you give the stronger your answer will be. This is not a time to talk about what you want.
It is a time to summarize your accomplishments and relate what makes you unique and therefore a viable fit for this position.
Answers that WON'T WORK -
“Because I need a job.” – This answer is about YOU – “they” want to know what you can do for “them.”
“I am a hard worker.” – This is a really trite answer – almost anyone can say he or she is a hard worker.
“I saw your ad and could do the job. – This answers lacks passion and purpose.
STRONGER ANSWERS that would get the interviewer’s attention –
“Because I have three years experience working with customers in a very similar environment.”
“Because I have what it takes to fill the requirements of this job - solve customer problems using my excellent customer service skills.”
“Because I have the experience and expertise in the area of customer support that is required in this position.”
This is a time to let the customer (the interviewer) know what your product (YOU) can do for them and why they should listen to what you have to offer. The more detail you give the stronger your answer will be. This is not a time to talk about what you want.
It is a time to summarize your accomplishments and relate what makes you unique and therefore a viable fit for this position.
How To Improve Job Search Confidence?
It’s very common for any (Many ) Job seeker to get frustrated moments and feel that how to improve confidence.
Let me ask you one question , what is confidence ?
How to measure that how much confidence any is having?
How to recognize that confidence is required ?
wait ,wait ,
just don’t think that I am going to enter a topic like philosophy and ask you what is Life ?
I just want to say you few feelings about the confidence. I feel every body will have same level of confidence . only the thing is at few times , it used to forget by the human. So it need to get back. But the confidence at the time of job search is not easy to get back , because it is tied up with many elements like money , prestige , surrounding people , etc . But among many , I want to choose the element of money. Because it makes any to independent up to some extent. The primary reason ,many used to said , what for job , is nothing but money. So lets concentrate on earning money. Is it tough to earn money ? No , not that much tough. It may be tough to earn money what extent any thinks to earn. But for basic needs , it’s not that much of tough to earn.
There are many part time jobs , these may not give the position what any dreams , but it gives little money and that gives the confidence. Those jobs may range from part time faculty to part time consultant . Try to get some job , at least for three months . So that some money you will get and few new people you can meet .so that you can able to get new issues and as well as you can develop your communication.
You may raise ask one more question .Will it won’t disturb my main job search ? am I not going to get deviated from the primary goal ? etc … BUT , I want to stress you one issue. If you really focus on your goal no body can change you. If you really feel to get , no body can stop you. I don’t want to give a big lectures about the motivation theories or self motivation techniques. I will say you , to know the world. Read the people. Means , try to understand what you require , then plan for it and get one by one. Don’t think that every thing you can make it in quick time.
I want to say one of the real problems I used to face. I , being an employer , really facing tremendous struggle to choose the right person to fill the position. It’s not that much of easy to fill a vacancy too. Many are not committed , many are not having subject , many are having not having communication , etc . I recommend you to meet as many people as possible for you , who are at good profession. try to get good tips from them. Try to analyze those , share with friends and decide what is your plan. The slowly implement it. if any problems you faced with that , try to revise it and continue it , till you win the job.
Confidence is not any where. It’s with you . You just try to get back that , by analyzing your self. Try to improve the knowledge in all positive issues. Try to read books or people. Stuff your self with knowledge. That gives you all. Don’t worry about communication (if you are lagging in it)/. Try to speak as much as possible , so that you can improve your communication level.
So get back your confidence. Be confident. Don’t leave your confidence after you get JOB, because life is not only for JOB.
All The Best !
Let me ask you one question , what is confidence ?
How to measure that how much confidence any is having?
How to recognize that confidence is required ?
wait ,wait ,
just don’t think that I am going to enter a topic like philosophy and ask you what is Life ?
I just want to say you few feelings about the confidence. I feel every body will have same level of confidence . only the thing is at few times , it used to forget by the human. So it need to get back. But the confidence at the time of job search is not easy to get back , because it is tied up with many elements like money , prestige , surrounding people , etc . But among many , I want to choose the element of money. Because it makes any to independent up to some extent. The primary reason ,many used to said , what for job , is nothing but money. So lets concentrate on earning money. Is it tough to earn money ? No , not that much tough. It may be tough to earn money what extent any thinks to earn. But for basic needs , it’s not that much of tough to earn.
There are many part time jobs , these may not give the position what any dreams , but it gives little money and that gives the confidence. Those jobs may range from part time faculty to part time consultant . Try to get some job , at least for three months . So that some money you will get and few new people you can meet .so that you can able to get new issues and as well as you can develop your communication.
You may raise ask one more question .Will it won’t disturb my main job search ? am I not going to get deviated from the primary goal ? etc … BUT , I want to stress you one issue. If you really focus on your goal no body can change you. If you really feel to get , no body can stop you. I don’t want to give a big lectures about the motivation theories or self motivation techniques. I will say you , to know the world. Read the people. Means , try to understand what you require , then plan for it and get one by one. Don’t think that every thing you can make it in quick time.
I want to say one of the real problems I used to face. I , being an employer , really facing tremendous struggle to choose the right person to fill the position. It’s not that much of easy to fill a vacancy too. Many are not committed , many are not having subject , many are having not having communication , etc . I recommend you to meet as many people as possible for you , who are at good profession. try to get good tips from them. Try to analyze those , share with friends and decide what is your plan. The slowly implement it. if any problems you faced with that , try to revise it and continue it , till you win the job.
Confidence is not any where. It’s with you . You just try to get back that , by analyzing your self. Try to improve the knowledge in all positive issues. Try to read books or people. Stuff your self with knowledge. That gives you all. Don’t worry about communication (if you are lagging in it)/. Try to speak as much as possible , so that you can improve your communication level.
So get back your confidence. Be confident. Don’t leave your confidence after you get JOB, because life is not only for JOB.
All The Best !
All Basic Things About Java Script
1. How to declare the methods in Javascript?
Methods are the actions that can be performed on objects.
Example:
script type=”text/javascript”>var str=”Hello world!”
document.write(str.toUpperCase())
In the above example UpperCase() method is used to print the string in Uppercases.
2. How do I print JavaScript output?
JavaScript programs cannot directly access printers. However, the user can print out everything on the Web page, including the output of JavaScript programs, by using the File | Print menu of the browser. How can I prevent an html page from being printed by a browser? Include a style sheet reference or a style sheet section with a media type of print. Set a rule for BODY with one entry, display:none.
3. Difference between Java Script and Vb Script?
Vb Script : Java Script :
1. Vb script will be run on IE
2. Vb script is developed by ms
3. Vb not case sensitive
1. Javascript runs on any browser
2. Java script by Sunmicrosystems
3. Java is case sensitive
4.How can JavaScript make a Web site easier to use? That is, are there certain JavaScript techniques that make it easier for people to use a Web site?
JavaScript's greatest potential gift to a Web site is that scripts can make the page more immediately interactive, that is, interactive without having to submit every little thing to the server for a server program to re-render the page and send it back to the client.
For example, consider a top-level navigation panel that has, say, six primary image map links into subsections of the Web site. With only a little bit of scripting, each map area can be instructed to pop up a more detailed list of links to the contents within a subsection whenever the user rolls the cursor atop a map area.
With the help of that popup list of links, the user with a scriptable browser can bypass one intermediate menu page.
The user without a scriptable browser (or who has disabled JavaScript) will have to drill down through a more traditional and time-consuming path to the desired content.
Methods are the actions that can be performed on objects.
Example:
script type=”text/javascript”>var str=”Hello world!”
document.write(str.toUpperCase())
In the above example UpperCase() method is used to print the string in Uppercases.
2. How do I print JavaScript output?
JavaScript programs cannot directly access printers. However, the user can print out everything on the Web page, including the output of JavaScript programs, by using the File | Print menu of the browser. How can I prevent an html page from being printed by a browser? Include a style sheet reference or a style sheet section with a media type of print. Set a rule for BODY with one entry, display:none.
3. Difference between Java Script and Vb Script?
Vb Script : Java Script :
1. Vb script will be run on IE
2. Vb script is developed by ms
3. Vb not case sensitive
1. Javascript runs on any browser
2. Java script by Sunmicrosystems
3. Java is case sensitive
4.How can JavaScript make a Web site easier to use? That is, are there certain JavaScript techniques that make it easier for people to use a Web site?
JavaScript's greatest potential gift to a Web site is that scripts can make the page more immediately interactive, that is, interactive without having to submit every little thing to the server for a server program to re-render the page and send it back to the client.
For example, consider a top-level navigation panel that has, say, six primary image map links into subsections of the Web site. With only a little bit of scripting, each map area can be instructed to pop up a more detailed list of links to the contents within a subsection whenever the user rolls the cursor atop a map area.
With the help of that popup list of links, the user with a scriptable browser can bypass one intermediate menu page.
The user without a scriptable browser (or who has disabled JavaScript) will have to drill down through a more traditional and time-consuming path to the desired content.
Operating Systems Interview Questions
* What is MUTEX ?
* What isthe difference between a 'thread' and a 'process'?
* What is INODE?
* Explain the working of Virtual Memory.
* How does Windows NT supports Multitasking?
* Explain the Unix Kernel.
* What is Concurrency? Expain with example Deadlock and Starvation.
* What are your solution strategies for "Dining Philosophers Problem" ?
* Explain Memory Partitioning, Paging, Segmentation.
* Explain Scheduling.
* Operating System Security.
* What is Semaphore?
* Explain the following file systems : NTFS, Macintosh(HPFS), FAT .
* What are the different process states?
* What is Marshalling?
* Define and explain COM?
* What is Marshalling?
* Difference - Loading and Linking ?
* What are the basic functions of an operating system?
* Explain briefly about, processor, assembler, compiler, loader, linker and the functions executed by them.
* What are the difference phases of software development? Explain briefly?
* Differentiate between RAM and ROM?
* What is DRAM? In which form does it store data?
* What is cache memory?
* What is hard disk and what is its purpose?
* Differentiate between Complier and Interpreter?
* What are the different tasks of Lexical analysis?
* What are the different functions of Syntax phase, Sheduler?
* What are the main difference between Micro-Controller and Micro- Processor?
* Describe different job scheduling in operating systems.
* What is a Real-Time System ?
* What is the difference between Hard and Soft real-time systems ?
* What is a mission critical system ?
* What is the important aspect of a real-time system ?
* If two processes which shares same system memory and system clock in a distributed system, What is it called?
* What is the state of the processor, when a process is waiting for some event to occur?
* What do you mean by deadlock?
* Explain the difference between microkernel and macro kernel.
* Give an example of microkernel.
* When would you choose bottom up methodology?
* When would you choose top down methodology?
* Write a small dc shell script to find number of FF in the design.
* Why paging is used ?
* Which is the best page replacement algorithm and Why? How much time is spent usually in each phases and why?
* Difference between Primary storage and secondary storage?
* What is multi tasking, multi programming, multi threading?
* Difference between multi threading and multi tasking?
* What is software life cycle?
* Demand paging, page faults, replacement algorithms, thrashing, etc.
* Explain about paged segmentation and segment paging
* While running DOS on a PC, which command would be used to duplicate the entire diskette?
Following are a few basic questions that cover the essentials of OS:
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.
2. 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.
3. 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.
4. What are the stipulations of C2 level security?
C2 level security provides for:
> Discretionary Access Control
> Identification and Authentication
> Auditing
> Resource reuse
5. 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.
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 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.
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.
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.
Ø 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.
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 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.
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?
Ø 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.
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 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.)
11. 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.
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 multisurface disks are more likely to be affected by this than low density ones.
14. What are the stipulations of C2 level security?
C2 level security provides for:
Ø Discretionary Access Control
Ø Identification and Authentication
Ø Auditing
Ø 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 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.
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 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.
23. 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.
24. 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.
25. 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.
26. 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.
27. Paging a memory management function, while multiprogramming a processor management function, are the two interdependent?
Yes.
28. What is page cannibalizing?
Page swapping or page replacements are called page cannibalizing.
29. 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
30. What are the four layers that Windows NT have in order to achieve independence?
Hardware abstraction layer
Kernel
Subsystems
System Services.
31. 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.
32. What are the key object oriented concepts used by Windows NT?
Encapsulation
Object class and instance
33. 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 .
34. What is a drawback of MVT?
It does not have the features like
ability to support multiple processors
virtual storage
source level debugging
35. What is process spawning?
When the OS at the explicit request of another process creates a process, this action is called process spawning.
36. How many jobs can be run concurrently on MVT?
15 jobs
37. 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.
38. What are the reasons for process suspension?
1. swapping
2. interactive user request
3. timing
4. parent process request
39. What is process migration?
It is the transfer of sufficient amount of the state of process from one machine to the target machine
40. What is mutant?
In Windows NT a mutant provides kernel mode or user mode mutual exclusion with the notion of ownership.
41. What is an idle thread?
The special thread a dispatcher will execute when no ready thread is found.
42. What is FtDisk?
It is a fault tolerance disk driver for Windows NT.
43. What are the possible threads a thread can have?
Ø Ready
Ø Standby
Ø Running
Ø Waiting
Ø Transition
Ø Terminated.
44. 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.
45. What is Executive in Windows NT?
In Windows NT, executive refers to the operating system code that runs in kernel mode.
46. What are the sub-components of I/O manager in Windows NT?
Ø Network redirector/ Server
Ø Cache manager.
Ø File systems
Ø Network driver
Ø Device driver
47. 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.
48. What level of security does Windows NT meets?
C2 level security.
* What isthe difference between a 'thread' and a 'process'?
* What is INODE?
* Explain the working of Virtual Memory.
* How does Windows NT supports Multitasking?
* Explain the Unix Kernel.
* What is Concurrency? Expain with example Deadlock and Starvation.
* What are your solution strategies for "Dining Philosophers Problem" ?
* Explain Memory Partitioning, Paging, Segmentation.
* Explain Scheduling.
* Operating System Security.
* What is Semaphore?
* Explain the following file systems : NTFS, Macintosh(HPFS), FAT .
* What are the different process states?
* What is Marshalling?
* Define and explain COM?
* What is Marshalling?
* Difference - Loading and Linking ?
* What are the basic functions of an operating system?
* Explain briefly about, processor, assembler, compiler, loader, linker and the functions executed by them.
* What are the difference phases of software development? Explain briefly?
* Differentiate between RAM and ROM?
* What is DRAM? In which form does it store data?
* What is cache memory?
* What is hard disk and what is its purpose?
* Differentiate between Complier and Interpreter?
* What are the different tasks of Lexical analysis?
* What are the different functions of Syntax phase, Sheduler?
* What are the main difference between Micro-Controller and Micro- Processor?
* Describe different job scheduling in operating systems.
* What is a Real-Time System ?
* What is the difference between Hard and Soft real-time systems ?
* What is a mission critical system ?
* What is the important aspect of a real-time system ?
* If two processes which shares same system memory and system clock in a distributed system, What is it called?
* What is the state of the processor, when a process is waiting for some event to occur?
* What do you mean by deadlock?
* Explain the difference between microkernel and macro kernel.
* Give an example of microkernel.
* When would you choose bottom up methodology?
* When would you choose top down methodology?
* Write a small dc shell script to find number of FF in the design.
* Why paging is used ?
* Which is the best page replacement algorithm and Why? How much time is spent usually in each phases and why?
* Difference between Primary storage and secondary storage?
* What is multi tasking, multi programming, multi threading?
* Difference between multi threading and multi tasking?
* What is software life cycle?
* Demand paging, page faults, replacement algorithms, thrashing, etc.
* Explain about paged segmentation and segment paging
* While running DOS on a PC, which command would be used to duplicate the entire diskette?
Following are a few basic questions that cover the essentials of OS:
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.
2. 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.
3. 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.
4. What are the stipulations of C2 level security?
C2 level security provides for:
> Discretionary Access Control
> Identification and Authentication
> Auditing
> Resource reuse
5. 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.
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 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.
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.
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.
Ø 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.
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 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.
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?
Ø 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.
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 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.)
11. 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.
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 multisurface disks are more likely to be affected by this than low density ones.
14. What are the stipulations of C2 level security?
C2 level security provides for:
Ø Discretionary Access Control
Ø Identification and Authentication
Ø Auditing
Ø 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 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.
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 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.
23. 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.
24. 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.
25. 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.
26. 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.
27. Paging a memory management function, while multiprogramming a processor management function, are the two interdependent?
Yes.
28. What is page cannibalizing?
Page swapping or page replacements are called page cannibalizing.
29. 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
30. What are the four layers that Windows NT have in order to achieve independence?
Hardware abstraction layer
Kernel
Subsystems
System Services.
31. 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.
32. What are the key object oriented concepts used by Windows NT?
Encapsulation
Object class and instance
33. 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 .
34. What is a drawback of MVT?
It does not have the features like
ability to support multiple processors
virtual storage
source level debugging
35. What is process spawning?
When the OS at the explicit request of another process creates a process, this action is called process spawning.
36. How many jobs can be run concurrently on MVT?
15 jobs
37. 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.
38. What are the reasons for process suspension?
1. swapping
2. interactive user request
3. timing
4. parent process request
39. What is process migration?
It is the transfer of sufficient amount of the state of process from one machine to the target machine
40. What is mutant?
In Windows NT a mutant provides kernel mode or user mode mutual exclusion with the notion of ownership.
41. What is an idle thread?
The special thread a dispatcher will execute when no ready thread is found.
42. What is FtDisk?
It is a fault tolerance disk driver for Windows NT.
43. What are the possible threads a thread can have?
Ø Ready
Ø Standby
Ø Running
Ø Waiting
Ø Transition
Ø Terminated.
44. 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.
45. What is Executive in Windows NT?
In Windows NT, executive refers to the operating system code that runs in kernel mode.
46. What are the sub-components of I/O manager in Windows NT?
Ø Network redirector/ Server
Ø Cache manager.
Ø File systems
Ø Network driver
Ø Device driver
47. 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.
48. What level of security does Windows NT meets?
C2 level security.
Java/J2ME Interview Questions
1.) Difference between Enumeration and Iteration?
Both will help you to travel into collection bag, but Enumeration is a legacy classes, Iterator have introduced in Collection framework. In enumeration we can modify the collection objects but throw Iterator it is possible. Enumeration can be used for Collection objects as well as Iterator can be used for legacy classes. Enumeration acts as Read-only interface, where as using Iterator we can manipulate the objects also like adding and removing the objects. So Enumeration is used whenever we want to make Collection objects as Read-only.
2.) What’s the difference between Transient and Volatile?
Transient: The transient modifier applies to variables only and it is not stored as part of its object’s Persistent state. These variables are not serialized. Transient instance fields are neither saved nor restored by the standard serialization. You have to handle restoring them yourself.
Volatile: Volatile modifier tells the compiler that the variable modified by volatile can be changed unexpectedly by other parts of the program. For example a Variable might be read from Cache and not update the content if it has been changed by another thread. Specifying a variable as volatile tells the JVM that any threads using that variable are not allowed to cache that value at all. Making the Variable Volatile will ensure that the compiler will get the content of the variable every time it is used and not cache its content. If not used Carefully this modifier might introduce bugs.
3.) Is JVM platform dependent?
Although java is platform independent but still JVM IS platform dependent one of the feature called byte code makes JVM platform dependent. Byte code is an intermediate machine code of compiled source code. The byte code can run on all machines, however the JVM must be installed in each machine.
4.) What are wrapper classes? Why do we need wrapper classes?
Java provides specialized classes corresponding to each of the primitive data types. These are called wrapper classes. They are Boolean, Byte, Character, Double, Float, Integer, Long, and Short.
We can create instances of these classes hence we can store them in any of the collection classes and pass them around as a collection. Also we can pass them around as method parameters where a method expects an object.
5.) What are Checked and Unchecked Exception?
A checked exception is generally known as Compiletime Exception. Checked exception forces client programmers to deal with the possibility that the exception will be thrown hence the programmer has to handle these types of exceptions. e.g., IOException thrown by java.io.FileInputStream’s read( ) method.
Where as Unchecked exceptions are Runtime Exception. With an unchecked exception, however, the compiler doesn’t force client programmers either to catch the exception or declare it in a throws clause. In fact, client programmers may not even know that the exception could be thrown. e.g., StringIndexOutOfBounds Exception thrown by String’s charAt () method· Checked exceptions must be caught at compile time but Runtime exceptions do not need to be.
6.) What is deadlock and how it can be avoid?
Deadlock is a situation when two threads are waiting on each other to release a resource. Each thread waiting for a resource, which is held by the other waiting thread. In Java, this resource is usually the object lock obtained by the synchronized keyword.
7.) What is the difference between interface and abstract class?
Difference between interface and abstract:
All the methods declared inside interface should be abstract, and there is no need to use the key word “abstract” for those method, but in case of abstract class at least one method should be abstract, most importantly u have to use the “abstract” key word for that method, besides that it may contain concrete methods. Abstract class must be extended abstract () methods generally contain only declaration part without definition part.
8.) Why are there no global variables in Java?
Global variables are considered bad form for a variety of reasons:
* Adding state variables breaks referential transparency (you no longer can understand a statement or expression on its own: you need to understand it in the context of the settings of the global variables).
* State variables lessen the cohesion of a program: you need to know more to understand how something works. A major point of Object-Oriented programming is to break up global state into more easily understood collections of local state.
* When you add one variable, you limit the use of your program to one instance. What you thought was global, someone else might think of as local: they may want to run two copies of your program at once.
9.) What are the steps in the JDBC connection?
For making a JDBC connection we need to go through the following steps:
Step 1: Register the database driver by using:
Class.forName (\” driver class for that specific database\”);
Step 2 : Create a database connection using:
Connection con = DriverManager.getConnection (url, username, password);
Step 3: Create a query using:
Statement stmt = Connection.Statement (\”select * from TABLE NAME\”);
Step 4: Exceute the query:
Stmt.exceuteUpdate ();
10.) What is an enumeration?
An enumeration is an interface which containing methods for accessing the underlying data structure. It is a construct which collection classes return when you request a collection of all the objects stored in the collection. It allows sequential access to all the elements stored in the collection.
11.) How Application is differ from Applet?
Applications:
* Applications are Stand Alone and the doesn’t need web-browser.
* Execution of Applications starts with main ().
Applets:
* Needs no explicit installation on local machine. Can be transferred through Internet on to the local machine and may run as part of web-browser.
* Execution Applets starts with init () method and it must run within a GUI, it may be AWT / Swing.
12.) What is CDC?
The Connected Device Configuration (CDC) is a specification for a J2ME configuration. Conceptually, CDC deals with devices with more memory and processing power than CLDC; it is for devices with an always-on network connection and a minimum of 2 MB of memory available for the Java system.
13.) What is the MIDP?
The MIDP defines a set of APIs for mobile devices, such as cell phones and low-end PDAs
14.) What is variable typing in javascript?
It is perfectly legal to assign a number to a variable and then assign a string to the same variable as follows
Example: i = 10;
i = “string”;
15.) What does a well-written java program look like?
A well-written java program exhibits recurring structures that promote abstraction, flexibility, modularity and elegance.
Both will help you to travel into collection bag, but Enumeration is a legacy classes, Iterator have introduced in Collection framework. In enumeration we can modify the collection objects but throw Iterator it is possible. Enumeration can be used for Collection objects as well as Iterator can be used for legacy classes. Enumeration acts as Read-only interface, where as using Iterator we can manipulate the objects also like adding and removing the objects. So Enumeration is used whenever we want to make Collection objects as Read-only.
2.) What’s the difference between Transient and Volatile?
Transient: The transient modifier applies to variables only and it is not stored as part of its object’s Persistent state. These variables are not serialized. Transient instance fields are neither saved nor restored by the standard serialization. You have to handle restoring them yourself.
Volatile: Volatile modifier tells the compiler that the variable modified by volatile can be changed unexpectedly by other parts of the program. For example a Variable might be read from Cache and not update the content if it has been changed by another thread. Specifying a variable as volatile tells the JVM that any threads using that variable are not allowed to cache that value at all. Making the Variable Volatile will ensure that the compiler will get the content of the variable every time it is used and not cache its content. If not used Carefully this modifier might introduce bugs.
3.) Is JVM platform dependent?
Although java is platform independent but still JVM IS platform dependent one of the feature called byte code makes JVM platform dependent. Byte code is an intermediate machine code of compiled source code. The byte code can run on all machines, however the JVM must be installed in each machine.
4.) What are wrapper classes? Why do we need wrapper classes?
Java provides specialized classes corresponding to each of the primitive data types. These are called wrapper classes. They are Boolean, Byte, Character, Double, Float, Integer, Long, and Short.
We can create instances of these classes hence we can store them in any of the collection classes and pass them around as a collection. Also we can pass them around as method parameters where a method expects an object.
5.) What are Checked and Unchecked Exception?
A checked exception is generally known as Compiletime Exception. Checked exception forces client programmers to deal with the possibility that the exception will be thrown hence the programmer has to handle these types of exceptions. e.g., IOException thrown by java.io.FileInputStream’s read( ) method.
Where as Unchecked exceptions are Runtime Exception. With an unchecked exception, however, the compiler doesn’t force client programmers either to catch the exception or declare it in a throws clause. In fact, client programmers may not even know that the exception could be thrown. e.g., StringIndexOutOfBounds Exception thrown by String’s charAt () method· Checked exceptions must be caught at compile time but Runtime exceptions do not need to be.
6.) What is deadlock and how it can be avoid?
Deadlock is a situation when two threads are waiting on each other to release a resource. Each thread waiting for a resource, which is held by the other waiting thread. In Java, this resource is usually the object lock obtained by the synchronized keyword.
7.) What is the difference between interface and abstract class?
Difference between interface and abstract:
All the methods declared inside interface should be abstract, and there is no need to use the key word “abstract” for those method, but in case of abstract class at least one method should be abstract, most importantly u have to use the “abstract” key word for that method, besides that it may contain concrete methods. Abstract class must be extended abstract () methods generally contain only declaration part without definition part.
8.) Why are there no global variables in Java?
Global variables are considered bad form for a variety of reasons:
* Adding state variables breaks referential transparency (you no longer can understand a statement or expression on its own: you need to understand it in the context of the settings of the global variables).
* State variables lessen the cohesion of a program: you need to know more to understand how something works. A major point of Object-Oriented programming is to break up global state into more easily understood collections of local state.
* When you add one variable, you limit the use of your program to one instance. What you thought was global, someone else might think of as local: they may want to run two copies of your program at once.
9.) What are the steps in the JDBC connection?
For making a JDBC connection we need to go through the following steps:
Step 1: Register the database driver by using:
Class.forName (\” driver class for that specific database\”);
Step 2 : Create a database connection using:
Connection con = DriverManager.getConnection (url, username, password);
Step 3: Create a query using:
Statement stmt = Connection.Statement (\”select * from TABLE NAME\”);
Step 4: Exceute the query:
Stmt.exceuteUpdate ();
10.) What is an enumeration?
An enumeration is an interface which containing methods for accessing the underlying data structure. It is a construct which collection classes return when you request a collection of all the objects stored in the collection. It allows sequential access to all the elements stored in the collection.
11.) How Application is differ from Applet?
Applications:
* Applications are Stand Alone and the doesn’t need web-browser.
* Execution of Applications starts with main ().
Applets:
* Needs no explicit installation on local machine. Can be transferred through Internet on to the local machine and may run as part of web-browser.
* Execution Applets starts with init () method and it must run within a GUI, it may be AWT / Swing.
12.) What is CDC?
The Connected Device Configuration (CDC) is a specification for a J2ME configuration. Conceptually, CDC deals with devices with more memory and processing power than CLDC; it is for devices with an always-on network connection and a minimum of 2 MB of memory available for the Java system.
13.) What is the MIDP?
The MIDP defines a set of APIs for mobile devices, such as cell phones and low-end PDAs
14.) What is variable typing in javascript?
It is perfectly legal to assign a number to a variable and then assign a string to the same variable as follows
Example: i = 10;
i = “string”;
15.) What does a well-written java program look like?
A well-written java program exhibits recurring structures that promote abstraction, flexibility, modularity and elegance.
Subscribe to:
Posts (Atom)