Multi-Processor Programming, Software

From Linearizability to CAP theorem: A brief overview of consistency guarantees in concurrent programs

Concurrent systems, including both multiprocessor and distributed systems, often rely on object replication for improving performance and scalability. Object replication, the idea of keeping multiple local copies of shared data structures, demands another sub-system that ensures consistency between these local copies in real-time!! Network delays in distributed systems and overlapping operations on shared data structures within multiprocessor systems are some of the major challenges in ensuring consistency. To overcome these issues, without sacrificing correctness and performance, the research community has proposed various “relaxations” in the consistency requirement that I intend to cover in the next few sections. Following is the…

Continue Reading

Compiler, LLVM, Pass, Software

Writing your first LLVM pass and registering it in the clang toolchain

There are several detailed tutorials[1] on writing an LLVM pass so that I won’t cover it in much detail. However, as of today(May 2020), there is no detailed guide on registering an LLVM pass within the OPT and Clang toolchains. So, this post will be mainly regarding that. Content: Introduction Types of LLVM passes Writing a basic function pass in LLVM Registering a pass within the OPT toolchain Clang toolchain Introduction LLVM is an extremely modular compiler infrastructure that provides back-end tools for code optimization and transformation. It works on an intermediate representation called LLVM IR. Clang, on the other…

Continue Reading

DDoS, Software

DDoS Defense Triad

Distributed Denial Of Service(DDoS) is one of the most disruptive cybercrimes that can cause substantial financial loss to its the victim. Recent DDoS attacks brought up to 1.3 Tbps of traffic with 126.9 million packets of data per second(Github, Feb 2018) and were used to serve a variety of motives ranging from financial gains to political protests, “Hacktivism.” In this post, I’ll cover three primary DDoS defense techniques that are low cost and can be easily deployed by small to medium scale businesses. Content: Intrusion prevention General Security Policy Ingress and Egress Filtering 3rd party DDoS protection services static signature…

Continue Reading

model checker, Software, static analysis, validation

Understanding dependency graphs for program analysis

Hi, In this blog post, I’ll briefly cover several types of dependency graphs used for program analysis, transformation, and representation. Following is the table of content: Prerequisites Reaching definition analysis Pointer analysis Dominator tree Call graphs Control flow graphs Control dependency graphs Data dependency graphs Program dependency graphs System dependency graphs Prerequisites Reaching definition analysis(RDA) RDA aims to determine the set of variable definitions(assignments) that may( or must) reach a given program point. Every program statement has an Entry set and Exit set associated with it, where the entry set is a set of all variable definitions reaching that statement…

Continue Reading

model checker, Software, static analysis, validation, verification

Static program analysis: Motivation and Techniques

Static analysis is a method to extract specific information about the program without actually running it. In this blog post, we will first have a look at different types of information that we can obtain using static analysis. Later, we will have a comprehensive overview of different techniques for static program analysis. Motivation There are broadly two categories of information, based on their usage, that we can extract: Proscriptive information and Descriptive information[1]. Proscriptive information is obtained when we statically analyze the program behavior against a set of prescribed rules. For instance, identification, localization, and explanation of all software anomalies…

Continue Reading

model checker, Software, static analysis, validation, verification

Embedded software testing, validation and verification

Embedded software, unlike general software, is highly dependent on the hardware they are developed for. Thus it became essential to create a hardware-based or hardware-like environment simultaneously with the software for effective testing. Where simulators and emulators can, up to some extent, provide a hardware-like environment for testing embedded software, they can not always be relied upon while testing for safety-critical applications like flight control system. It is this, high dependency on hardware, which makes testing, verification, and validation of embedded Softwares far more demanding than of general software. Moreover, several safety-critical embedded systems are also strictly real-time, or at…

Continue Reading

BTP, memristor

CMOS-Memristor hybrid circuit for Edge detection using NI Multisim and MATLAB

Hello, In this post, we will have a look at the following: Setting up 180nm/100nm MOSFET Models in Multisim Setting up a memristor model in NI MULTISIM A CMOS-Memristor hybrid circuit for edge detection Using MATLAB for image analysis NI Multisim is an excellent tool for simulation of both analog and digital circuits. One reason I like it over LTSpice or PSpice is the ease with which one can simulate mixed-signal circuitry. Using Multisim along with MATLAB allows conversion of image(pixel by pixel) to its a corresponding discrete voltage signal and vice versa. We can import PSPICE models to multisim…

Continue Reading

BTP, Hardware, memristor

Memristors: Models, Window functions and their SPICE Simulations

This post mainly covers different famous memristor models, window functions along with their SPICE simulations(done on LTSPICE). The window function is used to add non-linearity at the boundaries. In contrast, Models are used to establish a linear/non-linear relationship between the rate of state change and the stimulus (current/voltage). Content: Models Linear Non-linear Threshold Macro-model Window functions Properties of window functions Types of window functions: Struckov Benderli Joglekar Biolek Prodomakis Jinxiang SPICE simulations Memristor Models Linear Ion drift Model (Ideal Model) In this model, there exists a linear relationship between the state derivative and the stimuli(Voltage/Current). It assumes that vacancies have…

Continue Reading

BTP, Hardware, memristor

Memristors : Motivation, Theory and Feasibility

Memristors, the fourth missing element after Inductance, Resistance, and capacitance, is nowadays a scorching topic of research among the electronics community. A large number of papers on its models, applications, and feasibility are now available. In this post, I’ll try to cover most of its background research: Content:- Introduction What are memristors? Characteristics of a memristor Transistor vs. memristor The polarity of a memristor and an analogy Memristor links to chaos theory?[TBD] Motivation well-known problems with present-day computers limitations of CMOS technology Moore’s soul at unrest Theory History Before HP After HP HP’s model Memristive systems Problems with Chua’s memristor…

Continue Reading

File system, RTEMS, RTOS, Software

Setting up YAFFS2 and JFFS2 on RTEMS with flash simulated on a RAM-disk

Hi all, In this post, we’ll look forward to setting up flash file systems namely JFFS2 and YAFFS2 on RTEMS with flash simulated on a RAM-disk. For file system benchmarking purposes, we didn’t actually use them on a real flash(as to eliminate the effect of flash driver’s performance) but implementing them on a real flash won’t be very different from the process given in the later sections of this post. So, let’s begin with JFFS2 first: JFFS2 on RTEMS First reference you will see is of testsuites/fstests/jffs2_support/fs_support.c . Configuration here works up to a large extent unless the size of…

Continue Reading