Tuesday, December 16, 2014

Wait Time Psychology Principles

Wait Time Psychology Principles

Below are the propositions:
  1. Unoccupied time feels longer than occupied time.
  2. Process-waits feel longer than in-process waits.
  3. Anxiety makes waits seem longer.
  4. Uncertain waits seem longer than known, finite waits.
  5. Unfair waits are longer than equitable waits.
  6. The more valuable the service, the longer the customer is willing to wait.
  7. Solo waits feel longer than group waits.

Monday, December 15, 2014

What is Context Switching?

In computing, a context switch is the process of storing and restoring the state (context) of a process or thread so that execution can be resumed from the same point at a later time. This enables multiple processes to share a single CPU and is an essential feature of a multitasking operating system. What constitutes the context is determined by the processor and the operating system.


Context switches are usually computationally intensive, and much of the design of operating systems is to optimize the use of context switches. Switching from one process to another requires a certain amount of time for doing the administration – saving and loading registers and memory maps, updating various tables and lists etc.

A context switch can mean a register context switch, a task context switch, a stack frame switch, a thread context switch, or a process context switch.

Intel Tick Tock.

Attended the CMG India conference at Pune and came across Intel's tick tock

Intel's strategy goes beyond finding ways to shrink components to tinier scales in order to boost power. The company has what it calls a tick-tock strategy. It develops chip technologies in two phases.

The tick phase involves finding a way to shrink elements down to a smaller size.
The tock phase is all about arranging the shrunken elements in the most efficient configuration to increase efficiency.

Example -

Intel's Sandy Bridge chip is an example of a tock technology. The previous tock chip, codenamed Nehalem. After Nehalem (code name) came the next tick: the Westmere family of microprocessors. While they have the same configuration as the Nehalem family of chips, Intel engineered Westmere's components down to 32 nanometers. Following Westmere is the tock of Sandy Bridge.

Wednesday, December 10, 2014

What is the difference among VIRT, RES, and SHR in top output?

VIRT stands for the virtual size of a process, which is the sum of memory it is actually using, memory it has mapped into itself (for instance the video card's RAM for the X server), files on disk that have been mapped into it (most notably shared libraries), and memory shared with other processes. VIRT represents how much memory the program is able to access at the present moment.

RES stands for the resident size, which is an accurate representation of how much actual physical memory a process is consuming. (This also corresponds directly to the %MEM column) This will virtually always be less than the VIRT size, since most programs depend on the C or other library.

SHR indicates how much of the VIRT size is actually sharable memory or libraries. In the case of libraries, it does not necessarily mean that the entire library is resident. For example, if a program only uses a few functions in a library, the whole library is mapped and will be counted in VIRT and SHR, but only the parts of the library file containing the functions being used will actually be loaded in and be counted under RES.