<?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 Darshana Seneviratna on Medium]]></title>
        <description><![CDATA[Stories by Darshana Seneviratna on Medium]]></description>
        <link>https://medium.com/@dpbrayan1?source=rss-c6d9f3932e9e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sWBruRPgST75Vx9bt7ny3w.jpeg</url>
            <title>Stories by Darshana Seneviratna on Medium</title>
            <link>https://medium.com/@dpbrayan1?source=rss-c6d9f3932e9e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:11:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dpbrayan1/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[Future of User Interface Design]]></title>
            <link>https://medium.com/@dpbrayan1/future-of-user-interface-design-1c5d8fa78295?source=rss-c6d9f3932e9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c5d8fa78295</guid>
            <dc:creator><![CDATA[Darshana Seneviratna]]></dc:creator>
            <pubDate>Tue, 05 Apr 2022 15:38:32 GMT</pubDate>
            <atom:updated>2022-04-05T15:38:32.729Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*UvCh590PD43iqvjM2IYaMg.jpeg" /><figcaption>Future of User Interface Design</figcaption></figure><p>The <strong>User Interface(UI)</strong> plays had a mind-blowing influence throughout the course of recent many years. UI can be characterized as each visual part of a savvy gadget, that empowers the client to interface with the innovation in a generally consistent way. Basically, it addresses the way that clients associate with a given site or application. Nowadays, the plan and client experience of utilizations are a higher priority than at any other time. Throughout recent years, UI plans improved with an assortment of patterns. These days, UI is a quickly further developing region in the business. UI/UX engineers work on the look and believe and increase the value of the items.</p><blockquote><strong>Different user interface designs in future</strong></blockquote><ol><li><em>Voice User Interface</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*G7RrtPAqbEjFDwxLw3F3XQ.jpeg" /><figcaption>Voice User Interface</figcaption></figure><p>Voice User Interfaces, or VUIs, are sound, visual, and material connection points that permit individuals to collaborate with gadgets utilizing their voices. The presence of a visual connection point isn’t needed for a VUI. Voice With brilliant associates like Siri, Alexa, Google, and Cortana, UI has made progressive progress, with discourse being the fundamental method of human correspondence. The eventual fate of UI configuration is presently, and it’s turning out to be endlessly better as AI abilities grow with greater commitment. Individuals lean toward voice interfaces since it permits them to work quicker and save time. Voice interfaces require not so much mind but rather more natural reactions, simplifying it for clients to get done with jobs or improve on their work.</p><p>2. <em>Augmented Reality</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*4kRzruIkaBxr_48vRaqiYw.jpeg" /><figcaption>Augmented Reality</figcaption></figure><p>Augmented Reality (AR) is an intellectual encounter of a genuine climate where the articles that live in reality are upgraded by PC-produced perceptual data, at times across numerous tangible modalities, including visual, hear-able, and haptic. There are applications like Google interpret, Pokemon Go, and Lenskart. While remembering this, the idea of customary route configuration examples can be to some degree excess and AR will support another period in the UI plan.</p><p>3. <em>Virtual Reality</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qlwCZyESto-GhvrFnifhnw.jpeg" /><figcaption>Virtual Reality</figcaption></figure><p>Virtual Reality, or VR, is a carefully prepared mechanical player, yet it has ascended higher than ever lately with the send-off of VR headsets. Virtual Reality establishes a three-layered fake climate that can be investigated and connected with, giving an extraordinary encounter. The virtual climate is intended to give the client the feeling that they are in a genuine spot. Computer Virtual Reality’s capability to give vivid and engaging encounters is impelling it into new ventures like wellbeing, design, gaming, amusement, neighborliness, and artistic expression. It’s simply that extra examination and mechanical improvement are required before a high-potential point of interaction can fundamentally affect our day-to-day routines.</p><p>4. <em>Gesture Recognition</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JsXzneqLSDP1ZZx43RJsSA.jpeg" /><figcaption>Gesture Recognition</figcaption></figure><p>Motion Interfaces will be connection points that are constrained by hand developments or contact, for example, looking over, tapping, squeezing, shifting, shaking, etc. In the present tech world, signal-based UI has gone quite far and is getting momentum in store for UI plans. Gesture Recognition interface innovation peruses body development with sensors or a camera and sends the data to a PC, which recognizes motions as contributions to controlling gadgets or projects. Gesture Recognition requires development input from a hand-held regulator, a camera that catches development, or one more info gadget like gloves. This type of connection point is normally utilized in computer games, diversion, and cell phones to the conveyor control them. The blend of signal-able developments and contact screens that empower better game control, generally for 3D gaming, is the fate of gestural UIs in gaming.</p><blockquote><strong>Next Generation UI Design Tools</strong></blockquote><p>UI configuration devices have made considerable progress since the original Adobe Photoshop, a program expected for altering photographs, not making dynamic UIs. This age of devices, like Adobe XD, Figma, and Sketch, have made UI plans more straightforward and quicker. Future UI apparatuses will unite plan and code to give a more consistent encounter to creators and engineers. Current devices aren’t assisting us with planning web UIs. They’re assisting us with planning unique portrayals of web UIs.</p><p><strong>Integrating Design and Code</strong></p><p>Future UI instruments will join plan and coding to give architects and engineers a seriously fulfilling change. Our present advancements help us in making unique portrayals of web UIs instead of real web-based UIs. Figma and Sketch models are independent of the first code.</p><p><strong>Parallel Creation Will Replace Designer/Developer Handoffs</strong></p><p>There is an unreasonable measure of this way and that among originators and engineers, especially during the handoff cycle. Handoff may be so tedious and depleting that the nature of the work endures subsequently. Engineers will never again be totally answerable for UI configuration on account of cutting-edge plan apparatuses that connect points with source code. All things considered, they’ll have the option to focus on making the legitimate design that associates an item’s UI to its back end and permits it to successfully work.</p><p><strong>Impact on everyday life</strong></p><p>With regards to innovative headways, what’s to come is surely energizing, and in many regards, the future has previously shown up! We’ll take a gander at certain instances of what future UI configuration will mean for our regular routines. It’s a magnificent second to contemplate what’s approaching next in innovation. All in all, what are your forecasts for what’s to come? What will our job as originators resemble from now on? How might we adjust to new advancements? Despite the fact that there are many inquiries right now, one thing is sure: we will presently not be functioning as UI/UX architects as we probably are aware of them today.</p><p><strong><em>Thank you for reading my article! Hope you got something from this…</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c5d8fa78295" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Licensing]]></title>
            <link>https://medium.com/@dpbrayan1/software-licensing-73340236cf0e?source=rss-c6d9f3932e9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/73340236cf0e</guid>
            <dc:creator><![CDATA[Darshana Seneviratna]]></dc:creator>
            <pubDate>Mon, 07 Sep 2020 18:33:56 GMT</pubDate>
            <atom:updated>2020-09-07T18:33:56.288Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*Au13ZkgjrWrarmAPSFMPIA.jpeg" /><figcaption>software licensing</figcaption></figure><blockquote><strong>What is a software licensing?</strong></blockquote><p>Software licensing describes the legal rights pertaining to the authorized use of digital material. Failure to adhere to software license agreement terms often incurs criminal charges related to licensed intellectual property (IP) and copyrighted material.</p><p>Free and open-source licenses include free software with no monetary usage charge, but users, or licensees, are legally required to abide by agreement terms. Generally purchased software is sold with proprietary licenses, and despite much legal jargon, many license term particulars have no legal basis or are unenforceable.</p><blockquote><strong>What are the different types of software licenses?</strong></blockquote><p>Here are five types of common software license models you should know about.</p><p><strong>Public domain:-</strong> This is the most permissive type of software license. When software is in the public domain, anyone can modify and use the software without any restrictions. But you should always make sure it’s secure before adding it to your own codebase. Warning: Code that doesn’t have an explicit license is NOT automatically in the public domain. This includes code snippets you find on the internet.</p><p><strong>Permissive:-</strong> Permissive licenses are also known as “Apache-style” or “BSD style.” They contain minimal requirements about how the software can be modified or redistributed. This type of software license is perhaps the most popular license used with free and open-source software. Aside from the Apache License and the BSD License, another common variant is the MIT License.</p><p><strong>LGPL:-</strong> The GNU Lesser General Public License allows you to link to open source libraries in your software. If you simply compile or link an LGPL-licensed library with your own code, you can release your application under any license you want, even a proprietary license. But if you modify the library or copy parts of it into your code, you’ll have to release your application under similar terms as the LGPL.</p><p><strong>Copyleft:-</strong> Copyleft licenses are also known as reciprocal licenses or restrictive licenses. The most well-known example of copyleft or reciprocal license is the GPL. These licenses allow you to modify the licensed code and distribute new works based on it, as long as you distribute any new works or adaptations under the same software license. For example, a component’s license might say the work is free to use and distribute for personal use only. So any derivative you create would also be limited to personal use only.</p><p><strong>Proprietary:-</strong> Of all types of software licenses, this is the most restrictive. The idea behind it is that all rights are reserved. It’s generally used for proprietary software where the work may not be modified or redistributed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*TXX3jTL9JBmZPadJBDUhJg.jpeg" /><figcaption>software licensing</figcaption></figure><blockquote><strong>Why software licensing is important?</strong></blockquote><p>Organizations must be canny in the licenses they buy to guarantee initially they are utilizing programming lawfully and besides, they aren’t paying for licenses that aren’t being utilized. By procuring such a large number of programming licenses you’re squandering organization assets, without enough you leave yourself subject to an expected claim (which is very exorbitant). Finding the correct permit understanding can likewise make it simpler to oversee programming in your organization.</p><blockquote><strong>License compatibility between common software licenses</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*7fJVEGF-flKfDFEVLZshqg.png" /><figcaption>license compatibility</figcaption></figure><blockquote><strong>Popular licenses</strong></blockquote><ul><li>Apache License 2.0</li><li>BSD 3-Clause “New” or “Revised” license</li><li>BSD 2-Clause “Simplified” or “FreeBSD” license</li><li>GNU General Public License (GPL)</li><li>GNU Library or “Lesser” General Public License (LGPL)</li><li>MIT license</li><li>Mozilla Public License 2.0</li><li>Common Development and Distribution License</li><li>Eclipse Public License version 2.0</li></ul><p><strong><em>Thank you for reading my article! Hope you got something from this…</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73340236cf0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ethical Whistleblowing]]></title>
            <link>https://medium.com/@dpbrayan1/ethical-whistleblowing-4901bc904d51?source=rss-c6d9f3932e9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4901bc904d51</guid>
            <dc:creator><![CDATA[Darshana Seneviratna]]></dc:creator>
            <pubDate>Sat, 25 Jul 2020 13:02:05 GMT</pubDate>
            <atom:updated>2020-07-25T13:02:05.152Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*xC5hPM4I7ysa4OjJjixbJQ.jpeg" /><figcaption>whistleblowing</figcaption></figure><p>Essentially whistleblowing is the term utilized when an individual passes on data on bad behavior, for example, debasement. It likewise alluded to as “blowing the whistle” or “making an exposure”.</p><p>An individual related to an organization(maybe a worker, provider, or client) turns into an informant when they watch conduct or activities that they accept to be offense, unlawful, and not in accordance with the organization’s set of principles and report that doubt as a whistleblowing matter.</p><p><strong><em>Types of Whistleblowing</em></strong></p><ul><li><em>Internal whistleblowing</em>: is made to someone within the organization.</li><li><em>Personal whistleblowing</em>: is blowing the whistle on the offender. Here the charge is not against the organization or system but one individual.</li><li><em>External whistleblowing</em>: for an external issue not directly affecting one as an individual.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U9J6_M2S2ECHTu4fAzSnqA.jpeg" /></figure><h3><strong>Elements of Ethical Whistleblowing</strong></h3><ul><li><strong>Elements of Ethical Whistleblowing:- </strong>Potential informants should be guaranteed there will be no work environment repercussions, including casual ones, and secrecy is the surest method to accomplish that.</li><li><strong>Make<em> </em>reporting<em> </em>easy</strong>:- This might be something like a hotline or helpline with a complementary number that is noticeably remembered for the laborers’ direction and routine interchanges with the association.</li><li><strong>Establish consistent protocols across all departments:- </strong>Each unit in the association ought to be in the same spot with respect to extortion revealing. It is helpful to have a solitary administrator who is recognized as an extortion avoidance pioneer.</li><li><strong>Be prepared to act when fraud is detected:- </strong>In the event that you confirm that all things considered, misrepresentation happened you ought to have an arrangement for reacting that incorporates who ought to get the report and what steps they take to decide a reaction.</li><li><strong>Report to authorities appropriately:- </strong>Lawful specialists ought to be included when fitting and in a predictable manner directed by strategy rules.</li><li><strong>Set up recording and tracking processes:- </strong>Each detailed extortion should trigger a case record or episode report that gathers significant target data and holds it in the framework. Progress of each case from report to goal ought to be remembered for the records.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*iUR0yXXPbqMG-PPn5Y6EwA.jpeg" /></figure><h3>Steps/procedure for whistleblowing</h3><p><strong>Hire a powerful attorney:- </strong>Recruit a gifted legal advisor with involvement with dealing with informant cases can exhortation lawfully to accumulate proof against the business and secure proficient notoriety.</p><p><strong>Make sure you have evidence:- </strong>The legislature won’t pay you an award for bringing them flawed tattle of offenses, but instead explicit verification, for example, messages, inside examinations, charging records, test results, names, the contact data of included gatherings, and different types of narrative proof.</p><p><strong>File a complaint:- </strong>Informants must document an objection in court and submit it to the national government with a Disclosure Statement that subtleties the speculated unfortunate behavior.</p><p><strong>Play the waiting game:- </strong>On the off chance that the administration ought to choose to continue forward with your case, it is essential to show restraint.</p><p><strong>Prepare to be “outed”:- </strong>You need to set yourself up to be “outed” and the outcomes that it might bring. It’s prescribed to look for a new position as quickly as time permits subsequent to recording an informant guarantee.</p><p><strong>Be prepared to testify:- </strong>On the off chance that the administration chooses to make a move against your manager dependent on the consequences of its examination, you might be approached to affirm at a great jury continuing or during the preliminary. You should be set up to uncover your character, since your declaration may considerably affect the result of the case.</p><p><strong><em>Thank you for reading my article! Hope you got something from this…</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4901bc904d51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing AWS Account]]></title>
            <link>https://medium.com/@dpbrayan1/securing-aws-account-eb7bf1c272b6?source=rss-c6d9f3932e9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb7bf1c272b6</guid>
            <dc:creator><![CDATA[Darshana Seneviratna]]></dc:creator>
            <pubDate>Mon, 29 Jun 2020 09:12:50 GMT</pubDate>
            <atom:updated>2020-06-29T09:12:50.577Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*uBVSMu87uDPVb3dhsFSQFA.jpeg" /><figcaption>AWS Security</figcaption></figure><blockquote><em>This is my second article about Amazon Web Services.</em></blockquote><h4><strong>Secure Your Root Account</strong></h4><p>Your “Root Account” is the log in that has definitive access to everything. Until you investigate the secrets of IAM, the sum total of what you have is a root account. You have to keep a root account. Here’s the manner by which to make sure about it.</p><p>Most importantly, old fashioned email and login are basically not secure enough. You can pull off it for quite a long time, and never have an issue: however it’s a matter of when not if.</p><p>Thus, from your AWS reassure, go to your record name in the top bar, and select “My Security Credentials.”</p><p>From that point forward, you can see beneath the picture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ro8lDcnJRYHwdXZmGoaDlw.png" /><figcaption>security credentials</figcaption></figure><p>The significant arrangement here is Multi-Factor Authentication (MFA). Everything beneath that area is progressively valuable for creating secure applications, instead of basically making sure about your record.</p><p>How about we turn it on,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z_KCpHyNml9S6eAwM37Cdg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FPgMFnmhCMaSTibRjkqjQg.png" /></figure><p>A virtual MFA gadget is adequate. Yubikey and Gemalto tokens are equipment gadgets that you need physical ownership of to confirm your personality. The virtual MFA gadget is an application you can run on your machine (or on an optional gadget, for example, a telephone). These work in basically a similar manner: they are lined up with Amazon’s frameworks during the procedure to follow, and afterward they have a time-sensitive code that you will give during login. For somebody to slip off with your record they would require your login, secret key, AND physical access to the code-generator. It’s as yet not difficult to beat, so in the event that you ever lose control of your code-generator, the primary thing you need to do is reset your AWS account.</p><p>For a virtual MFA gadget, I lean toward Google Authenticator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tv_dBv1Pk0UY7ynJi3otqA.png" /></figure><p>In the event that your application can examine that code, pull out all the stops. In any case, reorder that mystery key into your authenticator application.</p><p>At that point, put two consecutive MFA codes in the two fields. On the off chance that you have done this effectively, you will be good to go up!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JmdwHqNK_Zy0_AsLfOHqJA.png" /></figure><p>Since you have made sure about your root account, it’s an ideal opportunity to quit utilizing it!</p><p>Thank you for reading my article! Hope you got something from this…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb7bf1c272b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating Your Own AWS Account]]></title>
            <link>https://medium.com/@dpbrayan1/creating-your-own-aws-account-53456141e48d?source=rss-c6d9f3932e9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/53456141e48d</guid>
            <dc:creator><![CDATA[Darshana Seneviratna]]></dc:creator>
            <pubDate>Thu, 25 Jun 2020 07:50:26 GMT</pubDate>
            <atom:updated>2020-06-25T07:50:26.977Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7M-IPIZFL_Z7XxIimJSnFg.png" /></figure><blockquote>This is my first article about Amazon Web Services.</blockquote><p><strong>Amazon Web Services (AWS)</strong> is the leading platform for cloud computing.It has nearly every conceivable thing you’d need. If you just need a server and database it has that. If you need natural language processing and a bulk emailing platform it has that too and more!. AWS is used extensively by top companies and startups because of its wide range of products, it’s super easy to dynamically scale, and it’s very secure.</p><p>Before you creating the new account you will need below things:</p><ul><li>An email account</li><li>A valid credit/debit card (you will not be charged as there is a generous free tier)</li><li>A phone number (you will receive an automated phone call to verify your identity)</li></ul><p>If you want to create a new AWS account <a href="https://portal.aws.amazon.com/billing/signup#/start">click here</a> , then you can see below page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GyF-LrWepeO5nCdUjBn_5g.png" /></figure><p>Follow the means on screen and inside 2 minutes you will have your new AWS account! Login to your record and you will see the beneath screen, called the AWS Console. This is the place you can get to everything.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R5LUQiojxG-vObQT00LtkQ.png" /></figure><p>Thank you for reading my article! Hope you got something from this…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53456141e48d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ACHI OS]]></title>
            <link>https://medium.com/@dpbrayan1/achi-os-83ff6570beb3?source=rss-c6d9f3932e9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/83ff6570beb3</guid>
            <category><![CDATA[assembly-language]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Darshana Seneviratna]]></dc:creator>
            <pubDate>Mon, 10 Jun 2019 10:25:24 GMT</pubDate>
            <atom:updated>2019-06-14T18:37:11.193Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><h3>Introduction</h3><p>The AchiOS kernel is written in 16-bit x86 real mode assembly language. This provides easy access to BIOS routines for handling the keyboard, screen and floppy drive, so that we don’t need complicated drivers. Therefore most of the code is focused on actual OS aspects: loading programs, system calls and so forth.</p><p>Additionally, AchiOS avoids the real mode segmentation complications by existing in a single 64K segment. The first 32K (0–32767) of RAM is reserved for the kernel; the second 32K is for external program code and memory.</p><h3>Structure</h3><p>These are the most important files and directories in the AchiOS zip file:</p><ul><li>source/ — Contains the entire OS source code</li><li>source/bootload/ — Source to generate BOOTLOAD.BIN, which is added to the disk image when building</li><li>source/features/ — Components of AchiOS such as FAT12 support, string routines, the BASIC interpreter etc.</li><li>source/kernel.asm — The core kernel source file, which pulls in other source files</li><li>programs/ — Source code for programs added to the disk image</li></ul><h3>Memory map</h3><p>This is the makeup of the 64K memory segment after AchiOS has loaded:</p><p>0–24575 (hex: 0h — 5FFFh)<br>24K kernel executable code</p><p>24576–32767 (hex: 6000h — 7FFFh)<br>8K kernel disk operation buffer</p><p>32768–65535 (hex: 8000h — FFFFh<br>32K space for external programs</p><p>So, the first 32K is devoted to the AchiOS kernel code and its 8K buffer for performing disk operations. After that we have another 32K of memory, this time for external programs. These are loaded at the 32K point and hence need to be ORGed to 32768 as described in the App Developer Handbook.</p><h3>Code path</h3><p>When the PC starts up, it loads the bootblock, BOOTLOAD.BIN, that was inserted into the first sector (512 bytes) of the floppy disk image by the build script. It loads this at memory location 31744 (7C00h in hex) and begins executing it.</p><p>BOOTLOAD.BIN then scans the floppy disk for KERNEL.BIN and loads it at memory location 2000h:0000h. Here, the 2000h is the segment and 0000h is the offset in that segment — you don’t need to concern yourself with this, but effectively it means that the kernel is loaded at location 131072 (128K) in the PC’s RAM. (You get a complete memory location by multiplying the segment by 16 and adding the offset.)</p><p>Once the bootloader has loaded the kernel, it jumps to memory location 131072 (aka 2000h:0000h) to begin executing it. After this, for simplicity we ignore segments and just use offsets (0000h to FFFFh), thereby giving us 64K of RAM to use.</p><p>At the start of the kernel we have a series of jmp instructions. Why are these here? Well, the system calls are in semi-random places in the kernel executable. As AchiOS evolves, the exact locations of these system calls shifts around; an external program can’t guarantee where they are. So we have a list of vectors right at the very start of the kernel which jmp to these calls, so an external program can call these vectors and know that they’ll never move!</p><h4>There’s a jmp just before these vectors to skip over them, and then the main kernel execution starts, setting up various things and offering the user a choice of a program list or command line interface.</h4><h4>Building</h4><p><strong>Build requirements:</strong> the NASM assembler, dosfstools package, ‘mkisofs’ utility and root access. We need root access because we loopback-mount the floppy disk image to insert our files.</p><p>To build AchiOS, open a terminal and switch into the expanded AchiOS package. Enter <strong>sudo bash</strong> in Ubuntu-flavoured distros, or just <strong>su</strong> in others, to switch to the root user. Then enter:</p><pre>./build-linux.sh</pre><p>This will use NASM to assemble the bootloader, kernel and supplied programs, then write the bootloader to the <strong>achios.flp</strong> floppy disk image in the <strong>disk_images/</strong> directory. (It writes the 512-byte bootloader to the first sector of the floppy disk image to create a boot sector and set up a DOS-like filesystem.) Next, the build script loopback-mounts the <strong>achios.flp</strong>image onto the filesystem — in other words, mounting the image as if it was a real floppy. The script copies over the kernel (<strong>kernel.bin</strong>) and binaries from the <strong>programs/</strong> directory, before unmounting the floppy image.</p><p>With that done, the script runs the ‘mkisofs’ utility to generate a CD-ROM ISO image of AchiOS, injecting the floppy image as a boot section. So we end up with two files in the <strong>disk_images/</strong> directory: one for floppy disks and one for CD-Rs. You can now use them in an emulator or on a real PC as described in the Running section above.</p><h3>Modifying</h3><h3>Overview</h3><p>To test out code, the simplest approach is to create a new app in the <strong>programs/</strong> directory, build AchiOS and run your program. You can then be guaranteed that your code isn’t interfering with the kernel code (at least at the assembling stage!). When you’re happy with it, you may want to introduce it into <strong>source/kernel.asm</strong> or a specific file in <strong>source/features/</strong>.</p><p>Note that the files in <strong>source/features/</strong> correspond to the system calls in <strong>programs/achidev.inc</strong> (and detailed in the App Developer Handbook), but those source files also include internal calls that are used by the kernel and are not accessible to user programs. So use ‘grep’ or the search tool of your choice to find specific calls if they’re not available through the API.</p><h3>System calls</h3><p>Adding new system calls is easy and fun — it extends AchiOS! So if you want to help out, this is the best way to start. Open up <strong>source/features/screen.asm</strong> in a text editor and paste in the following after the header text:</p><p>All system calls should start with <strong>pusha</strong> and end with <strong>popa</strong> before <strong>ret</strong>: this stores registers on the stack at the start, and then pops them off at the end, so that we don’t end up changing a bunch of registers and confusing the calling program. (If you’re passing back a value, say in AX, you should store AX in a temporary word and drop it back in between the <strong>popa</strong> and <strong>ret</strong>, as seen in <strong>os_wait_for_key</strong> in <strong>keyboard.asm</strong>.)</p><p>The body of our code simply places the location of our message string into the SI register, then calls another AchiOS routine, <strong>os_print_string</strong>. You can freely call other routines from your own system call.</p><p>Once we’ve done this, we can access this routine throughout the kernel. But what about external programs? They have no idea where this call is in the kernel! The trick we use is <strong>vectors</strong> — a bunch of <strong>jmp</strong> instructions at the start of our kernel code, which jump to these routines. Because these vectors are at the start, they never change their position, so we always know where they are.</p><p>For instance, right now, your new system call may be at 0x9B9D in the kernel. But if you add another call before it, or someone else does, it may move to 0x9FA6 in the kernel binary. We simply don’t know where it’s going to be. But if we put at vector at the start of our kernel, before anything else happens, we can use that as the starting point as the vector will never move!</p><p>Open up <strong>source/kernel.asm</strong> and scroll down to the list of system call vectors. You can see they start from 0003h. Scroll to the bottom of the list and you’ll see something like this:</p><p>Let’s add a vector to our new call. Add this beneath the existing vectors:</p><p>How do we know this <strong>jmp</strong> is at 00D2h in the kernel binary? Well, just follow the pattern in the <strong>jmp</strong>s above — it’s pretty easy to guess. If you’re unsure, you can always use <strong>ndisasm</strong> to disassemble the kernel and look for the location of the final <strong>jmp</strong> in the list.</p><p>That’s all good and well, but there’s one last thing: people writing external programs don’t want to call an ugly number like 00C9h when they run our routine. They want to access it by name, so we need to add a line to <strong>achidev.inc</strong> in the <strong>programs/</strong> directory:</p><p>Now, any program that includes <strong>achidev.inc</strong> will be able to call our routine by name. Et voila: a brand new system call for AchiOS!</p><h3>Patches</h3><p>If you’ve made some improvements or additions to AchiOS and wish to submit them, great! If they’re small changes — such as a bugfix or minor tweak — you can paste the altered code into an email. Explain what it does and where it goes in the source code, and if it’s OK, we’ll include it.</p><p>If your change is larger (eg a system call) and affects various parts of the code, you’re better off with a patch. On UNIX-like systems such as Linux, you can use the <strong>diff</strong> command-line utility to generate a list of your changes. For this, you will need the original (release) source code tree of AchiOS, along with the tree of your modified code. For instance, you may have the original code in a directory called <strong>achios-4.2/</strong> and your enhanced version in <strong>new-achios-4.0/</strong>.</p><p>Switch to the directory beneath these, and enter:</p><pre>diff -ru achios-4.2 new-achios-4.2 &gt; patch.txt</pre><p>This collates the differences between the two directories, and directs the output to the file <strong>patch.txt</strong>. Have a look at the file to make sure it’s OK (you can see how it shows which lines have changed), and then attach the file to an email.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83ff6570beb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dining Philosopher Problem]]></title>
            <link>https://medium.com/@dpbrayan1/dining-philosopher-problem-2e00b67661a7?source=rss-c6d9f3932e9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e00b67661a7</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Darshana Seneviratna]]></dc:creator>
            <pubDate>Sat, 04 May 2019 16:04:46 GMT</pubDate>
            <atom:updated>2019-05-04T16:04:46.481Z</atom:updated>
            <content:encoded><![CDATA[<p>Dining Philosophers Problem — Using Java</p><p>In this implementation process in Java, we used four classes for this problem. They are Food, Fork, Philosopher &amp; Main classes.</p><p>In Food class that is used to obtain details of foods/meals. In that class there are three methods including a constructor as food variable is private.</p><p>Fork class is used to acquire number of forks for eating. Similarly, this class too has three methods as above method.</p><p>In Philosopher class, we take philosophers as classes that implement the Runnable interface so that we can turn them as separate threads. Each philosopher has access to two forks on his left and right sides. Also, there is another method(perform()) that instructs a philosopher to perform his preferred action: eat, think or getting two forks to eat. According to this code each action is simulated by suspending the invoking thread for a random amount of time. So, from that the execution order is not enforced by time alone. To simulate acquiring a fork, we need to lock it so that no two philosopher threads acquire it at the same time. To achieve this, we use the synchronized keyword to acquire the internal monitor of the fork object and prevent other threads from doing the same. This is done in run() method in Philosopher class. This code segment describes (codes in run() method): a philosopher thinks for a while and then decides to eat. Also, timestamps were added to each action, in order to understand the order in which events occur.</p><p>In Main class, five philosophers are created as threads and to started all of them. We model each of the forks as generic Java objects and make as many of them as there are philosophers. We pass each Philosopher his left and right forks that he attempts to lock using the synchronized keyword.</p><p>Also, in here deadlock problem is solved using an if else condition inside a loop (inside Main class). If it is not done, deadlock is occurred, and solution may not work correctly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e00b67661a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>