News Column

Patent Issued for Dynamic Tracing of Thread Execution within an Operating System Kernel

July 3, 2014



By a News Reporter-Staff News Editor at Computer Weekly News -- A patent by the inventors Jacob, Samuel (Bangalore, IN); Paul, Vijay (Bangalore, IN); Mathew, Subin Cyriac (Bangalore, IN), filed on July 22, 2011, was published online on June 17, 2014, according to news reporting originating from Alexandria, Virginia, by VerticalNews correspondents.

Patent number 8756461 is assigned to Juniper Networks, Inc. (Sunnyvale, CA).

The following quote was obtained by the news editors from the background information supplied by the inventors: "A computing device typically executes software, referred to as an 'operating system,' responsible for providing an interface between hardware of the computing device and application software. This operating system also generally provides common services for execution of the application software. The operating system may include a number of different components for providing the interface between the hardware and the application software, such as a kernel component, a networking component, a security component and a user interface component. The kernel component (which is often referred to as the 'kernel'), may represent the core component that manages or otherwise controls the interface between application software and the hardware of the computing device. The kernel manages the execution of application software by the underlying hardware, instantiating or otherwise creating a process, allocating memory and other hardware resources for use by the process, establishing a priority for the process, loading program instructions into memory and scheduling execution of the loaded instructions associated with the process by the underlying hardware.

"In executing the process, one or more of the process instructions may include what are referred to as 'system calls.' System calls represent instructions used to invoke or call a system service provided by the operating system for use by application programs. Via system calls, for example, the application program may access file systems presented by the operating system to the application program portion of the computing device (which is commonly referred to as 'user space'), manage process execution by the underlying hardware, access network functionality, manage hardware devices, and maintain operating system information (such as time, system data, process, file or device attributes, to name a few examples). Thus, when issuing system calls, the process may interface with the kernel of the operating system to access one or more of these system services, thereby alleviating developers of application programs from having to repeatedly implement such core system services for every different type of operating environment. In effect, the operating system abstracts the underlying hardware specifics, presenting instead a standard interface by which application programs may interface with the underlying hardware without knowing the specifics of the underlying hardware.

"The kernel receives these system calls and handles these system calls by providing the system service for use by the process. In some instances, the system call may fail. For certain computing devices, such as network routers, system call failures may result in these routers being unable to process routing protocol message pertinent to the forwarding of data packets through a network. Such failures may therefore impact not only the network router but the network as a whole, where other network routers have to reroute data packets around the failed network router.

"System call failures may be especially troublesome for those high-end routers that provide so-called 'high-availability' routing functionality. High-availability routing functionality refers to routers that each includes a primary routing engine and a backup routing engine, where the backup routing engine may seamlessly resume routing functionality in the event the primary routing engine fails, thereby providing high availability to routing functionality in the event of failure. Yet, both the primary and backup routing engines typically execute different instances of the same operating system. A failed system call that results in a failure of the primary routing engine is likely to impact the backup routing engine when the application program resumes executing on the backup routing engine. That is, upon resuming execution of the application program with the backup routing engine that issued the system call that resulted in the primary routing engine failure, the application program may re-issue this same system call that more than likely also fails on the backup routing engine (considering the backup and primary routing engines are executing different instances of the same operating system). Consequently, system call failures may be especially troublesome for those high-end routers that provide high-availability routing functionality because such system call failures may result in failures of both the primary and standby or backup routing engine."

In addition to the background information obtained for this patent, VerticalNews journalists also obtained the inventors' summary information for this patent: "In general, techniques are described for performing dynamic thread tracing within an operating system kernel. The term 'thread' refers to a thread of execution of instructions, where a so-called process may include one or more threads. Rather than trace every thread currently being executed by an operating system, as is common when attempting to enable hardware-level thread tracing, the techniques described in this disclosure may facilitate dynamic tracing of a single thread of instruction execution without tracing other threads of which the operating system may be responsible for managing execution. The techniques may enable a kernel of an operating system to enable hardware-level tracing of an individual thread during the execution of this thread by the hardware. In switching between those threads for which tracing is not enabled and those for which tracing is enabled (where such switching is commonly referred to as a 'context switch), the techniques may enable the kernel to enable and disable tracing on a per-thread basis depending on whether tracing for such threads is enabled, even for threads of the same software process that share a common memory space and other resources. In this respect, not only do the techniques facilitate per-thread tracing, but also provide tracing in a dynamic manner as tracing may be enabled or disabled dynamically during execution of the threads.

"The techniques may therefore promote more targeted trace logs that may permit operating system developers to more easily identify programming errors (or so-called 'bugs') that result in device failures. The techniques may also provide a way to translate trace logs, which commonly specify a list of instruction addresses, to a human-readable text file, which may further facilitate developers in identifying these programming errors. By being able to potentially more quickly and accurately identify programming errors using the human-readable text file provided by the techniques described in this disclosure, the techniques may enable developers to more quickly correct these programming errors. Considering the disabling effect such system call errors may have on computing devices and, more particularly, network routers that provide high-availability routing functionality, the techniques may facilitate more timely error correction, which may increase network reliability or otherwise reduce network device downtimes.

