Debugging is the process of finding the problems in a computer system and solving them. There are many different ways in which operating systems perform debugging. Some of these are −
The log files record all the events that occur in an operating system. This is done by writing all the messages into a log file. There are different types of log files. Some of these are given as follows −
These stores the records of all the events that occur in the execution of a system. This is done so that the activities of all the events can be understood to diagnose problems.
The transaction logs store the changes to the data so that the system can recover from crashes and other errors. These logs are readable by a human.
These logs store both the public and private messages between the users. They are mostly plain text files, but in some cases they may be HTML files.
The core dump files contain the memory address space of a process that terminates unexpectedly. The creation of the core dump is triggered in response to program crashes by the kernel. The core dump files are used by the developers to find the program’s state at the time of its termination so that they can find out why the termination occurred.
The automatic creation of the core dump files can be disabled by the users. This may be done to improve performance, clear disk space or increase security.
In the event of a total system failure, the information about the state of the operating system is captured in crash dump files. There are three types of dump that can be captured when a system crashes. These are −
The whole contents of the physical memory at the time of the system crash are captured in the complete memory dump. This is the default setting on the Windows Server System.
Only the kernel mode read and write pages that are present in the main memory at the time of the system crash are stored in the kernel memory dump.
This memory dump contains the list of device drivers, stop code, process and thread information, kernel stack etc.
The trace listing record information about a program execution using logging. This information is used by programmers for debugging. System administrators and technical personnel can use the trace listings to find the common problems with software using software monitoring tools.
This is a type of program analysis that measures various parameters in a program such as space and time complexity, frequency and duration of function calls, usage of specific instructions etc. Profiling is done by monitoring the source code of the required system program using a code profiler.