<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vithusha Aarabhi on Medium]]></title>
        <description><![CDATA[Stories by Vithusha Aarabhi on Medium]]></description>
        <link>https://medium.com/@vithushaaarabhi?source=rss-e94bd540ccbf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*G0h2gSOapr8ntYcQ.</url>
            <title>Stories by Vithusha Aarabhi on Medium</title>
            <link>https://medium.com/@vithushaaarabhi?source=rss-e94bd540ccbf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 09:36:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vithushaaarabhi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Diagram Understanding With Grammars]]></title>
            <link>https://medium.com/@vithushaaarabhi/diagram-understanding-with-grammars-26cfa9987dee?source=rss-e94bd540ccbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/26cfa9987dee</guid>
            <category><![CDATA[trogonometr]]></category>
            <category><![CDATA[grammar]]></category>
            <category><![CDATA[context-free-grammar]]></category>
            <category><![CDATA[diagram-understanding]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Vithusha Aarabhi]]></dc:creator>
            <pubDate>Fri, 22 Sep 2017 09:28:02 GMT</pubDate>
            <atom:updated>2017-09-22T09:28:02.340Z</atom:updated>
            <content:encoded><![CDATA[<p>A grammar is a set of structural rules for strings in formal languages which doesn’t semantically describe the strings, but their form. We all know that different grammar rules are applied for different languages.Are these grammars applied only on strings? Can we make efforts to apply these grammars to form and understand different types of diagrams? Yes, in this blog we will look on how can grammars be used to define simple diagrams.</p><p>A formal grammar consists of a finite set of production rules in the following form.<br>Left-hand side → Right-hand side.<br>A production allows one to take a string containing the variables in the LHS and replace the them by the RHS of the production where, each side consists of a finite sequence of symbols.<br> * Start symbol<br> * Set of nonterminal symbols<br> * Set of non terminal symbols</p><p>Example -Production rules :<br>S → AB<br>S → ε (ε is the empty string)<br>A → aS<br>B → b<br>where, S is the start symbol, {a, b} is the terminal set and {S, A, B} is the non terminal set.</p><p><strong>Types of grammars</strong></p><p>There are commonly four grammar types as given below.<br>1. Type 0 : Unrestricted grammar<br>2. Type 1 : Context Sensitive Grammar<br>3. Type 2 : Context Free Grammar<br>4. Type 4 : Regular Grammar</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*iKVA_BOnYzGB9NPfYkCEjw.png" /><figcaption>Scope of grammar types</figcaption></figure><p>In our blog, we are going to focus more on the type 2 grammar which is the context free grammar to define the simple diagrams.</p><p><strong>Context Free Grammar : An introduction<br></strong>A formal definition of a context free grammar is a 4-tuple (V, Σ, S, P) where:<br>• V is a finite set of variables<br>• Σ is a finite alphabet of terminals<br>• S is the start variable <br>• P is the finite set of productions, each production has the form V → (V ∪ Σ)*</p><p>example : <br> S → 0S1<br> S → ε <br>A derivation can be:<br>S ⇒ 0S1 ⇒ 00S11 ⇒ 0011 and the string 0011 is in the language generated through the grammar rules.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9XKUcm8au4U%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9XKUcm8au4U&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9XKUcm8au4U%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e09a7d5bb233c5604a8189c1901c12c5/href">https://medium.com/media/e09a7d5bb233c5604a8189c1901c12c5/href</a></iframe><p>An individual substitution rule can be recursive such that the same nonterminal can exist on both the right and left side of the equation. An example of a rule which has this property is B →BC.</p><p>In our scope, the grammars are in a form called Chomsky Normal Form. This<br>imposes several additional restrictions as to the format of the substitution rules. A grammar is in Chomsky normal form if all the substitution rules are of the form:<br> A →BC , A → d or A → ε. Here, A,B,C are nonterminals, d is a terminal, and<br>ε is the empty string. <br>The start nonterminal cannot exist on the right hand side of any substitution rule. That means B and C cannot be the start symbol.</p><h4><strong>Using Context Free Grammar to define diagrams</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*_xvZxdaGksfauqylWxpUOw.png" /><figcaption>Simple Trigonometric diagram</figcaption></figure><p>Let us consider a simple diagram as given above. A diagram or a sentence can be enumerated through different grammar structures. But, we will define a context free grammar which incorporates each of different types of simple trigonometric diagram.<br>Let’s now try to understand the defined context free grammar with the terminals and nonterminals of the diagrams. The basic components of a diagram that forms it are straight lines where the intermediate elements would be connections and open/close figures.<br><br>1. S → S | SF |FF | ε<br>2. F → CC| CL | FL<br>3. C → LL<br>4. L → l</p><p><strong>Non terminals</strong><br>S - Initial graph<br>F - Figure (A closed or an open structure of more than two lines)<br>C - Two lines that touch each other at one end.<br>L - Line<br><strong>Terminal<br></strong>l is a representation for the straight lines that form the structure.</p><p>All the production rules given above should satisfy some spatial relationships like touch or overlap relationship between each element. The third rule implies the formation of a connection with two lines when they touch each other.The second rule implies that a figure can be formed with the combination of two connections, a connection and a line or a figure and a line when they have a touch connection with each other.<br>The first rule implies the initial diagram (complete diagram) through the joining of more than a figure through recursiveness.</p><p>This is a simple way of defining trigonometric diagrams with a context free grammar. Now I hope that you will also be able to start writing grammars for simple diagram types. You can test the validity of your grammar with <a href="http://mdaines.github.io/grammophone/#">this tool</a> as well.</p><p><strong>References</strong></p><p><a href="https://en.wikipedia.org/wiki/Chomsky_hierarchy">https://en.wikipedia.org/wiki/Chomsky_hierarchy</a><a href="https://www.tutorialspoint.com/automata_theory/chomsky_classification_of_grammars.htm"><br>https://www.tutorialspoint.com/automata_theory/chomsky_classification_of_grammars.htm</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26cfa9987dee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exokernels : An Operating System Architecture for Application Level Resource Management]]></title>
            <link>https://medium.com/@vithushaaarabhi/exokernels-an-operating-system-architecture-for-application-level-resource-management-32d0daaeeab0?source=rss-e94bd540ccbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/32d0daaeeab0</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[exo-kernel]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[kernel]]></category>
            <dc:creator><![CDATA[Vithusha Aarabhi]]></dc:creator>
            <pubDate>Sat, 02 Sep 2017 11:29:31 GMT</pubDate>
            <atom:updated>2017-09-02T11:36:03.328Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*w0h73zPzDoQjEgJlzDncSw.jpeg" /></figure><p>Most of us know what kernels are and how do they work to make programmers’ lives easier. But, how many of us know what exokernels are? I hope you will be able to get a brief introduction on this terminology through this blog. <br>Let’s start with a brief introduction on kernel.</p><p><strong>What is a kernel?</strong></p><p>A kernel is the foundational layer of an operating system that functions at a basic level, communicating with hardware and managing resources, such as CPU and the memory. It works as an interface between the user application and the hardware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*xUDqEtSmXtQxwyld-l7F6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*xiA97ypyOc7NM9d6fchoHA.jpeg" /></figure><p>There are two main types of kernel<br>1. Micro kernel<br>2. Monolithic Kernel</p><p>To know more about kernels and how they work, read <a href="http://keetmalin.wixsite.com/keetmalin/single-post/2017/08/24/An-Introduction-to-Kernels-The-Heart-of-Computing-Devices"><em>this blog</em></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*2F0aaERPkGftIKuHbTZklQ.gif" /></figure><p>Now let’s head into our main focus.</p><p><strong>What is an Exokernel?</strong></p><p>Exokernel is an operating system developed at the MIT that provides application-level management of hardware resources. This architecture is designed to separate resource protection from management to facilitate application-specific customization.<br>Let’s try to understand how this actually works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*4yHHO2Cz9ORqSCQfYDRCbg.png" /></figure><p>The ultimate idea behind the development of exokernel is to impose as few abstractions as possible on the developers of the applications by providing them with the freedom to use the abstractions as and when needed. This ensures that there is no forced abstraction, which is what makes exokernel different from micro-kernels and monolithic kernels.But, how does exokernel support this?</p><p>This is done by moving all the hardware abstractions into untrusted user-space libraries called “library operating systems” (libOS), which are linked to applications call the operating system on their behalf. So basically, the kernel allocates the basic physical resources of the machine (disk blocks, memory, and processor time) to multiple application programs, and each program decides on what to do with these resources.</p><p>For an example, an application can manage its own disk-block cache, it can also share the pages with the other applications, but the exokernel allows cached pages to be shared securely across all applications. Thus, the exokernel protects pages and disk blocks, but applications manage them.</p><p>Of course, not all applications need customized resource management. At these instances, the applications can be linked with the support libraries that implement the abstractions that the applications need. However, library implementations are unprivileged and can therefore be modified or replaced at the user’s needs as well. This helps the programmers to choose what level of abstraction they want, high, or low.</p><p><strong>Principles of Exokernels</strong></p><p>1. Separate protection and management : Resource management is restricted to functions necessary for protection.<br>2. Expose allocation : Applications allocate resources explicitly.<br>3. Expose name : Exokernels use physical names wherever possible. <br>4. Expose revocation : Exokernels let applications to choose which instance of a resource to give up.<br>5. Expose information : Exokernels expose all system information and collect data that applications cannot easily derive locally.</p><p><strong>Advantages of Exokernels</strong></p><ol><li>Significant performance increase.</li><li>Applications can make more efficient and intelligent use of hardware resources by being aware of resource availability, revocation and allocation.</li><li>Ease development and testing of new operating system ideas. (New scheduling techniques, memory management methods, etc)</li></ol><p><strong>Disadvantages of Exokernels</strong></p><p>1.<strong> </strong>Complexity in design of exokernel interfaces.<br>2. Less consistency.</p><p><strong>Reference<br></strong>1<strong>. </strong>https://www.techopedia.com/definition/27006/exokernel<br>2. <a href="https://en.wikipedia.org/wiki/Exokernel">https://en.wikipedia.org/wiki/Exokernel</a><br>3. <a href="https://pdos.csail.mit.edu/papers/exo-sosp97/exo-sosp97.html">https://pdos.csail.mit.edu/papers/exo-sosp97/exo-sosp97.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32d0daaeeab0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>