Blog Archive

Thursday, June 11, 2009

Microsoft Exchange Server 2010

Just when the speculations about Office 14 was starting to hum in, Microsoft puts forward a decisive disclosure that it will not come before 2010 but there will be a public beta version available for the new and refined exchange server program. The public beta test version of Exchange Server 2010, as the product is called, is the first of a wave of upgrades to Microsoft programs as they prepare their next big release of the entire office suite. Exchange Server can work entirely as an online service, which may attract customers looking to save money on hardware and support for their e-mail and messaging systems. It has enhanced information leakage protection, transcribe voice message et al. So let's look at its features and what more does it have to offer.
Enhanced Interoperability

As Cnet quotes Sanjay Jha, the lead of Exchange Server operations within Microsoft,
…the technology preview will include both the traditional desktop versions of Word, Excel, PowerPoint, and OneNote as well as the browser-based "Office Web Apps" that Microsoft is building. The browser-based versions will be somewhat more limited than their desktop counterparts, but will include basic editing abilities, Microsoft has said. The software maker has also said the browser-based applications will run in Safari and Firefox, in addition to Internet Explorer, which will take Office onto both Linux computers and the iPhone.

interoperability, here comes Microsoft. But talking bout interoperability, its not something new in Microsoft, If you remember well, they foresaw the technological demands of 'settling for less materials and more productivity' and the need to be platform independent (or come outta Micorosoft framework) quite early with eclipse4SL

Features

1. OWA (Outlook Web Access) support for Multiple Browsers

I know the title is self explaining. But, to tell you the truth, a person with Mac or Linux very reluctantly switched from Firefox or Safari to Internet Explorer just because they had to run IE in a Windows VM and that too which had no multiple tabs then. With this web access for different browsers, Microsoft made up a lot for the acceptability.

2. Improved Storage Reliability

You can now run Exchange reliably without dealing with Windows clustering, RAID arrays, or fancy Enterprise-class disk. It will be cheap to save or restore/ recover data and quick too.

3. Mail Tips

I still smell something like the one Google did with Gmail last month, Undo button. But its just my bad nose. Mail Tips is a program which tells you about the possible mistakes you are going to do by sending a mail to someone whom you don't intend to. After all, you won't like to send a personal mail to your secretary or boss anyway. Mail Tips helps you in that case, by warning you from before and giving you tips. Cool one.

4. Conversation View

Talking about the latest development project online and want all of them to get connected at once? It sure is a painful job to devote one window a person. But now you can have threaded conversation under a single node. How is it a big deal? We are using such things for the last 20 Years! Okay It is new to Outlook and OWA, and we should be happy.

5. Sharing

This is another of a kind which lets you share a lot of things effectively. Exchange server program has two main properties to share.
Calendar Sharing: You can share calendars to federated users by OWA.
Contact Sharing: You can share contacts very easily now.

6. Voice Mail Preview

This is quite a nice feature. You will now have a text preview of your voice mail messages! I am not quite sure how perfectly is it gonna work, but the very concept is lucrative enough to give it a shot.

7. Exchange Control Panel (ECP)

Exchange control panel is another new addition to this. Now you get self serviced tasks which uselessly needed administrators to prompt before. Another brownie point to Microsoft for optimizing.

8. Critical Security

Microsoft has gone over the typical or traditional security benchmarks and have fancied some really cool features in Exchange server programs. If you lead the organization, you will be happy to know that Microsoft has introduced features like,
Mobile Device Block/Allow List: That allows/ blocks specific devices only, helping you to have a secure way of hardware monitoring.
Protected voice mail: You can now actually protect voice mail and track them and restrict them not to go outside the organization anyhow.
Outlook protection rules: Automatically triggers Outlook to apply an RMS template to a message before it is sent.

9. Distribution Group Management

Now users can create, modify and access different distribution groups according as their choices and likings. That will help a better precision in teaming with the right kind of people under a single roof which will automatically increase effectiveness than reaching out to specific people individually.





10. Others

And there are few more noteworthy features which I want to sum up in one line. You get SATA support now involving I/O optimization, JDBO support, incoming voice mail reception, multi-mailbox search — all of them will prove to be helpful in someway or the other

Conclusion
Its just a public beta version only. We haven't seen the final specimen just like Windows 7 But the new Exchange server, just like the exciting new OS of Microsoft, sounds and shows promise. I don't know about pricing but I guess it will be on the higher side. Considering Microsoft perfects any and every feature they have talked of, Exchange Server may well be one of the most popular products of Microsoft.

Friday, March 7, 2008

8 Traits of Effective IT Leaders

#1 Leadership means focusing on the needs of others, not yourself

Real leaders try to provide service - to their team, their customers, and anyone else met. Leadership is not a 9-to-5 job. By focusing on the needs of customers, and then trying to align his or her team in ways to meet those needs as well as the needs of the team, a leader gets the job done and develops followers. Customers want to work with a leader because a leader team produces results. Your team wants to follow your lead because you take into account its needs and requirements.

To improve your leadership skills consider spending as much time with your customers as you do with your team.

#2 Leadership comes from your actions, not your title

Some of the best leaders don't have CIO or VP titles. Leadership in fact has nothing to do with title or pay-grade. Leaders lead because others want to follow them. Why would anyone want to follow a leader? Because a leader motivates its followers, gives them purpose, supports them, guides and mentors them, and even "takes flak" to protect them.

To be a better leader you need to ask yourself some hard questions. If you are not leading then you are dictating, and no one follows a dictator.

#3 Leadership makes you accountable, even if it's not your fault

A leader take full responsibility for his or her mission and with this comes accountability for failure. Leaders don't blame their team, or complain about unreasonable customer requirements. Leaders set expectations by focusing on the needs of others (Trait #1) and build consensus for what can be accomplished. If something goes wrong, a leader accepts responsibility - even if it was a team member that was the cause.

Think about the last time someone on your team made a mistake. Did you support and counsel them? Did you turn the failure into a learning opportunity? Or did you ridicule, shun, or punish him or her?

#4 Leadership is not a 9-to-5 activity

Being a leader means focusing on the needs of others and helping others when they fail. This can require additional work, even after hours. Often it is only personal engagement that uncovers the root cause of an unhappy worker. And many times these root causes present opportunities for improvement beyond the single worker.

Do you stay and work with the team? Not just being in the office, but do you actively engage and work to deliver when required?

#5 Leadership takes trust from your followers

When you focus on the needs of others, motivate your team, and satisfy your customers, when you take responsibility for success and failure, when you engage with your team on a personal level, then you build trust. Trust does not come easily. You have to earn trust. It won't come because you have an impressive title. You can't buy, barter, or steal trust. You have to earn it. You have to follow the first four traits on a regular basis for enough time to have earned the trust of your customers and team.

Do your customers trust you? Does your team get behind your ideas because they know you will protect and guide them?

#6 Leaders get their best ideas from their team

The best ideas are not going to come from the leader, but rather from those being led. A good leader develops consensus for a project based on its relationships to customers, company, and staff. Exactly how the project should unfold is often best left to the team to determine. Nothing so engages and commits a team to a leader than for them to be part of the design of the solution. No one knows the job better than the person who does it every day.

Do you dictate schedules to your team or do you and your teams negotiate on how to get things done? Ask your team for their ideas - and then use them. Just remember trait #6 - always give the credit to the team. The leader's credit comes only by crediting the team he or she leads.

#7 Leadership thrives on diversity

I love the story about the IT group at a major retailer. The business needed to know the conversion ratio: that is, how many people entering a store purchased something. IT began brainstorming traditional IT solutions -- complicated, highly automated, and expensive. On a whim, an IT leader asked a non-IT person how they might determine how many shoppers who came into a store actually purchased something. The non-IT solution after just a few minutes of thought was to hire a couple of temporary workers and have them count the number of people entering the store and then leaving with a shopping bag.

Instead of the typical all-consuming and expensive 18-month IT project more likely to fail than succeed, they got a cost-effective low-tech solution in a few hours. The best ideas come from those who don't think as you do. Expand your circle of relationships; nurture those who think differently from you.

#8 Leadership comes from continuous communication

To be able to lead and embrace these traits requires communications skills. I'm not talking about superior comedic skills when presenting. I am talking about person-to-person verbal and non-verbal communications.

This is counter-intuitive, but to present your ideas requires that you listen. To understand and accept the ideas of others requires that you talk. These are skills many people never develop, but all true leaders seem to have mastered.

In a meeting, do you do most of the talking? When you are listening to others, are you an active listener, repeating what you have heard to make sure you understand what was said?

Thursday, March 6, 2008

How to break or hack Windows XP password

If you want to hack or break the password of any windows XP system then you should have physical access to the system and then follow these simple steps.

In case of user password boot the pc in safe mode by pressing the F8 key and then selecting the Safe Mode option. You can now log on as an administrator and XP wont prompt for the password. Incase of an administrator account try rebooting the pc in DOS.


access C:\Windows\system32\config\sam and

Rename SAM as SAM.mj

Now XP wont ask for password next time You Login. Also

=> Go to the cmd prompt.
=> Type net user *.


It will list all the users.
Again type net user "administrator" or the name of the administrator "name" *.
e.g.: net user Jayanthi *(where Jayanthi is the name).

It will ask for the password.

Type the password and there you are done.

Logging In As Administrator:

Hold the Ctrl-Alt key and press Del twice. This will bring up the normal login and you can log on as Administrator.

To unhide the Administrator account so it does show up:

Start Regedit

Go to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Winlogon \ SpecialAccounts \ UserList

Unhide the Administrator key by giving it a value of 1

nJoy…….

Monday, March 3, 2008

How to Disable or Enable USB in the computer?

Now days there are certain type of viruses and spy-wares that are spreading from pen-drives just because of the unprotected use of Pen drives because usually user does not scan the pen drive before its use by the updates anti virus software’s. This situation got worse on shared computers. So, some of the administrators block the USB ports so that system does not get infected by this way. You can also disable and re-enable your system's USB ports by a simple trick.

