What is the overhead of a context-switch?

As wikipedia knows in its Context switch article, “context switch is the process of storing and restoring the state (context) of a process so that execution can be resumed from the same point at a later time.“. I’ll assume context switch between two processes of the same OS, not the user/kernel mode transition (syscall) which … Read more

How to detect if my application is running in a virtual machine?

This is what I use: using (var searcher = new System.Management.ManagementObjectSearcher(“Select * from Win32_ComputerSystem”)) { using (var items = searcher.Get()) { foreach (var item in items) { string manufacturer = item[“Manufacturer”].ToString().ToLower(); if ((manufacturer == “microsoft corporation” && item[“Model”].ToString().ToUpperInvariant().Contains(“VIRTUAL”)) || manufacturer.Contains(“vmware”) || item[“Model”].ToString() == “VirtualBox”) { return true; } } } } return false; Edit 2014-12-02: … Read more

WPF ListBox with a ListBox – UI Virtualization and Scrolling

It is possible to achieve smooth scrolling VirtualizingStackPanels in WPF 4.0 without sacrificing virtualization if you’re prepared to use reflection to access private functionality of the VirtualizingStackPanel. All you have to do is set the private IsPixelBased property of the VirtualizingStackPanel to true. Note that in .Net 4.5 there’s no need for this hack as … Read more

why setting ScrollViewer.CanContentScroll to false disable virtualization

“ScrollViewer currently allows two scrolling modes: smooth pixel-by-pixel scrolling (CanContentScroll = false) or discrete item-by-item scrolling (CanContentScroll = true). Currently WPF supports UI virtualization only when scrolling by item. Pixel-based scrolling is also called “physical scrolling” and item-based scrolling is also called “logical scrolling”.” Virtualization requires an item-based scrolling so it can keep track of … Read more

Cross-browser testing: All major browsers on ONE machine

Contents Which browsers have to be tested? Rules of thumb: Which browsers should be included? Preparation Windows XP Windows 7+ (for IE9+) Browser downloads Internet Explorer Firefox Opera Chrome Safari Adobe Flash Player Download summary Sandboxie Part 2: Installation and configuration Internet Explorer Firefox Opera Chrome Safari Developer tools (and shortcuts) Measured set-up time and … Read more

Intel’s HAXM equivalent for AMD on Windows OS

Posting a new answer since it is 2019. TLDR: AMD is now supported on both Windows and Linux via WHPX and yes, Genymotion is faster as it is using x86 architecture virtualization. From the Android docs (January 2019): Though we recommend using HAXM on Windows, it is possible to use Windows Hypervisor Platform (WHPX) with … Read more

What are the differences between virtual memory and physical memory?

Softwares run on the OS on a very simple premise – they require memory. The device OS provides it in the form of RAM. The amount of memory required may vary – some softwares need huge memory, some require paltry memory. Most (if not all) users run multiple applications on the OS simultaneously, and given … Read more

What do I do when launching an application triggers repeating, endless Windows Installer self-repair?

Self-Repair, Simple & Short Explanation: Why does the MSI installer reconfigure if I delete a file? Concrete Design Advice for your WiX / MSI File I keep trying to write about repeating MSI self-repair for developers, but end up with too much detail. Here is my last attempt: concrete design advice for what not to … Read more