"In one embodiment, a method comprises concurrently executing a plurality of software processes by an operating system of a control unit of a network device, wherein each of the plurality of processes comprises an instance of one of a plurality of application programs, wherein each of the plurality of processes comprises one or more separate threads of instruction execution. The method further comprises tracing, with the control unit, execution of a system call issued to the operating system by one of the one or more threads corresponding to one of the plurality of processes currently being executed by the control unit to generate a trace log that traces execution of the system call by the operating system without tracing execution of any other ones of the one or more threads corresponding to those of the plurality of processes that are also being executed by the operating system during execution of the system call.

"In another embodiment, a computing device comprises a plurality of processes, wherein each of the plurality of processes comprises an instance of one of a plurality of application programs, wherein each of the plurality of processes comprises one or more separate threads of instruction execution, an operating system, and a control unit that executes the operating system. The operating system concurrently executes the plurality of processes. The control unit traces execution of a system call issued to the operating system by one of the one or more threads corresponding to one of the plurality of processes currently being executed by the control unit to generate a trace log that traces execution of the system call by the operating system without tracing execution of any other ones of the one or more threads corresponding to those of the plurality of processes that are also being executed by the operating system during execution of the system call.

"In another embodiment, a system comprises a network device comprising a plurality of processes, wherein each of the plurality of processes comprises an instance of one of a plurality of application programs, wherein each of the plurality of processes comprises one or more separate threads of instruction execution, an operating system, and a control unit that executes the operating system. The operating system concurrently executes the plurality of processes. The control unit traces execution of a system call issued to the operating system by one of the one or more threads corresponding to one of the plurality of processes currently being executed by the control unit of the network device to generate a trace log that traces execution of the system call by the operating system without tracing execution of any other ones of the one or more threads corresponding to those of the plurality of processes that are also being executed by the operating system during execution of the system call. The system also includes a computing device comprising a control unit that stores compilation files generated when compiling the operating system, receives the trace log, and generates a human-readable version of the trace log based on the trace log and the compilation files generated when compiling the operating system.

"In another embodiment, a non-transitory computer-readable medium comprises instruction that, when executed, cause one or more processors to concurrently execute a plurality of software processes by an operating system of the one or more processors, wherein each of the plurality of processes comprises an instance of one of a plurality of application programs, wherein each of the plurality of processes comprises one or more separate threads of instruction execution and trace execution of a system call issued to the operating system by one of the one or more threads corresponding to one of the plurality of processes currently being executed by the one or more processors to generate a trace log that traces execution of the system call by the operating system without tracing execution of any other ones of the one or more threads corresponding to those of the plurality of processes that are also being executed by the operating system during execution of the system call.

"In another embodiment, a method comprises concurrently executing, with an operating system of a control unit included within a computing device, a plurality of processes, wherein each of the plurality of processes comprises an instance of one of a plurality of application programs, wherein each of the plurality of processes comprises one or more separate threads of instruction execution and determining, with the operating system, that an error occurred when executing a system call issued by one of the one or more threads corresponding to one of the plurality of processes. The method further comprises, in response to the error, configuring, with the one of the threads that issued the system call, the operating system to enable tracing of the one of the threads that issued the system call without tracing any other threads corresponding to the one or any other one of the plurality of concurrently executed processes, and configuring, with the operating system, one or more registers of the control unit to enable tracing. The method also comprises, after configuring the one or more registers of the control unit to enable tracing, re-issuing the system call with the one of the one or more threads to the operating system and tracing execution of the re-issued system call by the operating system with the control unit to generate a trace log that traces execution of the system call without tracing execution of any other system calls issued by any other ones of threads corresponding to the one or any other one of the plurality of concurrently executed processes.

"The details of one or more embodiments of the techniques are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the techniques will be apparent from the description and drawings, and from the claims."

URL and more information on this patent, see: Jacob, Samuel; Paul, Vijay; Mathew, Subin Cyriac. Dynamic Tracing of Thread Execution within an Operating System Kernel. U.S. Patent Number 8756461, filed July 22, 2011, and published online on June 17, 2014. Patent URL: http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.htm&r=1&f=G&l=50&s1=8756461.PN.&OS=PN/8756461RS=PN/8756461

Keywords for this news article include: Software, Juniper Networks Inc..

Our reports deliver fact-based news of research and discoveries from around the world. Copyright 2014, NewsRx LLC


For more stories covering the world of technology, please see HispanicBusiness' Tech Channel



Source: Computer Weekly News


Story Tools






HispanicBusiness.com Facebook Linkedin Twitter RSS Feed Email Alerts & Newsletters