How to disable USB storage accesses for a certain group of users this disabling and re-enabling of USB ports is based on a simple registry entry. By following these simple steps anyone can disable and re-enable the access of USB ports.

To disable the access to USB port, in Windows XP and Windows 2000

1. Click Start, and then click Run.

2. In the Open box, type regedit, and then click OK.

3. Locate, and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor

4. In the right pane, double-click Start.

5. In the Value data box, type 4, click Hexadecimal (if it is not already selected), and then click OK.

6. Quit Registry Editor.


To re-enable a disabled port:




1. Click Start, and then click Run.
2. In the Open box, type regedit, and then click OK.
3. Locate, and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor
4. In the right pane, double-click Start.
5. In the Value data box, type 3, click Hexadecimal (if it is not already selected), and then click OK.
6. Quit Registry Editor.

Serve your company better…… - Elango C

Friday, January 18, 2008

Memory Leaks Detection: A Different Approach

There are different ways to manage dynamically allocated memory

Experienced C/C++ programmers know what it means to properly manage dynamically allocated memory to avoid memory leaks. Michael presents an alternative approach.


Experienced C/C++ programmers know about the need to properly manage dynamically allocated memory to avoid memory leaks. Unfortunately, many of us still find ourselves in a tough position when there is a memory leak in the software. How is it detected in the first place? Simply looking at the task manager (or other appropriate tool that shows memory-use statistics) indicates that the memory used by the process is constantly growing. That means that the memory use is expected to remain constant. But the program must allocate memory, at least at the beginning of its life. Therefore, a more precise description would be that the process is running for a while, the input rate is constant, and the memory continues to climb. The interpretation of the input rate depends on the purpose of the program; for a web server, for instance, it can be network traffic throughput, or the number of requests per second.

How do you attack this problem? Assume that your first attempts at just looking at the code failed, and you need to get help from an automatic memory-leak detection tool. While your favorite tool may use unique techniques to trace memory allocation/deallocation and different algorithms to organize that information at runtime, it most probably works like this:

1. From the moment the program starts, it traces each memory allocation (probably with additional information, such as a call stack).

2. It registers all released memory.

3. Before the program terminates, it prints out information about each unreleased memory block.

When Good Isn't Good Enough

In many cases, there are two reasons why memory-leak reports won't give you much useful information. First, they complain about many nonexisting memory leaks and miss many real ones.

Say, for instance, that there are many memory allocations that are never released by design. Those are the static members, allocated at the beginning of the process, and Singleton objects created later using a lazy initialization strategy (for instance, your web server may load a static file to the memory when it is first requested). Other examples include custom memory pools, which can allocate up to a certain maximum number of objects, then reuse them through the rest of the process's life. In all these cases, the memory is never released. Although it's a good practice to clean up all resources, it doesn't always happen. I can even give you a reason for releasing those objects—it slows the shutdown process of your program. But what's more important is that all the memory used by the process is automatically reclaimed by the operating system (on most modern systems), and while the process is running, the size of all that static memory is known in advance and is strictly limited.

The second reason is that memory leaks, which would be missed by such reports, can be defined as "Java-style memory leaks." That is, although the object is no longer needed (at least according to the program's logic), it is never deleted because you have a valid pointer to that object, probably lost in some cache or other container. And if this object is properly wrapped with a smart pointer, it will be deleted at the end and won't appear as a memory leak. Needless to say, this is a common reason for constantly growing memory.

Any remaining classical memory leaks, which can be detected in the usual way, may still be missed because they're hard to discover in the background of other false alarms.

Detecting a Better Tool

So let's make a wish list of requirements for a memory-leaks detection tool (I'm only talking about management of runtime info regarding memory use, and not about techniques to trap allocations/deallocations made by the program):

  • They should let you begin registering new memory allocations at any arbitrary point of time. You will let the application properly initialize first.
  • They should stop monitoring memory activities and get a current-leaks report at any time.

Returning to the web server example, assume that it holds a session context per user—this is some information needed to process all requests made by the same visitor. As you don't want to keep this information forever, you release all related objects after a timeout of 20 minutes from the visitor's last request. Figure 1 shows a schematic lifetime of session objects, assuming that you start monitoring at time 1 and end at time 7.

At time 7 (when you end memory monitoring), session objects for Ron and Superman are still alive, and they were allocated during the monitoring interval. As a result, those session objects would be listed as memory leaks, even if you know that they aren't. That is exactly what you tried to prevent.

As a solution, you need to rethink the second requirement and replace it with:

  • You should be able to stop registering new memory allocations, while still updating the state on each released object.
  • At time (c), you want to get a report of all memory blocks allocated in time period (a)-(b), which were not released within the (a)-(c) time interval.

For the imaginary web server, assume you've started the process at 10:00. You can begin all monitoring at 10:10; turn off new allocations tracing at 10:15; and only at 10:40 get the final report of all memory leaks (for objects allocated in the five minutes between 10:10 and 10:15). Such flexibility in activation times and separation of new and delete processing are key points in building a better memory-leaks detection tool.

When thinking about additional features it might have, I would add:

  • Start monitoring only memory allocation made from a specific thread or group of threads.

Again, this is a good way to focus on specific areas of processing, ignoring unnecessary noise in reports. For example, a web server may have a pool of threads that handles user requests. You suspect that the memory leak is hiding in the code processing those requests, so you want to filter out all allocations made from other parts of the code. In many cases, you still want to process all memory deallocations, even in other threads (for example, you may send objects from processor threads to a special logger thread, and have the latter release those objects).

External Tools Versus Integrated Solutions

There are trade-offs in deciding which tool is most appropriate for your project. The first step is choosing between an independent external tool or an integrated solution that requires some changes in your source code.

The clear advantage of the first option is the ease of use—you just need to plug it in to the application, no extra work required. Going back to the list of expectations from the memory debugging tool, you will probably need to give up the last requirement— selection of threads—because external tools are not aware of the internal layout of the process. You will also need to guess the best times to start/end monitoring, without knowledge of the current state of the program.

On the other hand, adding simple code to your web server allows you to monitor specific threads while it processes a single request. You may prefer to invest some effort now, and build an infrastructure that will make memory debugging much easier in the future. In the long run, it will save you a lot of time.

Existing Tools?

Are there existing tools that implement the functionality I've examined here? To be truthful, I'm not aware of any commercial memory-profiling tool, but there are a couple of open-source projects that implement this approach:

  • Windows Leaks Detector (sourceforge.net/projects/winleak) for Win32 attaches to any running process (no source code required), provides a basic UI to start and end monitoring memory activity, and finally produces a report of all memory leaks with full call stack information. It also lets you automatically add debugger breakpoints when memory allocation occurs.
  • LeakTracer (www.andreasen.org/LeakTracer) for Linux requires special compilation of your project.

Tuesday, January 15, 2008

Mebroot / Rootkit – The New challenge to the Security experts.

Internet security experts are warning Windows users about a new Rootkit that steals login details for online bank accounts.

These are then sent back to the criminals for either selling to the highest bidder, or for use by themselves to drain the victim’s funds!

What is a Rootkit?

A rootkit is a malicious program (or combination of several programs) designed to take control ("Administrator" access) of a computer, without authorization by the owners.

Typically, rootkits act to obscure their presence on the computer through "subversion" or "evasion" of the operating system security mechanisms. A rootkit will conceal running processes from monitoring programs, or hiding files or system data from the operating system.

Sometimes, they are also Trojans as well, thus fooling users into believing they are safe to run on their systems!

Why is Mebroot Different?

The Memboot rootkit (first called this by security firm Symantec) is unusual in that it tries to overwrite part of a computer's hard drive called the Master Boot Record (MBR).

This is where a computer looks when it is switched on for information about the operating system it will be running.

"If you can control the MBR, you can control the operating system and therefore the computer it resides on!" wrote Elia Florio on security company Symantec's blog.

How Does Mebroot Infect a Computer?

Mebroot has been deliberately installed at websites controlled by the criminals and targets those website visitors who have not patched their computers with the latest security updates from Microsoft.

Once it installs itself on the vulnerable computer, it then contacts a remote server on the internet and downloads additional nasty software called "key loggers".

These special software programs are designed to capture all your passwords and login information and send it back to the criminal gang.

Analysis of Mebroot has shown that it uses its hidden position on the MBR as a beachhead so it can reinstall these associated programs if they are deleted by anti-virus software!!!

Most of these key logger programs lie in wait on a machine until its owner logs in to the online banking systems of one of more than 900 financial institutions it has been programmed to recognize.

Leading security firm iDefense has said that Mebroot was discovered in October 2007, but only started to be used in a series of attacks in early December 2007.

The Russian virus-writing group behind Mebroot is are specialists in stealing bank login information.

What Can a Computer User Do - Some Notes:

# Computers running Windows XP, Windows Vista, Windows Server 2003 and Windows 2000 that are NOT fully patched are all vulnerable to the virus. Make sure you have Automatic Updates turned on!

# Make sure you have an up to date security suite installed! If you don't then consider:

# CA Internet Security Suite PLUS 2008 which is 15% off until 31st March 2008 if you enter coupon code CAISS15 during checkout process.

# Although the password-stealing programs that Mebroot installs can be found by security software, such as CA Internet Security Suite, few commercial anti-virus packages currently detect its presence. Although this will change in the coming months now they know what to look for. (At least for now they will block the key logger Trojans from stealing data.)

# Mebroot cannot be removed while a operating system is running. However running the "fixmbr" command from within the Windows Recovery Console successfully removes the malicious MBR entry.

# Independent security firm GMER has produced a utility that will scan and remove the Mebroot stealth program! Please note that this is an advanced tool and not to be used without some caution:

# It seems that so far Windows XP is the most vulnerable operating system so far.

# In ADDITION to running your normal security software, consider running Threat Fire along side for better protection. By constantly monitoring the activity on your PC ThreatFire̢۪s ActiveDefense technology is able to hunt down and paralyze threats that are too new or too clever to be recognized by traditional security software.

...and stay safe!

Thursday, November 1, 2007

Windows Vista UAC

User Account Control (UAC)

User Account Control, or UAC, is a security feature of Windows Vista. Any action that can affect the security or reliability of Windows Vista now requires a confirmation before Vista will apply the changes. Standard Users will need to enter an Administrator’s password before making changes, and if a user is already running as an Administrator, Vista still requires a quick confirmation to ensure the changes are not being made by male-ware.

In previous versions of Windows, users running as Admin gave viruses and male-ware free reign of their system because the administrator had privileges to make changes that would affect the entire system. UAC is a slice of security between the user and the Windows Operating System, which is enabled by default to save us from ourselves.

This security does not come without a price, however. Users will either be relieved or frustrated with the dialog boxes that continuously pop up asking for permission or confirmation on a change being made to Windows.

User Account Control should be viewed as a benefit, and users should give it a chance before disabling UAC. After time, the notices will seem to diminish and fade into the background. The more you use Vista, the less intrusive the UAC notices will become.

But User Account Control can be turned off, though it is not recommended. Login under the ADMIN login name, and then go to the control panel, then to the user accounts. Look for Turn User Account Control On/Off.

If you decide to do this, at least be sure to create a Standard User account and run under that name. Running as Admin without UAC can open your system to attacks as viruses will have full privileges on your system and be capable of doing whatever they want to your machine.

How to Check if DVD Decoder Software is Installed

By default, Windows XP does not come with compatible DVD decoder software installed. To confirm if you have Windows XP-compatible DVD decoder software on your system:

  1. Select Start > Run
  2. Enter cmd in the Open box, and click OK
  3. Type dvdupgrd /detect and press Enter
  4. A Windows dialog box will open with identifying information about the installed software. If No decoders found is displayed, no decoder is installed

Thursday, October 4, 2007

Windows Vista ReadyBoost

Modern day software is more and more resource hungry, in every aspect of computing power.

Demands increase continuously, regardless of whether it's CPU frequency, hard-drive capacity or RAM memory that we are talking about.

Although a RAM memory upgrade is often desirable, there are cases when it cannot be immediately done. RAM memory is still quite expensive so this may prevent some and if you are upgrading an older computer you may have already achieved the maximum amount that can be physically installed.

So wouldn't it be nice to have a way to boost our computers performance in such scenarios?

Welcome to Windows Vista ReadyBoost!

Whilst physical memory such as RAM is quite expensive there is another form of memory that is far cheaper and that is called Flash memory.

Your computer can access Flash memory around 10 times faster than your hard drive so making it an ideal medium for ReadyBoost technology. Windows Vista can simply use the Flash memory as if it was extra RAM.

Using a Flash memory device such as a USB memory key/stick (called a flash drive by the operating system), Windows Vista can create an intermediate caching layer on the device that logically sits between RAM memory and your hard drive.

This can offer some great system performance gains.

Whenever a Flash drive is detected, Windows Vista will check to see if it is fast enough to be used by ReadyBoost as not all Flash memory available is fast enough. If it passes the test, the user can then allocate some memory for ReadyBoost usage.

However Windows Vista will work out the amount of space is recommended for optimal performance, but the user can choose to ignore this recommendation, using more memory than recommended, less, or none at all. Up to 4 GB of suitable flash memory can be used.

ReadyBoost is analogous to using the page file in some ways, but it concentrates on storing different kinds of data. The performance gain depends sensibly on what kind of data you are using. When working with many small files, or when frequently having to access small pieces of data, the performance is sensibly improved. For larger files, the performance gain is often less in my experience.

USB Flash Drive

I have personally seen BIG performance gains on older computers upgraded to Windows Vista, that only had 512 Mb of RAM installed. By adding a 4 Gb flash drive to one of the USB ports and then letting Windows Vista choose the optimal amount of memory to use, the system was notably more responsive when using multiple applications (Internet Explorer, Outlook, Word, Excel and Windows Media Player) at the same time.

The data stored on the flash drive is encrypted using the AES-128 encryption scheme. This ensures that the data is very difficult to decrypt, should the flash drive be stolen.

The entire process is essentially hidden away from the user. Windows automatically manages the newly available memory, and the flash drive can be removed at any moment, without affecting the system.

Although most devices are already supported, some aren't. Namely, external card readers are not supported for technical reasons, and MP3 players are not supported because Windows does not recognize them as actual disk volumes, but rather for what they are; MP3 player. However, the ReadyBoost team is adding support for new devices.

ReadyBoost is also a very young technology. Although mature enough to ship with Windows Vista, we can expect to see it with several improvements in future versions of Windows or future Windows Vista service packs.

For the technical folk reading this article ReadyBoost consists of two parts. A service in

%SystemRoot%\System32\Emdmgmt.dll that runs inside a Service Host process

(%SystemRoot%\System32\Svchost.exe). And a volume filter driver

(%SystemRoot%\System32\Drivers\Ecache.sys.

When you insert a USB flash device into Windows Vista, the ReadyBoost service looks at the device to determine its performance characteristics and stores the results of its test in the following registry entry:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Currentversion\Emdmgmt

By the way if you are wondering why the notation Emd is used instead of something likeReadyBoost. During development of this technology the working name was simply called External Memory Device, and so Emd is simply short for that!

Be ready to play your favorite game and applications on Vista quicker.

Friday, September 21, 2007

Good features in IE 7 with Windows Vista

Internet Explorer 7 Security

A major advancement in browsing security was released with Microsoft Vista's Internet Explorer 7. Browsing the Internet in the past was akin to walking through a minefield, where dangerous malware threatened to take over your machine with just one click. Windows Vista has locked down Internet Explorer 7 with a default feature called Protected Mode. Protected mode is security settings in the browser that give the user just enough privileges to surf the Internet, but not enough privileges that allow changes to be made to the system.

protected mode

Parental Controls

Internet Explorer also integrates a powerful parental control feature that allows you to limit your child's activity on the computer. You can access these controls from the Tools, then Internet Options, then the Content menu. Decide when and what websites your child visits, and also the types of video games your child plays on the computer, which are rated by the ESRB.

Phishing Filters

Phishing is a website that deceives a visitor into thinking the website is something other than what it is, such as a bank website or any other site that may need your username and password. Phishing is a way hackers steal identities. Internet Explorer keeps an updated list of these sites and attempts to filter them from your web browser automatically.

Windows Vista has made an attempt to recover IE's tarnished past with the release of Vista and Internet Explorer 7. They have done a great job of tackling the concerns of parents and users who want to keep malicious code off of their computers. Time will tell just how successful their endeavors will be, but we suspect these features will recover some of those users who always loved Internet Explorer, but were just too afraid to use it.

Tuesday, September 18, 2007

System trouble shooting tips.....

Troubleshooting On the Bench

There's nothing more frustrating than a freshly built PC that will not boot. Normally, you're starting with all new components and you're not sure if any of them work to begin with. This article deals with a few common techniques computer technicians use when dealing with this common problem.

Before you begin yanking out cables and components, just go over your connections one last time. A common mistake is the connection from the case power and reset switches to the motherboard. Carefully review the motherboard's manual to make sure these connections are right. Not only do the connectors need to be on the correct pins, they must also be in the correct orientation. If that is good, make sure the | / O switch on the back of the power supply is in the "|" position. Then, give the computer a little shake. Do you hear any screws bouncing around between the motherboard and the case? This can cause the system to blow or go to ground. Lastly, make sure the CMOS jumper is on pins 1-2. If it is on pins 2-3 the motherboard will not boot. This jumper is located near the watch-like battery on the motherboard.

Still no POST? Now carefully remove any PCI and AGP cards. Unplug the power supply and IDE cables to make life easier. You may already be able to get to the screws that hold the motherboard to the case. Personally, I like to remove everything except the CPU and heat-sink before pulling the motherboard.

Once all components are out of the case, place the motherboard on an antistatic bag (use the bag the motherboard shipped it, if possible) or a piece of cardboard. Be sure not to leave the motherboard running on the cardboard unattended because there is a remote possibility it could cause a fire.

You may need to rest the cardboard and bag on top of the case depending on the amount of wire you have with the case wires and the power supply leads. You can short the pins on the motherboard to boot without actually using the case wires but we are not going to cover that here.

Now make sure you only have the bare minimum of components connected to the motherboard. This means only one stick of memory (if the motherboard allows only one stick), the CPU and the video card. Nothing else. The only thing we're trying to do here is get the system to POST. A successful POST should result in a single, short beep. Make sure the motherboard has a built in speaker or you will need to connect an external speaker via pins on the motherboard.

If you still get nothing, begin swapping out spare parts if you have them at your disposal. Otherwise, you will need to start returning the components, starting with the motherboard, then the CPU. Before returning them, look for visible signs of damage (scorch marks on the CPU, bubbling capacitors on the motherboard, etc...).

Good luck. The most important ingredient in troubleshooting a new PC is patience.

What is "Lost cluster in a lost chain" error when I run chkdsk?

Lost Clusters on HDD

Frequently running Scandisk or chkdsk can help save your data. Hard drives can develop bad clusters over time, and those utilities can help retrieve corrupt data, and also prevent data from ever being written to those bad sectors again. Running these disk management tools will help reduce crashes and further loss of data. They may also help make you aware of impending hard drive failure.

Lost clusters in a lost chain

A typical error, such as "lost cluster in a lost chain" indicates that data is present but there are no pointers pointing to that data. You can run chkdsk to attempt to recover the files, or you can simply repair the errors by selecting N when prompted for action. This will correct the errors but not save the data. Or you can press Y, which will attempt the associate a folder to that data. If a folder cannot be found, it will save the data in a folder labeled .xxx. The "xxx" is a sequential number, so the folder will probably be named .000 if the folder does not exist.

ScanDisk
This utility exists in Windows 9.x systems, such as Windows 98 and ME. To access this utility, navigate to START>PROGRAMS>ACCESSORIES>SYSTEM TOOLS, then scandisk. You will be given the option to do a Thorough Scan, which is recommended as it physically scans the surface of the drive for errors. You can also specify if you want the errors corrected automatically, which is normally fine unless you want to attempt to recover the data.

Chkdsk
Chkdsk is available in Windows 2000 and Windows XP. To run a chkdsk, go to My Computer and right-click the drive you want to scan, then select Properties. Under the Tools tab, you will see a section for Error Checking. Click Check Now. Again, you will be given options Automatically fix the errors, or to attempt to recover the data. You may be prompted to reboot so this utility can run before Windows loads. This is normal.

UAC in Vista

User Account Control (UAC)

User Account Control, or UAC, is a security feature of Windows Vista. Any action that can affect the security or reliability of Windows Vista now requires a confirmation before Vista will apply the changes. Standard Users will need to enter an Administrator’s password before making changes, and if a user is already running as an Administrator, Vista still requires a quick confirmation to ensure the changes are not being made by male-ware.

In previous versions of Windows, users running as Admin gave viruses and male-ware free reign of their system because the administrator had privileges to make changes that would affect the entire system. UAC is a slice of security between the user and the Windows Operating System, which is enabled by default to save us from ourselves.

This security does not come without a price, however. Users will either be relieved or frustrated with the dialog boxes that continuously pop up asking for permission or confirmation on a change being made to Windows.

User Account Control should be viewed as a benefit, and users should give it a chance before disabling UAC. After time, the notices will seem to diminish and fade into the background. The more you use Vista, the less intrusive the UAC notices will become.

But User Account Control can be turned off, though it is not recommended. Login under the ADMIN login name, and then go to the control panel, then to the user accounts. Look for Turn User Account Control On/Off.

If you decide to do this, at least be sure to create a Standard User account and run under that name. Running as Admin without UAC can open your system to attacks as viruses will have full privileges on your system and be capable of doing whatever they want to your machine.

Friday, August 24, 2007

What is BotNet....?

Botnet This is the name given to a collection of these bots.

Then what is Bot.......

Bots are software applications that run automated tasks over the internet. Bots perform tasks that are both simple and structurally repetitive, at a much higher rate than would be possible for a human editor alone. Bots are used in a malicious way by criminal gangs to coordinate attacks on networked computers for financial gain. (Thousands of infected PC's around the world can all be used at the same time for an unlawful act.)


Microsoft maps out Visual C++ future

Microsoft's Visual C++ team has been mapping out the future of the development platform, looking to highlight native and managed code capabilities, a Microsoft executive wrote this week.

"The Visual C++ team has been looking at what they should [feature] in VC++ to ensure that the direction of the product aligns closely with customer needs and market realities," said S. "Soma" Somasegar, corporate vice president of the Microsoft developer division, in his blog.

Three things are on the minds of the team: a renewed emphasis on tools for writing native code, extending applications to take advantage of managed functionality and recognition that developers are using C++/CLI (Common Language Infrastructure) to bridge native and managed code. Managed functionality being eyed by the team includes technologies such as Windows Presentation Foundation and Windows Communication Foundation.

"The team will be significantly increasing support for native development tools," Somasegar said. This involves investigating ways to make C++ developers more efficient in understanding, updating and validating the quality of large native code bases, he said. A front-end rewrite is being worked on to improve IntelliSense capabilities.

"This same work should pave the way for future enhancements such as refactoring and advanced source code analysis," said Somasegar.

Native libraries are to be updated to simplify development of rich client user interfaces and access to Windows platform innovation, he said. "Friction-free" interoperability between native and managed code is a goal also.

Microsoft's new Visual C++ strategy will begin to be reflected in the upcoming Visual Studio 2008 development tools platform, which had been codenamed "Orcas" and is due later this year. But most of the changes will occur afterward, said Somasegar.

"The team is currently kicking around a number of native code and interop features planned for Orcas+1, and we are always interested in hearing from customers," Somasegar said.

Friday, August 17, 2007

What is encryption?

The incredible growth of the Internet has excited businesses and consumers alike with its promise of changing the way we live and work. But a major concern has been just how secure the Internet is, especially when you're sending sensitive information through it.

Let's face it, there's a whole lot of information that we don't want other people to see, such as:

  • Credit-card information
  • Social Security numbers
  • Private correspondence
  • Personal details
  • Sensitive company information
  • Bank-account information

Information security is provided on computers and over the Internet by a variety of methods. A simple but straightforward security method is to only keep sensitive information on removable storage media like floppy disks. But the most popular forms of security all rely on encryption, the process of encoding information in such a way that only the person (or computer) with the key can decode it.

In this article, you will learn about encryption and authentication. You will also learn about public-key and symmetric-key systems, as well as hash algorithms.

Encryption Systems

Computer encryption is based on the science of cryptography, which has been used throughout history. Before the digital age, the biggest users of cryptography were governments, particularly for military purposes. The existence of coded messages has been verified as far back as the Roman Empire. But most forms of cryptography in use these days rely on computers, simply because a human-based code is too easy for a computer to crack.

Most computer encryption systems belong in one of two categories:

  • Symmetric-key encryption
  • Public-key encryption

Symmetric Key

In symmetric-key encryption, each computer has a secret key (code) that it can use to encrypt a packet of information before it is sent over the network to another computer. Symmetric-key requires that you know which computers will be talking to each other so you can install the key on each one. Symmetric-key encryption is essentially the same as a secret code that each of the two computers must know in order to decode the information. The code provides the key to decoding the message. Think of it like this: You create a coded message to send to a friend in which each letter is substituted with the letter that is two down from it in the alphabet. So "A" becomes "C," and "B" becomes "D". You have already told a trusted friend that the code is "Shift by 2". Your friend gets the message and decodes it. Anyone else who sees the message will see only nonsense.

Public Key

Public-key encryption uses a combination of a private key and a public key. The private key is known only to your computer, while the public key is given by your computer to any computer that wants to communicate securely with it. To decode an encrypted message, a computer must use the public key, provided by the originating computer, and its own private key. A very popular public-key encryption utility is called Pretty Good Privacy (PGP), which allows you to encrypt almost anything.

To implement public-key encryption on a large scale, such as a secure Web server might need, requires a different approach. This is where digital certificates come in. A digital certificate is basically a bit of information that says that the Web server is trusted by an independent source known as a certificate authority. The certificate authority acts as a middleman that both computers trust. It confirms that each computer is in fact who it says it is, and then provides the public keys of each computer to the other.

Public Key: SSL

A popular implementation of public-key encryption is the Secure Sockets Layer (SSL). Originally developed by Netscape, SSL is an Internet security protocol used by Internet browsers and Web servers to transmit sensitive information. SSL has become part of an overall security protocol known as Transport Layer Security (TLS).


Look for the "s" after "http" in the address whenever you are about to enter sensitive information, such as a credit-card number, into a form on a Web site.

In your browser, you can tell when you are using a secure protocol, such as TLS, in a couple of different ways. You will notice that the "http" in the address line is replaced with "https," and you should see a small padlock in the status bar at the bottom of the browser window.


The padlock symbol lets you know that you are using encryption.

Public-key encryption takes a lot of computing, so most systems use a combination of public-key and symmetry. When two computers initiate a secure session, one computer creates a symmetric key and sends it to the other computer using public-key encryption. The two computers can then communicate using symmetric-key encryption. Once the session is finished, each computer discards the symmetric key used for that session. Any additional sessions require that a new symmetric key be created, and the process is repeated.

Hashing Algorithms

The key in public-key encryption is based on a hash value. This is a value that is computed from a base input number using a hashing algorithm. Essentially, the hash value is a summary of the original value. The important thing about a hash value is that it is nearly impossible to derive the original input number without knowing the data used to create the hash value. Here's a simple example:

Input number

Hashing algorithm

Hash value

10,667

Input # x 143

1,525,381

You can see how hard it would be to determine that the value 1,525,381 came from the multiplication of 10,667 and 143. But if you knew that the multiplier was 143, then it would be very easy to calculate the value 10,667. Public-key encryption is actually much more complex than this example, but that is the basic idea.

Public keys generally use complex algorithms and very large hash values for encrypting, including 40-bit or even 128-bit numbers. A 128-bit number has a possible 2128

or

3,402,823,669,209,384,634,633,746,074,300,000,000,000,000,000,000,000,000,000,000,000,000 different combinations! This would be like trying to find one particular grain of sand in the Sahara Desert.

Authentication

As stated earlier, encryption is the process of taking all of the data that one computer is sending to another and encoding it into a form that only the other computer will be able to decode. Another process, authentication, is used to verify that the information comes from a trusted source. Basically, if information is "authentic," you know who created it and you know that it has not been altered in any way since that person created it. These two processes, encryption and authentication, work hand-in-hand to create a secure environment.

There are several ways to authenticate a person or information on a computer:

  • Password - The use of a user name and password provides the most common form of authentication. You enter your name and password when prompted by the computer. It checks the pair against a secure file to confirm. If either the name or the password does not match, then you are not allowed further access.
  • Pass cards - These cards can range from a simple card with a magnetic strip, similar to a credit card, to sophisticated smart cards that have an embedded computer chip.
  • Digital signatures - A digital signature is basically a way to ensure that an electronic document (e-mail, spreadsheet, text file) is authentic. The Digital Signature Standard (DSS) is based on a type of public-key encryption method that uses the Digital Signature Algorithm (DSA). DSS is the format for digital signatures that has been endorsed by the U.S. government. The DSA algorithm consists of a private key, known only by the originator of the document (the signer), and a public key. The public key has four parts. If anything at all is changed in the document after the digital signature is attached to it, it changes the value that the digital signature compares to, rendering the signature invalid.

Recently, more sophisticated forms of authentication have begun to show up on home and office computer systems. Most of these new systems use some form of biometrics for authentication. Biometrics uses biological information to verify identity. Biometric authentication methods include:

  • Fingerprint scan
  • Retina scan
  • Face scan
  • Voice identification

Checking for Corruption

Another secure-computing need is to ensure that the data has not been corrupted during transmission or encryption. There are a couple of popular ways to do this:

  • Checksum - Probably one of the oldest methods of ensuring that data is correct, checksums also provide a form of authentication because an invalid checksum suggests that the data has been compromised in some fashion. A checksum is determined in one of two ways. Let's say the checksum of a packet is 1 byte long. A byte is made up of 8 bits, and each bit can be in one of two states, leading to a total of 256 (28 ) possible combinations. Since the first combination equals zero, a byte can have a maximum value of 255.
    • If the sum of the other bytes in the packet is 255 or less, then the checksum contains that exact value.
    • If the sum of the other bytes is more than 255, then the checksum is the remainder of the total value after it has been divided by 256.

Let's look at a checksum example:

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

Byte 7

Byte 8

Total

Checksum

212

232

54

135

244

15

179

80

1,151

127

  • 1,151 / 256 = 4.496 (round to 4)
  • 4 x 256 = 1,024
  • 1,151 - 1,024 = 127
  • Cyclic Redundancy Check (CRC) - CRCs are similar in concept to checksums, but they use polynomial division to determine the value of the CRC, which is usually 16 or 32 bits in length. The good thing about CRC is that it is very accurate. If a single bit is incorrect, the CRC value will not match up. Both checksum and CRC are good for preventing random errors in transmission but provide little protection from an intentional attack on your data. Symmetric- and public-key encryption techniques are much more secure.

All of these various processes combine to provide you with the tools you need to ensure that the information you send or receive over the Internet is secure. In fact, sending information over a computer network is often much more secure than sending it any other way. Phones, especially cordless phones, are susceptible to eavesdropping, particularly by unscrupulous people with radio scanners. Traditional mail and other physical mediums often pass through numerous hands on the way to their destination, increasing the possibility of corruption. Understanding encryption, and simply making sure that any sensitive information you send over the Internet is secure (remember the "https" and padlock symbol), can provide you with greater peace of mind.

Sunday, July 29, 2007

Safty measures to use internet with atmost care....

Ten thumb rules followed during internet access

It may sound clichéd to hear that Internet is the future.

However, despite the potential and prospects of the medium, many people scared to use it due to security fears (I know my friend will not use internet banking with ICICI and Punjab national bank where has the online accounting facility). At the same time, those who use the Internet often fumble when it comes to security. Here are 10 thumb rules to keep your personal information secure when online.

Favor common sense over technological solutions. Keep personal documents safe, preferably in a locked drawer. Shred bank statements, credit card slips and bills before throwing them away.

Rule 1


Never open unsolicited "spam" messages. Delete e-mails offering cash, free gifts or stock tips. Millions of unsolicited "spam" messages are sent every day in an attempt to defraud computer users.


Rule 2

Basic prevention helps. Protect your computer against identity theft. Install security

software to combat viruses, spy ware and spam and keep it updated.

Rule 3

Know enough about your firewall, the barrier between the public Internet and a personal computer, to know when it is working and when it isn't. Don't worry about the geeky complexity of it all, just know it's operating.

Rule 4

Beware of "phishing", where criminals trick people into revealing personal or financial

details, often by sending e-mails purporting to be from a bank. Never casually reply

to requests for your personal financial details.

Rule 5

Keep your private e-mail address secure. Consider using different e-mail accounts for

shopping, banking, friends and work. There are many free account providers.

Rule 6

Do not use the same password for different sites. Choose passwords with a mix of letters, numbers and symbols. Don't use obvious passwords, such as your first name or "123456" and don't write them down. For memory's sake, choosing a basic root word, then rotating numbers, is safer.

Rule 7

Make online payments safely. Never enter a card number unless there is a padlock in the Web browser's frame, rather than the Web page. The Web address should begin with "https" -- the extra "S" stands for "secure". Consider reserving one credit card for Web use or signing up for a separate online payment service like PayPal.

Rule 8

Secure your wireless network at home and be wary when using public access points. Encrypt the connection to scramble communications over the network.

Rule 9

Turn off the wireless network when you're not using it.

Rule 10

Treat your laptop computer like cash -- never leave it in a locked car or turn your back while using it in a public place. The same holds true with your mobile phone: Lock your phone (and any passwords you keep on it) when not using it.

Thursday, July 26, 2007

How do I get Visual Studio to recognize .cc files as c++ source files?

Use the /Tp option of the compiler to instruct it to assume the file is C++. You can put this in as a custom build rule, or modify some registry settings to add .cc to the list of file extensions recognized as C++.

The key to modify is:

HKEY_CURRENT_USER\Software\Microsoft\DevStudio\X.0\Build System\Components\Platforms\Win32 (x86)\Tools\32-bit C/C++\Input_Spec

and

HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Build System\Components\Tools\\Input_Spec

where X is the DevStudio version (5 or 6). You'll probably want to modify the following key to get automatic source code syntax coloring:

HKEY_CURRENT_USER\Software\Microsoft\DevStudio\X.0\Text Editor\Tabs/Language Settings\C/C++\FileExtensions


This method is nicer because it will save you a lot of work setting up the custom build rules. However, you still have to add the /TP switch manually to the Project Settings to get the compiler to fully recognize the file as C++. The downside: You won't be able to mix C and C++ files in the project, in which case, the only option is using custom build rules.

IMPORTANT: This procedure contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article numbers to view the Microsoft Knowledge Base articles:

256986 - Description of the Microsoft Windows Registry

322756 - HOW TO: Back Up, Edit, and Restore the Registry in Windows XP.

Wednesday, July 25, 2007

Next Windows Operating System name is Windows version 7

New Microsoft OS name “Windows Version 7”

Software giant Microsoft is planning to ship its next major version of Windows -- currently known as version "7" internally -- within three years, according to media reports

A Microsoft representative was quoted as saying that "Microsoft is scoping Windows 7 development to a three-year time frame." Interestingly, a subscription model is also being considered for the future Windows.

The acknowledgment follows last week's conference of the software giant's sales force, Microsoft's Global Exchange, held in Orlando to outline the company's post-Vista future.

"Microsoft is scoping Windows '7' development to a three-year timeframe, and then the specific release date will ultimately be determined by meeting the quality bar," the representative said.

"In the meantime, Microsoft is dedicated to helping customers deploy and get the most business value from their PCs using Windows Vista and related technologies like the Microsoft Desktop Optimization Pack, and we're encouraged by the response and adoption of these products so far."

Very few details are currently available about plans for the new OS other than that it will have 32- and 64-bit versions and will ship in consumer and business editions like Vista.

Microsoft said the outline of Windows 7 was provided particularly for corporate customers who are part of the software maker's Software Assurance licensing program. Many business customers pay for Microsoft's software under a license agreement called Software Assurance.

Microsoft has been criticized by business customers for delays related to Vista. Vista development was marked by numerous delays as Microsoft moved the release date. The entire development of Vista spanned five years until its eventual release in November 2006 for businesses and January 2007 for consumers.

According to media reports, Microsoft seems to be trying hard to reassure customers about its development cycle after a recent Forrester study that criticized its business-oriented subscription program (Software Assurance). The study raised questions about the financial benefits of Software Assurance program.

Software Assurance is the Microsoft program that allows customers with volume licenses for Windows automatically get upgrades when new versions come out.

In fact, according to a new Gartner report, Microsoft is making several business tools available only via Software Assurance, and Gartner expects this trend to continue.

Saturday, July 21, 2007

User level secruity in Mac OS X

OS 10.4 Security Tip

I would like to shed some light on the different types of user accounts that can be created and operated in OS 10.4. Knowledge of the different account types can help keep your computer secure.

User

The User account is the least privileged account. It allows a user to modify settings for his/her own account but not for others and cannot modify the universal settings. For multiple users of a single system you can further limit user accounts to prevent them from changing system preferences, removing items from the Dock, changing passwords, burning CDs or DVDs or using some installed applications.

Admin

The Admin account can perform many of the operations normally associated with the root user. An Admin account can add or delete User files, but typically cannot otherwise modify the contents of the User file. Admin accounts can modify the System folder by using the Installer or Software Update applications.

Root

The Root user is a superuser (su), which has full permissions for anything. Root users can execute any file and can access, read, modify or delete any file in any directory. Unlike most UNIX systems this superuser Root access is turned off by default and most Mac users will never have to access Root. This protects your Mac from those that might do damage by acting as a root user.

Every user on every computer should have a password assigned to him or her. Many people are always logged into the Admin account by default, which is a security risk.

For an extra level of security, you can do what Morgan at Small Dog does - he creates an Admin account, and then creates his own non- admin user account for himself to use. The Admin account is the first account he creates on his computer, and then he creates the user account. You create the secondary user account in "Accounts" in "System Preferences." Here's how we do it:

  1. Browse to System Preferences > Accounts.
  2. Create a new user, with a new name and password.
  3. Click on the button that says, "Allow user to administer this computer."
  4. Select your previous Account.
  5. De-select the button that says, "Allow user to administer this computer." The non-Admin will have all the data, bookmarks, and software that were created when it was an Admin Account. The Admin won't have this data, but in most cases should not need it.

Even if you've always been logged into your computer as an Admin, it's not too late to go back and demote yourself to user with the instructions above.

If you need both users to have access to all data, there may be some UNIX script that would allow you to do that.

Let me know if you have any other suggestions or queries!

Friday, July 20, 2007

Zapping PRAM in Macintosh.....

What is Zapping PRAM in Mac OS X?

Sometimes we may heard Macintosh computer technicians say a computer needs its PRAM zapped. For most of us, this sounds very odd, and maybe even a little obscene. But don't worry; it's a standard part of the Mac troubleshooting routine.

PRAM stands for "parameter random access memory." A document in Apple's knowledge base reads:

"PRAM stores certain system and device settings in a location that Mac OS X can access quickly. Exactly which settings are stored in the computer's PRAM varies depending on the type of computer as well as the types of devices and drives connected to the computer. Parameter RAM is a small area of non-volatile RAM (NVRAM)."

Because PRAM is "Non-volatile RAM," it will store data even when the computer is turned off. It will also typically store data when the computer automatically shuts off due to severe battery drain.

According to Apple, some of the data stored in PRAM includes:

  • Display and video settings such as refresh rate, screen resolution, number of colors
  • Time zone setting
  • Startup volume choice
  • Speaker volume
  • Recent kernel panic information, if any exist
  • DVD region setting

Many issues can be resolved by "zapping the PRAM." This includes issues such as Macs that are flashing a question mark when powered on, to missing pictures on the iMac G5's display, to computers that simply won't power up at all. PRAM can be corrupted by faulty (typically third party) software, power surges, and electromagnetic interference.

In most Macs you can "zap the pram" by powering the computer on, then immediately holding down the Command, Option, P, and R keys simultaneously. The Command key is the one with the cloverleaf or Apple on it.

According to Apple, OS X does not store network settings in PRAM. If you experience a network issue, resetting PRAM will not help.

If PRAM is reset, you may need to verify your time zone, startup volume, and volume settings using System Preferences. Certain firmware updates may reset PRAM as a normal part of their installation process."

Note that zapping PRAM is different than resetting the Power Management Unit (PMU,) which you might have to do on certain Apple laptops.

Apple says "A PMU reset should not be necessary except as a last resort in cases where a hardware failure of the power management system is suspected. Performing a PMU reset returns the iBook and PowerBook hardware, including NVRAM, to default settings and forces the computer to shut down."

Friday, July 13, 2007

Useful Microsoft outlook tips for real time users

Microsoft Outlook TIPS AND TRICKS

Collection of tips for getting around in Outlook focuses on using multiple Outlook windows and controlling how Outlook starts up.

Opening a New Window on Outlook

If one Information Viewer is nice, would two be twice as nice? Possibly, where you’re dragging many items from one folder to another or want to see two different views of the same information. Or maybe you want to leave your Inbox right where you stopped reading messages, but take a quick look at another folder.

To open a folder in a new window, right-click on the folder name in the Folder List, in the Folder Banner above the Information Viewer, or on the Outlook Bar, then choose Open in New Window.


Opening Outlook to a Particular Folder

It’s possible to launch Outlook so that it always opens to a particular Outlook or system folder. Choose Tools, Options, then select from the “Startup in this folder” list on the General tab.

Another method is to start Outlook from a shortcut with a special command. Create a shortcut to the Outlook.exe program. (A quick way to do this is to right-click the Outlook icon on the desktop, then choose Create Shortcut.) In the Properties dialog box for the new shortcut, type a space after the command in the Target box, then add the path to the folder you want to open, enclosed in quotation marks. If you run one of these shortcuts when Outlook is already started, the folder opens in its own window, without the Outlook Bar or Folder List.

To specify an Outlook folder path, use “Outlook:” followed by the folder name. For example,

 
  "C:\Program Files\Microsoft Office\Office\Outlook.exe"
  "Outlook:Calendar"
 

would open the Calendar folder. Of course, you might need to adjust the path to Outlook.exe to match the way your system is set up. You can use this technique not just for the initial launch of Outlook, but also to create shortcuts to other folders you’d like to use in their own windows.

Another use for this method is to open system folders. For example,

 
 "C:\Program Files\Microsoft Office\Office\Outlook.exe"
 "C:\My Documents"
 

would open the My Documents folder on your C: drive. You won’t be prompted for your Outlook profile.

Starting Outlook with Command Line Switches


There are also several switches for creating new items, starting with a particular profile, or cleaning up the Outlook Bar. You can add any of the switches listed in the following table

TABLE 9.3: OUTLOOK COMMAND LINE SWITCHES

Hide the Outlook Bar

/folder

Always open the Choose Profiles dialog box

/profiles

Start Outlook with a specific profile

/profile “

Create an e-mail message

/c ipm.note

Create a post

/c ipm.post

Create an appointment

/c ipm.appointment

Create a task

/c ipm.task

Create a contact

/c ipm.contact

Create a journal entry

/c ipm.activity

Create a note

/c ipm.stickynote

Create an item with the specified message class

/c

Create a message with the specified file as an attachment (To create an item other than a message, use with a /c switch.)

/a “

Create a message from a file that’s dragged and dropped on the shortcut

/c ipm.note “%1”

Create a message addressed to a particular recipient

/c ipm.note /m “

Clean and regenerate free/busy information (for Microsoft Exchange Server only)

/CleanFreeBusy

Restore missing folders for the default information store

/ResetFolders

Rebuild the Outlook Bar

/ResetOutlookBar

Clean and regenerate reminders

/Cleanreminders

with the “C:\Program Files\Microsoft Office\Office\Outlook.exe” command in a shortcut. Where quotation marks are shown, they must be included in the command. For items in angle brackets, substitute the specific information, such as the specific profile name to be used as the /profile switch.



Activating the Horizontal Scroll Bar

Normally, the Information Viewer does not display a horizontal scroll bar, but instead adjusts the width of all columns to fit into the available space. If you prefer to set specific column widths and scroll the display to see all the information, choose View, Format View. In the Format Table View dialog box

clear the box for “Automatic column sizing.” The horizontal scroll bar then appears in the Information Viewer.

Wednesday, July 11, 2007

What is Bitwise operators and how it works....?

Bitwise (Boolean) logic operators


Because microcontrollers store numbers in binary, it is possible to use a special kind of operator on data. These operators are described as Bitwise logic, because they obtain results based on the logical relationships of individual bits. Bitwise logic is also known as Boolean logic or Boolean math.

There are 7 Bitwise operators:

PICBASIC Operator

Description

~

Bitwise NOT

&

Bitwise AND

|

Bitwise OR

^

Bitwise Exclusive OR (XOR)

&/

Bitwise NOT AND (NAND)

|/

Bitwise NOT OR (NOR)

^/

Bitwise NOT Exclusive OR (XNOR)

The simplest of these is the NOT (~) operator. It returns the logical opposite of the tested bit. This operator is unique in that it only requires 1 bit as input. All the other operators require 2 bits.


Using Bitwise operators on individual bits

NOT (~)

When describing the function of Bitwise operations, we use a diagram call a "truth table". It shows the input bit (or bits) on the left, and the result on the right. Since the NOT operator only has one input, the truth table looks like this:

A

~A

0

1

1

0

PICBASIC example:

result = ~ A

AND (&)

AND compares 2 bits and returns logic high only if both input bits are high.

A

B

A & B

0

0

0

0

1

0

1

0

0

1

1

1

PICBASIC example:

result = A & B

OR (|)

OR compares 2 bits and returns a logic high if either or both inputs are high.

A

B

A | B

0

0

0

0

1

1

1

0

1

1

1

1

PICBASIC example:

result = A | B

XOR (^)

XOR compares 2 bits and returns logic high only if a single input is high. If both inputs are high, it returns logic low

A

B

A ^ B

0

0

0

0

1

1

1

0

1

1

1

0

PICBASIC example:

result = A ^ B

NAND (&/)

NAND compares 2 bits and returns logic low if both inputs are high.

A

B

A &/ B

0

0

1

0

1

1

1

0

1

1

1

0

PICBASIC example:

result = A &/ B

NOR (|/)

NOR compares 2 bits and returns logic low if either or both inputs are high.

A

B

A |/ B

0

0

1

0

1

0

1

0

0

1

1

0

PICBASIC example:

result = A |/ B

XNOR (^/)

XNOR compares 2 bits and returns logic low only if a single input is high. If both inputs are high, it returns logic high.

A

B

A ^/ B

0

0

1

0

1

0

1

0

0

1

1

1

PICBASIC example:

result = A ^/ B


Using Bitwise operators on bytes and words

When you use byte or word sized data as inputs for Bitwise operators, the result can be as long as your longest input. The operator will perform a comparison of each bit in both input variables, and store the result in the corresponding bit location of the result variable.

A common example is the AND operator used to mask certain bits in a byte. It works as a mask because it always returns 0 when one of the inputs is 0. Therefore, when we use "bytevar & %00001111", the top 4 bits of the result will always be 0. The lower 4 bits won't change, because ANDing something with logic 1 makes the result equal to the input.

Here's a modified truth table showing 8-bits being ANDed all at once.

bit position

byte A

byte B

A & B

7

1

0

0

6

0

0

0

5

1

0

0

4

1

0

0

3

0

1

0

2

1

1

1

1

1

1

1

0

0

1

0

PICBASIC example:

A = %10110110
B = %00001111
result = A & B

'(00000110)

Here are some example equations using the input values above:

%10110110 | %00001111 = %10111111 'use OR to mask bits with logic 1

%10110110 ^ %00001111 = %10111001 'use XOR to invert selected bits

Let me know your queries to me (Elango C)

Thursday, July 5, 2007

How does the Hard drive is getting booted every time / What is MBR in a Hard drive?

MASTER BOOT RECORD (MBR)

Many people don’t know how the Operating systems are getting loaded or running into the computer. Even though this is too technical subject or something related to System internals; I would like to shed some light on those part for the people who want to know or learn the inner part of the computer ….. Operating systems….. Logical structure of storage drive’s etc….

In this article I am trying to explain or disassemble a Master Boot Record (MBR).

The MBR is the sector at cylinder 0, head 0, sector 1 of a hard disk.

An MBR is created by the FDISK program. In Win9x days the FDISK program of all operating systems must create a functionally similar MBR but now a days lot of Partitioning tools are available to make it out like CompuApps Swissknife, Acronics True Image etc. Also using the Device manager we can create the partition / format etc from the Windows 2000 onwards.

The MBR’s first of what could be many partition sectors, each one containing a four entry partition table.

At the completion of your system's Power On Self Test (POST), INT 19 is called. Usually INT 19 tries to read a boot sector from the first floppy drive. If a boot sector is found on the floppy disk that the boot sector is read into memory at location 0000:7C00 and INT 19 jumps to memory location 0000:7C00.

However, if no boot sector is found on the first floppy drive, INT 19 tries to read the MBR from the first hard drive. If an MBR is found it is read into memory at location 0000:7c00 and INT 19 jumps to memory location 0000:7c00. The small program in the MBR will attempt to locate an active (bootable) partition in its partition table. If such a partition is found, the boot sector of that partition is read into memory at location 0000:7C00 and

the MBR program jumps to memory location 0000:7C00. Each operating system has its own boot sector format. The small program in the boot sector must locate the first part of the operating system's kernel loader program (or perhaps the kernel itself or perhaps a "boot manager program") and read that into memory.

INT 19 is also called when the CTRL-ALT-DEL keys are used. On most systems, CTRL-ALT-DEL causes an short version of the POST to be executed before INT 19 is called.

Where interesting stuff follows………

The MBR program code starts at offset 0000.

The MBR messages start at offset 008b.

The partition table starts at offset 00be.

The signature is at offset 00fe.

Here is a summary of what this thing does:

If an active partition is found, that partition's boot record is read into 0000:7c00 and the MBR code jumps to 0000:7c00 with SI pointing to the partition table entry that describes the partition being booted. The boot record program uses this data to determine the drive being booted from and the location of the partition on the disk.

If no active partition table enty is found, ROM BASIC is entered via INT 18. All other errors cause a system hang, see label HANG.

NOTES (VERY INTERESTING THINGS……):

1. The first byte of an active partition table entry is 80. This byte is loaded into the DL register before INT 13 is called to read the boot sector. When INT 13 is called, DL is the BIOS device number. Because of this, the boot sector read by this MBR program can only be read from BIOS device number 80 (the first hard disk). This is one of the reasons why it is usually not possible to boot from any other hard disk.


2. The MBR program uses the CHS based INT 13H AH=02H call to read the boot sector of the active partition. The location of the active partition's boot sector is in the partition table entry in CHS format. If the drive is >528MB, this CHS must be a translated CHS (or L-CHS, see my BIOS TYPES document). No addresses in LBA form are used (another reason why LBA

doesn't solve the >528MB problem).


Here is the entire MBR record (hex dump and ascii).

OFFSET 0 1 2 3 4 5 6 7 8 9 A B C D E F *0123456789ABCDEF*

000000 fa33c08e d0bc007c 8bf45007 501ffbfc *.3.....|..P.P...*

000010 bf0006b9 0001f2a5 ea1d0600 00bebe07 *................*

000020 b304803c 80740e80 3c00751c 83c610fe *...<.t..<.u.....*

000030 cb75efcd 188b148b 4c028bee 83c610fe *.u......L.......*

000040 cb741a80 3c0074f4 be8b06ac 3c00740b *.t..<.t.....<.t.*

000050 56bb0700 b40ecd10 5eebf0eb febf0500 *V.......^.......*

000060 bb007cb8 010257cd 135f730c 33c0cd13 *..|...W.._s.3...*

000070 4f75edbe a306ebd3 bec206bf fe7d813d *Ou...........}.=*

000080 55aa75c7 8bf5ea00 7c000049 6e76616c *U.u.....|..Inval*

000090 69642070 61727469 74696f6e 20746162 *id partition tab*

0000a0 6c650045 72726f72 206c6f61 64696e67 *le.Error loading*

0000b0 206f7065 72617469 6e672073 79737465 * operating syste*

0000c0 6d004d69 7373696e 67206f70 65726174 *m.Missing operat*

0000d0 696e6720 73797374 656d0000 00000000 *ing system......*

0000e0 00000000 00000000 00000000 00000000 *................*

0000f0 TO 0001af SAME AS ABOVE

0001b0 00000000 00000000 00000000 00008001 *................*

0001c0 0100060d fef83e00 00000678 0d000000 *......>....x....*

0001d0 00000000 00000000 00000000 00000000 *................*

0001e0 00000000 00000000 00000000 00000000 *................*

0001f0 00000000 00000000 00000000 000055aa *..............U.*

Here is the disassembly of the MBR...

This sector is initially loaded into memory at 0000:7c00 but

it immediately relocates itself to 0000:0600.

BEGIN: NOW AT 0000:7C00, RELOCATE

0000:7C00 FA CLI disable int's

0000:7C01 33C0 XOR AX,AX set stack seg to 0000

0000:7C03 8ED0 MOV SS,AX

0000:7C05 BC007C MOV SP,7C00 set stack ptr to 7c00

0000:7C08 8BF4 MOV SI,SP SI now 7c00

0000:7C0A 50 PUSH AX

0000:7C0B 07 POP ES ES now 0000:7c00

0000:7C0C 50 PUSH AX

0000:7C0D 1F POP DS DS now 0000:7c00

0000:7C0E FB STI allow int's

0000:7C0F FC CLD clear direction

0000:7C10 BF0006 MOV DI,0600 DI now 0600

0000:7C13 B90001 MOV CX,0100 move 256 words (512 bytes)

0000:7C16 F2 REPNZ move MBR from 0000:7c00

0000:7C17 A5 MOVSW to 0000:0600

0000:7C18 EA1D060000 JMP 0000:061D jmp to NEW_LOCATION

NEW_LOCATION: NOW AT 0000:0600

0000:061D BEBE07 MOV SI,07BE point to first table entry

0000:0620 B304 MOV BL,04 there are 4 table entries

SEARCH_LOOP1: SEARCH FOR AN ACTIVE ENTRY

0000:0622 803C80 CMP BYTE PTR [SI],80 is this the active entry?

0000:0625 740E JZ FOUND_ACTIVE yes

0000:0627 803C00 CMP BYTE PTR [SI],00 is this an inactive entry?

0000:062A 751C JNZ NOT_ACTIVE no

0000:062C 83C610 ADD SI,+10 incr table ptr by 16

0000:062F FECB DEC BL decr count

0000:0631 75EF JNZ SEARCH_LOOP1 jmp if not end of table

0000:0633 CD18 INT 18 GO TO ROM BASIC

FOUND_ACTIVE: FOUND THE ACTIVE ENTRY

0000:0635 8B14 MOV DX,[SI] set DH/DL for INT 13 call

0000:0637 8B4C02 MOV CX,[SI+02] set CH/CL for INT 13 call

0000:063A 8BEE MOV BP,SI save table ptr

SEARCH_LOOP2: MAKE SURE ONLY ONE ACTIVE ENTRY

0000:063C 83C610 ADD SI,+10 incr table ptr by 16

0000:063F FECB DEC BL decr count

0000:0641 741A JZ READ_BOOT jmp if end of table

0000:0643 803C00 CMP BYTE PTR [SI],00 is this an inactive entry?

0000:0646 74F4 JZ SEARCH_LOOP2 yes

NOT_ACTIVE: MORE THAN ONE ACTIVE ENTRY FOUND

0000:0648 BE8B06 MOV SI,068B display "Invld prttn tbl"

DISPLAY_MSG: DISPLAY MESSAGE LOOP

0000:064B AC LODSB get char of message

0000:064C 3C00 CMP AL,00 end of message

0000:064E 740B JZ HANG yes

0000:0650 56 PUSH SI save SI

0000:0651 BB0700 MOV BX,0007 screen attributes

0000:0654 B40E MOV AH,0E output 1 char of message

0000:0656 CD10 INT 10 to the display

0000:0658 5E POP SI restore SI

0000:0659 EBF0 JMP DISPLAY_MSG do it again

HANG: HANG THE SYSTEM LOOP

0000:065B EBFE JMP HANG sit and stay!

READ_BOOT: READ ACTIVE PARITION BOOT RECORD

0000:065D BF0500 MOV DI,0005 INT 13 retry count

INT13RTRY: INT 13 RETRY LOOP

0000:0660 BB007C MOV BX,7C00

0000:0663 B80102 MOV AX,0201 read 1 sector

0000:0666 57 PUSH DI save DI

0000:0667 CD13 INT 13 read sector into 0000:7c00

0000:0669 5F POP DI restore DI

0000:066A 730C JNB INT13OK jmp if no INT 13

0000:066C 33C0 XOR AX,AX call INT 13 and

0000:066E CD13 INT 13 do disk reset

0000:0670 4F DEC DI decr DI

0000:0671 75ED JNZ INT13RTRY if not zero, try again

0000:0673 BEA306 MOV SI,06A3 display "Errr ldng systm"

0000:0676 EBD3 JMP DISPLAY_MSG jmp to display loop

INT13OK: INT 13 ERROR

0000:0678 BEC206 MOV SI,06C2 "missing op sys"

0000:067B BFFE7D MOV DI,7DFE point to signature

0000:067E 813D55AA CMP WORD PTR [DI],AA55 is signature correct?

0000:0682 75C7 JNZ DISPLAY_MSG no

0000:0684 8BF5 MOV SI,BP set SI

0000:0686 EA007C0000 JMP 0000:7C00 JUMP TO THE BOOT SECTOR WITH SI POINTING TO PART TABLE ENTRY

0000:0680 ........ ........ ......49 6e76616c * Inval*

0000:0690 69642070 61727469 74696f6e 20746162 *id partition tab*

0000:06a0 6c650045 72726f72 206c6f61 64696e67 *le.Error loading*

0000:06b0 206f7065 72617469 6e672073 79737465 * operating syste*

0000:06c0 6d004d69 7373696e 67206f70 65726174 *m.Missing operat*

0000:06d0 696e6720 73797374 656d00.. ........ *ing system. *

Data not used.

0000:06d0 ........ ........ ......00 00000000 * .....*

0000:06e0 00000000 00000000 00000000 00000000 *................*

0000:06f0 00000000 00000000 00000000 00000000 *................*

0000:0700 00000000 00000000 00000000 00000000 *................*

0000:0710 00000000 00000000 00000000 00000000 *................*

0000:0720 00000000 00000000 00000000 00000000 *................*

0000:0730 00000000 00000000 00000000 00000000 *................*

0000:0740 00000000 00000000 00000000 00000000 *................*

0000:0750 00000000 00000000 00000000 00000000 *................*

0000:0760 00000000 00000000 00000000 00000000 *................*

0000:0770 00000000 00000000 00000000 00000000 *................*

0000:0780 00000000 00000000 00000000 00000000 *................*

0000:0790 00000000 00000000 00000000 00000000 *................*

0000:07a0 00000000 00000000 00000000 00000000 *................*

0000:07b0 00000000 00000000 00000000 0000.... *............ *

The partition table starts at 0000:07be. Each partition table

entry is 16 bytes. This table defines a single primary partition

which is also an active (bootable) partition.

0000:07b0 ........ ........ ........ ....8001 * ....*

0000:07c0 0100060d fef83e00 00000678 0d000000 *......>....x....*

0000:07d0 00000000 00000000 00000000 00000000 *................*

0000:07e0 00000000 00000000 00000000 00000000 *................*

0000:07f0 00000000 00000000 00000000 0000.... *............ *

The last two bytes contain a 55AAH signature (Important bytes and if this not available the Hard drive is not a format or valid one.)

0000:07f0 ........ ........ ........ ....55aa *..............U.*

Thursday, June 28, 2007

What is dead-lock....

What is deadlock and mechanism to prevent it…….

A deadlock is a situation wherein two or more competing actions are waiting for the other to finish, and thus neither ever does. It is often seen in a paradox like 'the chicken or the egg'.

In the computing world deadlock refers to a specific condition when two or more processes are each waiting for another to release a resource, or more than two processes are waiting for resources in a circular chain Deadlock is a common problem in multiprocessing where many processes share a specific type of mutually exclusive resource known as a software, or soft, lock. Computers intended for the time-sharing and/or real-time markets are often equipped with a hardware lock (or hard lock) which guarantees exclusive access to processes, forcing serialization. Deadlocks are particularly troubling because there is no general solution to avoid (soft) deadlocks.

This situation may be likened to two people who are drawing diagrams, with only one pencil and one ruler between them. If one person takes the pencil and the other takes the ruler, a deadlock occurs when the person with the pencil needs the ruler and the person with the ruler needs the pencil, before he can give up the ruler. Both requests can't be satisfied, so a deadlock occurs.

The telecommunication’s description of deadlock is a little stronger: deadlock occurs when none of the processes meet the condition to move to another state (as described in the process's finite state machine) and all the communication channels are empty. The second condition is often left out on other systems but is important in the telecommunication context.

Necessary conditions

There are four necessary conditions for a deadlock to occur, known as the Coffman conditions from their first description in a 1971 article by E. G. Coffman.

  1. Mutual exclusion condition: a resource is either assigned to one process or it is available
  2. Hold and wait condition: processes already holding resources may request new resources
  3. No preemption condition: only a process holding a resource may release it
  4. Circular wait condition: two or more processes form a circular chain where each process waits for a resource that the next process in the chain holds

Deadlock only occurs in systems where all 4 conditions happen.

Circular wait prevention

Circular wait prevention consists in allowing processes to wait for resources, but ensure that the waiting can't be circular. One approach might be to assign a precedence to each resource and force processes to allocate resources in order of increasing precedence. That is to say that if a process holds some resources and the highest precedence of these resources is m, then this process cannot request any resource with precedence smaller than m. This forces resource allocation to follow a particular and non-circular ordering, so circular wait cannot occur. Another approach is to allow holding only one resource per process; if a process requests another resource, it must first free the one it's currently holding (or hold-and-wait).

Examples

An example of a deadlock which may occur in database products is the following. Client applications using the database may require exclusive access to a table, and in order to gain exclusive access they ask for a lock. If one client application holds a lock on a table and attempts to obtain the lock on a second table that is already held by a second client application, this may lead to deadlock if the second application then attempts to obtain the lock that is held by the first application. (But this particular type of deadlock is easily prevented, e.g., by using an all-or-none resource allocation algorithm.)

Another example might be a text formatting program that accepts text sent to it to be processed and then returns the results, but does so only after receiving "enough" text to work on (e.g. 1KB). A text editor program is written that sends the formatter with some text and then waits for the results. In this case a deadlock may occur on the last block of text. Since the formatter may not have sufficient text for processing, it will suspend itself while waiting for the additional text, which will never arrive since the text editor has sent it all of the text it has. Meanwhile, the text editor is itself suspended waiting for the last output from the formatter. This type of deadlock is sometimes referred to as a deadly embrace (properly used only when only two applications are involved) or starvation. However, this situation, too, is easily prevented by having the text editor send a forcing message (eg. EOF) with its last (partial) block of text, which will force the formatter to return the last (partial) block after formatting, and not wait for additional text.

Nevertheless, since there is no general solution for deadlock prevention, each type of deadlock must be anticipated and specially prevented. But general algorithms can be implemented within the operating system so that if one or more applications becomes blocked, it will usually be terminated after a time (and, in the meantime, is allowed no other resources and may need to surrender those it already has, rolled back to a state prior to being obtained by the application).

Avoidance

Deadlock can be avoided if certain information about processes is available in advance of resource allocation. For every resource request, the system sees if granting the request will mean that the system will enter an unsafe state, meaning a state that could result in deadlock. The system then only grants request that will lead to safe states. In order for the system to be able to figure out whether the next state will be safe or unsafe, it must know in advance at any time the number and type of all resources in existence, available, and requested. One known algorithm that is used for deadlock avoidance is the Banker's algorithm, which requires resource usage limit to be known in advance. However, for many systems it is impossible to know in advance what every process will request. This means that deadlock avoidance is often impossible.

Two other algorithms are Wait/Die and Wound/Wait, each of which is uses a symmetry-breaking technique. In both these algorithms there exists an older process (O) and a younger process (Y). Process age can be determined by a time stamp at process creation time. Smaller time stamps are older processes, while larger timestamps represent younger processes.

Wait/Die

Wound/Wait

O is waiting for a resource that is being held by Y

O waits

Y dies

Y is waiting for a resource that is being held by O

Y dies

Y waits


It is important to note that a process may be in unsafe state but would not result in a deadlock. The notion of safe/unsafe state only refers to the ability of the system to enter a deadlock state or not. For example, if a process requests A which would result in an unsafe state, but releases B which would prevent circular wait, then the state is unsafe but the system is not in deadlock.

Prevention

Deadlocks can be prevented by ensuring that at least one of the following four conditions occur:

  • Removing the mutual exclusion condition means that no process may have exclusive access to a resource. This proves impossible for resources that cannot be spooled, and even with spooled resources deadlock could still occur. Algorithms that avoid mutual exclusion are called non-blocking synchronization algorithms.
  • The "hold and wait" conditions may be removed by requiring processes to request all the resources they will need before starting up (or before embarking upon a particular set of operations); this advance knowledge is frequently difficult to satisfy and, in any case, is an inefficient use of resources. Another way is to require processes to release all their resources before requesting all the resources they will need. This too is often impractical. (Such algorithms, such as serializing tokens, are known as the all-or-none algorithms.)
  • A "no preemption" (lockout) condition may also be difficult or impossible to avoid as a process has to be able to have a resource for a certain amount of time, or the processing outcome may be inconsistent or thrashing may occur. However, inability to enforce preemption may interfere with a priority algorithm. (Note: Preemption of a "locked out" resource generally implies a rollback, and is to be avoided, since it is very costly in overhead.) Algorithms that allow preemption include lock-free and wait-free algorithms and optimistic concurrency control.
  • The circular wait condition: Algorithms that avoid circular waits include "disable interrupts during critical sections" , and "use a hierarchy to determine a partial ordering of resources" (where no obvious hierarchy exists, even the memory address of resources has been used to determine ordering) and Dijkstra's solution.

Detection

Often neither deadlock avoidance nor deadlock prevention may be used. Instead deadlock detection and process restart are used by employing an algorithm that tracks resource allocation and process states, and rolls back and restarts one or more of the processes in order to remove the deadlock. Detecting a deadlock that has already occurred is easily possible since the resources that each process has locked and/or currently requested are known to the resource scheduler or OS.

Detecting the possibility of a deadlock before it occurs is much more difficult and is, in fact, generally undecidable, because the halting problem can be rephrased as a deadlock scenario. However, in specific environments, using specific means of locking resources, deadlock detection may be decidable. In the general case, it is not possible to distinguish between algorithms that are merely waiting for a very unlikely set of circumstances to occur and algorithms that will never finish because of deadlock.

Distributed deadlock

Distributed deadlocks can occur in distributed systems when distributed transactions or concurrency control is being used. Distributed deadlocks can be detected either by constructing a global wait-for graph from local wait-for graphs at a deadlock detector or by a distributed algorithm like edge chasing.

Phantom deadlocks are deadlocks that are detected in a distributed system but don't actually exist - they have either been already resolved or no longer exist due to transactions aborting.

Livelock

A livelock is similar to a deadlock, except that the states of the processes involved in the livelock constantly change with regard to one another, none progressing. Livelock is a special case of resource starvation; the general definition only states that a specific process is not progressing.

As a real-world example, livelock occurs when two people meet in a narrow corridor, and each tries to be polite by moving aside to let the other pass, but they end up swaying from side to side without making any progress because they always both move the same way at the same time.

Livelock is a risk with some algorithms that detect and recover from deadlock. If more than one process takes action, the deadlock detection algorithm can repeatedly trigger. This can be avoided by ensuring that only one process (chosen randomly or by priority) takes action.