changeset 3:623da64aac7a default tip

Internship_presentation
author shivanidubey
date Mon, 24 Jun 2019 13:05:55 +0900
parents 54dd75a92d04
children
files slide.html slide.md slide.md~ slide.pdf.html
diffstat 4 files changed, 428 insertions(+), 220 deletions(-) [+]
line wrap: on
line diff
--- a/slide.html	Sat Jun 22 12:32:52 2019 +0900
+++ b/slide.html	Mon Jun 24 13:05:55 2019 +0900
@@ -78,7 +78,7 @@
         <td>
           <div align="left">
               Shivani Dubey
-              Intern, University of the Ryukyus
+              Madan Mohan Malaviya University of Technology, Gorakhpur
             <hr style="color:#ffcc00;background-color:#ffcc00;text-align:left;border:none;width:100%;height:0.2em;">
           </div>
         </td>
@@ -91,14 +91,23 @@
 <div class='slide'>
   
 <!-- _S9SLIDE_ -->
-<h1 id="why-operating-system">Why Operating System?</h1>
+<h2 id="why-do-we-study-operating-system">Why do we study Operating System?</h2>
 
 <ul>
   <li>
-    <p>Backbone of computer system</p>
+    <p>Every computer system has an operating system, which manages the resources of the computer.</p>
+  </li>
+  <li>
+    <p>IoT or IT Services can’t work well without resource managements.</p>
   </li>
   <li>
-    <p>Manages the computer’s memory and processes, as well as all of its software and hardware.</p>
+    <p>To handle it, we have to understand the API of OS.</p>
+  </li>
+  <li>
+    <p>To understand the API, it is better to see the implementations.</p>
+  </li>
+  <li>
+    <p>For example, API for tuning priorities of the processes.</p>
   </li>
 </ul>
 
@@ -108,33 +117,50 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h1 id="introduction">Introduction</h1>
+<h2 id="xv6-operating-system-as-an-educational-tool">Xv6 Operating System as an educational tool</h2>
 
 <ul>
   <li>
-    <p>Docker</p>
+    <p>A Unix-like operating system developed in MIT, based on V6 kernel</p>
+  </li>
+  <li>
+    <p>xv6 is written in ANSI C ( not in C++ )</p>
   </li>
   <li>
-    <p>xv6</p>
+    <p>xv6 is small and simple (9628 lines of codes)</p>
+  </li>
+  <li>
+    <p>It can run on Raspberry Pi ( Small PC board )</p>
+  </li>
+  <li>
+    <p>Or on ARM emulator such as QEMU</p>
   </li>
 </ul>
 
-<p>What is Docker?</p>
+
+
+</div>
 
-<ul>
-  <li>The modern platform for high velocity innovation</li>
-  <li>Docker has products that use operating system level virtualization to develop and deliver software in packages called containers</li>
-  <li>Docker can run on any computer, on any infrastructure and in any cloud</li>
-</ul>
-
-<p>What is xv6?</p>
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="xv6-development-environment-with-qemu">Xv6 development environment with QEMU</h2>
 
 <ul>
   <li>
-    <p>A Unix-like operating system developed in MIT.</p>
+    <p>QEMU emulates ARM CPU with virtual memory</p>
+  </li>
+  <li>
+    <p>Xv6 operating sytem itself is running on QEMU</p>
   </li>
   <li>
-    <p>xv6 is modern reimplementation of Sixth Edition Unix in ANSI C.</p>
+    <p>gdb debugger can be attached to the emulated program (both in user space and system space)</p>
+  </li>
+  <li>
+    <p>We can step and trace inside xv6 kernel</p>
+
+    <pre><code>... but it requires complex development environments setup
+... very time consuming
+</code></pre>
   </li>
 </ul>
 
@@ -144,18 +170,50 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h1 id="what-helped-us">What helped us</h1>
+<h2 id="our-development-environments">Our development environments</h2>
 
 <ul>
   <li>
-    <p>emacs editor (amidst the editor war between vi and emacs!)</p>
-  </li>
-  <li>
     <p>homebrew (it simplifies installation of software in macOS)</p>
   </li>
   <li>
     <p>Mercurial repository of the lab where we saved everything using ssh</p>
   </li>
+  <li>
+    <p>Cross Compilers</p>
+  </li>
+  <li>
+    <p>ARM libraries for C language</p>
+  </li>
+  <li>
+    <p>QEMU (ARM Emulator)</p>
+  </li>
+</ul>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="introducing-docker">Introducing Docker</h2>
+
+<ul>
+  <li>
+    <p>What is Docker? It is a container.</p>
+  </li>
+  <li>
+    <p>What is Container? An isolated envirornment such as file system.</p>
+  </li>
+  <li>
+    <p>It has DockerFile, which describes how to setup the envrionment in the container.</p>
+  </li>
+  <li>
+    <p>Docker can run on any computer using an emulator such as QEMU.</p>
+  </li>
+  <li>
+    <p>Complex development environment can be build using DockerFile and docker built command.</p>
+  </li>
 </ul>
 
 
@@ -164,25 +222,27 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h2 id="why-docker">Why Docker?</h2>
+<h1 id="the-dockerfile">The DockerFile</h1>
 
-<p>Features of Docker:</p>
+<pre><code>FROM phitek/qemu-arm
+RUN apt-get update -y
+RUN apt-get remove gdb -y
+RUN apt-get install gcc-arm-none-eabi gdb-arm-none-eabi qemu-system-arm -y
+WORKDIR /code
+COPY ["src", "."]
+RUN make
+CMD /bin/bash
+</code></pre>
 
 <ul>
   <li>
-    <p>Easy and Faster Configuration</p>
-  </li>
-  <li>
-    <p>Increases productivity</p>
+    <p>FROM line specifies the shared image in Docker repository.</p>
   </li>
   <li>
-    <p>Application Isolation</p>
+    <p>apt-get installs Linux cross compiling tools.</p>
   </li>
   <li>
-    <p>Services</p>
-  </li>
-  <li>
-    <p>Security Management</p>
+    <p>Then it creates working directory, copies our sources to it, and executes make.</p>
   </li>
 </ul>
 
@@ -192,14 +252,23 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h2 id="why-xv6">Why xv6?</h2>
+<h2 id="docker-commands">Docker commands</h2>
 
 <ul>
   <li>
-    <p>It gives a good insight into Command Line Interface of Unix OS</p>
+    <p>Create docker image and environment, and build xv6 kernel</p>
+
+    <p>docker build –tag xv6-docker</p>
   </li>
   <li>
-    <p>xv6 is modern reimplementation of Sixth Edition Unix in ANSI C</p>
+    <p>Run xv6 kernel on QEMU in the container</p>
+
+    <p>docker run –rm –privileged -it xv6-docker ./run-debug.sh</p>
+  </li>
+  <li>
+    <p>Run gdb to connect the xv6 kernel running in the QEMU</p>
+
+    <p>docker exec -it xv6-docker ./debug.sh</p>
   </li>
 </ul>
 
@@ -209,11 +278,17 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h1 id="scheduling-processes-by-their-priorities">Scheduling processes by their priorities</h1>
+<h1 id="exercise--adding-priorities-to-the-xv6-scheduler">Exercise : Adding priorities to the xv6 scheduler</h1>
 
 <ul>
   <li>
-    <p>Added getpriority() and setpriority() and get_highest_priority() functions in proc.c file of xv6</p>
+    <p>Added getpriority() and setpriority()</p>
+  </li>
+  <li>
+    <p>get_highest_priority() functions in proc.c file of xv6</p>
+  </li>
+  <li>
+    <p>Implemented it in schelduler()</p>
   </li>
   <li>
     <p>Added a test function testpriority() in usertests.c file of xv6 to implement our algorithm</p>
@@ -226,30 +301,37 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h2 id="the-function">The function</h2>
-
+<h2 id="function-used-in-our-exercise-to-find-highest-priority-process">Function used in our exercise to find highest priority process</h2>
 <pre><code class="language-c">int get_highest_priority_proc(void)
 {
   int highest_priority;
   int pid = 0;
   int hpid = -1;
   int rpid = 0;
-
   highest_priority=100;
-  struct proc *p;
+ 
+ struct proc *p;
   for(p = ptable.proc; p &lt; &amp;ptable.proc[NPROC]; p++, pid++){
     if(p-&gt;state != RUNNABLE) {
-      continue;
-    }
+      continue;    }
     rpid = pid;
     if (highest_priority &gt; p-&gt;priority) {
        highest_priority=p-&gt;priority;
-       hpid = pid;
-    }
-  }
+       hpid = pid; } }
   return hpid &gt; 0?hpid:rpid;
 }
 </code></pre>
+<ul>
+  <li>
+    <p>It assumes at least one process to be RUNNABLE.</p>
+  </li>
+  <li>
+    <p>It may allow no highest priority process.</p>
+  </li>
+  <li>
+    <p>The correctness of the function is <em>important</em>.</p>
+  </li>
+</ul>
 
 
 
@@ -259,14 +341,28 @@
   <!-- _S9SLIDE_ -->
 <h2 id="docker-limitation">Docker Limitation</h2>
 
-<p>Mutliple images present in repository due to form command.</p>
-
-<p>If repository breaks, Docker poses problem</p>
+<ul>
+  <li>
+    <p>If repository breaks, Docker poses a problem (a cloud problem).</p>
+  </li>
+  <li>
+    <p>Cloud may be used conveniently but we must not rely on it.</p>
+  </li>
+  <li>
+    <p>We can use a direct environment without Docker, since we have a Linux server.</p>
+  </li>
+  <li>
+    <p>Docker images can easily eat up our disk spaces.</p>
+  </li>
+</ul>
 
-<p>What can be done?</p>
+<p>in ~/.zsh_history</p>
 
-<p>We can keep track of images of Docker</p>
-
+<pre><code class="language-c">: 1561014922:0;docker system prune
+: 1561014973:0;docker container prune
+: 1561015350:0;docker image prune
+: 1561015362:0;docker volume prune
+</code></pre>
 
 
 </div>
@@ -277,13 +373,10 @@
 
 <ul>
   <li>
-    <p>Docker environment poses some problems, some of which are difficult to comprehend</p>
+    <p>Docker environment poses some problems, some of which are difficult to comprehend.</p>
   </li>
   <li>
-    <p>Storage is difficult too</p>
-  </li>
-  <li>
-    <p>Yet, it gives a good insight of the underlying important concepts of operating system beacuse it is well documented, fast and uses less resources</p>
+    <p>Yet, it gives a good insight of the underlying important concepts of operating system because it is well documented, fast and uses less resources.</p>
   </li>
 </ul>
 
--- a/slide.md	Sat Jun 22 12:32:52 2019 +0900
+++ b/slide.md	Mon Jun 24 13:05:55 2019 +0900
@@ -1,32 +1,32 @@
 title: Studying Operating System Using Docker Platform  
 author: Shivani Dubey
-profile: Madan Mohan Malaviiya, University of Technology
+profile: Madan Mohan Malaviya University of Technology, Gorakhpur
 
-## Why we study Operating System?
+## Why do we study Operating System?
 
-- Every computer system has an operating system, which manages the resource of the computer.
+- Every computer system has an operating system, which manages the resources of the computer.
 
-- IoT or IT Services can't work well without resource manageents.
+- IoT or IT Services can't work well without resource managements.
 
-- To handle it, we have to understand the API of OS
+- To handle it, we have to understand the API of OS.
 
-- To understand the API, it it better to see the implentations.
+- To understand the API, it is better to see the implementations.
 
-- For an example, API for tuning priorities of the processess
+- For example, API for tuning priorities of the processes.
 
 ## Xv6 Operating System as an educational tool
 
-- A Unix-like operating system developed in MIT, based on V6 kernel.
+- A Unix-like operating system developed in MIT, based on V6 kernel
 
-- xv6 is written in ANSI C ( not in C++ ).
+- xv6 is written in ANSI C ( not in C++ )
 
 - xv6 is small and simple (9628 lines of codes)
 
-- It can run on Respberry Pi ( Small PC board )
+- It can run on Raspberry Pi ( Small PC board )
 
 - Or on ARM emulator such as QEMU
 
-## Xv6 development envrionment with QEMU
+## Xv6 development environment with QEMU
 
 - QEMU emulates ARM CPU with virtual memory 
 
@@ -34,14 +34,13 @@
 
 - gdb debugger can be attached to the emulated program (both in user space and system space)
 
-- We can step and trace the internal of xv6 kernel
+- We can step and trace inside xv6 kernel
 
-      ... but it requires complex development envrionments setup
+      ... but it requires complex development environments setup
       ... very time consuming
 
-## Our development envrionments 
+## Our development environments 
 
-- emacs editor (amidst the editor war between vi and emacs!)
 
 - homebrew (it simplifies installation of software in macOS)
 
@@ -57,13 +56,13 @@
 
 - What is Docker? It is a container.
 
-- What is Container? An isolateed envriornment such as file system.
+- What is Container? An isolated envirornment such as file system.
 
-- It has DockerFile, which describes how to setup the envrionment in the container
+- It has DockerFile, which describes how to setup the envrionment in the container.
 
-- Docker can run on any computer using an emulator such as QEMU
+- Docker can run on any computer using an emulator such as QEMU.
 
-- Complex develement environment can be build using DockerFile and docker built command.
+- Complex development environment can be build using DockerFile and docker built command.
 
 # The DockerFile
 
@@ -78,51 +77,41 @@
 CMD /bin/bash
 ```
 
-- FROM lines specifies the shared image in Docker repository.
+- FROM line specifies the shared image in Docker repository.
 
-- apt-get install Linux cross compiling tools
+- apt-get installs Linux cross compiling tools.
 
-- then it create workig directory, and copy our sources to it, and execute make
+- Then it creates working directory, copies our sources to it, and executes make.
 
-## Docker command
+## Docker commands
 
-- create docker imagae and environment, and built xv6 kernel
+- Create docker image and environment, and build xv6 kernel
 
-  docker build --tag xv6-docker .
+  docker build --tag xv6-docker 
 
-- run xv6 kernel on QEMU in the container
+- Run xv6 kernel on QEMU in the container
 
   docker run --rm --privileged -it xv6-docker ./run-debug.sh
 
-- run gdb to connect the xv6 kernel running in the QEMU
+- Run gdb to connect the xv6 kernel running in the QEMU
 
   docker exec -it xv6-docker ./debug.sh
 
-## Features of Docker:
 
-- Easy and Faster Configuration
-
-- Increases productivity
-
-- Application Isolation
-
-- Provies Services
-
-- Security Management
 
 
-# Exercise : adding priorities to the xv6 scheduler 
+
+# Exercise : Adding priorities to the xv6 scheduler 
 
 - Added getpriority() and setpriority() 
 
 - get_highest_priority() functions in proc.c file of xv6
 
-- implement it in schelduler()
+- Implemented it in schelduler()
 
 - Added a test function testpriority() in usertests.c file of xv6 to implement our algorithm
 
-##  The function 
-
+##  Function used in our exercise to find highest priority process 
 ```c
 int get_highest_priority_proc(void)
 {
@@ -130,24 +119,20 @@
   int pid = 0;
   int hpid = -1;
   int rpid = 0;
-
   highest_priority=100;
-  struct proc *p;
+ 
+ struct proc *p;
   for(p = ptable.proc; p < &ptable.proc[NPROC]; p++, pid++){
     if(p->state != RUNNABLE) {
-      continue;
-    }
+      continue;    }
     rpid = pid;
     if (highest_priority > p->priority) {
        highest_priority=p->priority;
-       hpid = pid;
-    }
-  }
+       hpid = pid; } }
   return hpid > 0?hpid:rpid;
 }
 ```
-
-- It assumes at least one process is RUNNABLE
+- It assumes at least one process to be RUNNABLE.
 
 - It may allow no highest priority process.
 
@@ -155,13 +140,14 @@
 
 ## Docker Limitation
 
-- If repository breaks, Docker poses a problem (a cloud probelm)
 
-- Clound should be used conviniently but don't rely on it.
+- If repository breaks, Docker poses a problem (a cloud problem).
+
+- Cloud may be used conveniently but we must not rely on it.
 
 - We can use a direct environment without Docker, since we have a Linux server.
 
-- Docker images can easily eats up our disk spaces.
+- Docker images can easily eat up our disk spaces.
 
 in ~/.zsh_history
 
@@ -173,8 +159,9 @@
 ```
 # Conclusion
 
-- Docker environment poses some problems, some of which are difficult to comprehend 
+
+- Docker environment poses some problems, some of which are difficult to comprehend. 
 
-- Storage is difficult too
+
 
-- Yet, it gives a good insight of the underlying important concepts of operating system beacuse it is well documented, fast and uses less resources
+- Yet, it gives a good insight of the underlying important concepts of operating system because it is well documented, fast and uses less resources.
--- a/slide.md~	Sat Jun 22 12:32:52 2019 +0900
+++ b/slide.md~	Mon Jun 24 13:05:55 2019 +0900
@@ -1,89 +1,117 @@
 title: Studying Operating System Using Docker Platform  
 author: Shivani Dubey
-profile: Intern, University of the Ryukyus 
+profile: Madan Mohan Malaviya University of Technology, Gorakhpur
 
-# Why Operating System?
+## Why do we study Operating System?
 
-- Backbone of computer system
+- Every computer system has an operating system, which manages the resources of the computer.
 
-- Manages the computer's memory and processes, as well as all of its software and hardware.
+- IoT or IT Services can't work well without resource managements.
 
+- To handle it, we have to understand the API of OS.
 
-# Introduction
+- To understand the API, it is better to see the implementations.
 
-
-- Docker
+- For example, API for tuning priorities of the processes.
 
-- xv6
+## Xv6 Operating System as an educational tool
 
-What is Docker?
+- A Unix-like operating system developed in MIT, based on V6 kernel
 
+- xv6 is written in ANSI C ( not in C++ )
 
-- The modern platform for high velocity innovation.
-- Docker has products that use operating system level virtualization to develop and deliver software in packages called containers.
-- Docker can run on any computer, on any infrastructure and in any cloud.
+- xv6 is small and simple (9628 lines of codes)
+
+- It can run on Raspberry Pi ( Small PC board )
 
+- Or on ARM emulator such as QEMU
 
-What is xv6?
+## Xv6 development environment with QEMU
 
+- QEMU emulates ARM CPU with virtual memory 
 
-- A Unix-like operating system developed in MIT.
+- Xv6 operating sytem itself is running on QEMU 
 
-- xv6 is modern reimplementation of Sixth Edition Unix in ANSI C.
+- gdb debugger can be attached to the emulated program (both in user space and system space)
 
+- We can step and trace inside xv6 kernel
 
-# What helped us
-
+      ... but it requires complex development environments setup
+      ... very time consuming
 
+## Our development environments 
 
-- emacs editor (amidst the editor war between vi and emacs!)
 
 - homebrew (it simplifies installation of software in macOS)
 
 - Mercurial repository of the lab where we saved everything using ssh 
 
+- Cross Compilers 
 
-## Why Docker? 
+- ARM libraries for C language
 
-
+- QEMU (ARM Emulator)
 
-Features of Docker:
+## Introducing Docker
+
+- What is Docker? It is a container.
 
+- What is Container? An isolated envirornment such as file system.
 
-- Easy and Faster Configuration
+- It has DockerFile, which describes how to setup the envrionment in the container.
 
-- Increases productivity
+- Docker can run on any computer using an emulator such as QEMU.
 
-- Application Isolation
+- Complex development environment can be build using DockerFile and docker built command.
+
+# The DockerFile
 
-- Services
-
-- Security Management
+```
+FROM phitek/qemu-arm
+RUN apt-get update -y
+RUN apt-get remove gdb -y
+RUN apt-get install gcc-arm-none-eabi gdb-arm-none-eabi qemu-system-arm -y
+WORKDIR /code
+COPY ["src", "."]
+RUN make
+CMD /bin/bash
+```
 
+- FROM line specifies the shared image in Docker repository.
 
-## Why xv6?
-
+- apt-get installs Linux cross compiling tools.
 
+- Then it creates working directory, copies our sources to it, and executes make.
 
-- It gives a good insight into Command Line Interface of Unix OS.
+## Docker commands
+
+- Create docker image and environment, and build xv6 kernel
+
+  docker build --tag xv6-docker 
 
-- xv6 is modern reimplementation of Sixth Edition Unix in ANSI C.
+- Run xv6 kernel on QEMU in the container
+
+  docker run --rm --privileged -it xv6-docker ./run-debug.sh
 
+- Run gdb to connect the xv6 kernel running in the QEMU
 
-# Scheduling processes by their priorities
+  docker exec -it xv6-docker ./debug.sh
 
 
 
 
-- Added getpriority() and setpriority() and get_highest_priority() functions in proc.c file of xv6
+
+# Exercise : Adding priorities to the xv6 scheduler 
 
- 
+- Added getpriority() and setpriority() 
+
+- get_highest_priority() functions in proc.c file of xv6
+
+- Implemented it in schelduler()
 
 - Added a test function testpriority() in usertests.c file of xv6 to implement our algorithm
- 
 
-##  The function 
-
+##  Function used in our exercise to find highest priority process 
 ```c
 int get_highest_priority_proc(void)
 {
@@ -101,34 +129,41 @@
     rpid = pid;
     if (highest_priority > p->priority) {
        highest_priority=p->priority;
-       hpid = pid;
-    }
+       hpid = pid; }
   }
   return hpid > 0?hpid:rpid;
 }
 ```
+- It assumes at least one process to be RUNNABLE.
 
+- It may allow no highest priority process.
+
+- The correctness of the function is *important*.
 
 ## Docker Limitation
 
- 
-Mutliple images present in repository due to form command. 
+
+- If repository breaks, Docker poses a problem (a cloud problem).
 
-If repository breaks, Docker poses problem
+- Cloud may be used conveniently but we must not rely on it.
 
+- We can use a direct environment without Docker, since we have a Linux server.
+
+- Docker images can easily eat up our disk spaces.
 
-What can be done?
-
+in ~/.zsh_history
 
-We can keep track of images of Docker. 
+```c
+: 1561014922:0;docker system prune
+: 1561014973:0;docker container prune
+: 1561015350:0;docker image prune
+: 1561015362:0;docker volume prune
+```
+# Conclusion
 
 
-# Conclusion
-
 - Docker environment poses some problems, some of which are difficult to comprehend. 
 
 
-- Storage is difficult
 
-
-- Yet, it gives a good insight of the underlying important concepts of operating system beacuse it is well documented, fast and uses less resources.
\ No newline at end of file
+- Yet, it gives a good insight of the underlying important concepts of operating system because it is well documented, fast and uses less resources.
--- a/slide.pdf.html	Sat Jun 22 12:32:52 2019 +0900
+++ b/slide.pdf.html	Mon Jun 24 13:05:55 2019 +0900
@@ -63,7 +63,7 @@
         <td>
           <div align="left">
                Shivani Dubey
-               Intern, University of the Ryukyus
+               Madan Mohan Malaviya University of Technology, Gorakhpur
             <hr style="color:#ffcc00;background-color:#ffcc00;text-align:left;border:none;width:100%;height:0.2em;">
           </div>
         </td>
@@ -75,14 +75,23 @@
 <div class='slide'>
   
 <!-- _S9SLIDE_ -->
-<h1 id="why-operating-system">Why Operating System?</h1>
+<h2 id="why-do-we-study-operating-system">Why do we study Operating System?</h2>
 
 <ul>
   <li>
-    <p>Backbone of computer system</p>
+    <p>Every computer system has an operating system, which manages the resources of the computer.</p>
+  </li>
+  <li>
+    <p>IoT or IT Services can’t work well without resource managements.</p>
   </li>
   <li>
-    <p>Manages the computer’s memory and processes, as well as all of its software and hardware.</p>
+    <p>To handle it, we have to understand the API of OS.</p>
+  </li>
+  <li>
+    <p>To understand the API, it is better to see the implementations.</p>
+  </li>
+  <li>
+    <p>For example, API for tuning priorities of the processes.</p>
   </li>
 </ul>
 
@@ -92,33 +101,50 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h1 id="introduction">Introduction</h1>
+<h2 id="xv6-operating-system-as-an-educational-tool">Xv6 Operating System as an educational tool</h2>
 
 <ul>
   <li>
-    <p>Docker</p>
+    <p>A Unix-like operating system developed in MIT, based on V6 kernel</p>
+  </li>
+  <li>
+    <p>xv6 is written in ANSI C ( not in C++ )</p>
   </li>
   <li>
-    <p>xv6</p>
+    <p>xv6 is small and simple (9628 lines of codes)</p>
+  </li>
+  <li>
+    <p>It can run on Raspberry Pi ( Small PC board )</p>
+  </li>
+  <li>
+    <p>Or on ARM emulator such as QEMU</p>
   </li>
 </ul>
 
-<p>What is Docker?</p>
+
+
+</div>
 
-<ul>
-  <li>The modern platform for high velocity innovation</li>
-  <li>Docker has products that use operating system level virtualization to develop and deliver software in packages called containers</li>
-  <li>Docker can run on any computer, on any infrastructure and in any cloud</li>
-</ul>
-
-<p>What is xv6?</p>
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="xv6-development-environment-with-qemu">Xv6 development environment with QEMU</h2>
 
 <ul>
   <li>
-    <p>A Unix-like operating system developed in MIT.</p>
+    <p>QEMU emulates ARM CPU with virtual memory</p>
+  </li>
+  <li>
+    <p>Xv6 operating sytem itself is running on QEMU</p>
   </li>
   <li>
-    <p>xv6 is modern reimplementation of Sixth Edition Unix in ANSI C.</p>
+    <p>gdb debugger can be attached to the emulated program (both in user space and system space)</p>
+  </li>
+  <li>
+    <p>We can step and trace inside xv6 kernel</p>
+
+    <pre><code>... but it requires complex development environments setup
+... very time consuming
+</code></pre>
   </li>
 </ul>
 
@@ -128,18 +154,50 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h1 id="what-helped-us">What helped us</h1>
+<h2 id="our-development-environments">Our development environments</h2>
 
 <ul>
   <li>
-    <p>emacs editor (amidst the editor war between vi and emacs!)</p>
-  </li>
-  <li>
     <p>homebrew (it simplifies installation of software in macOS)</p>
   </li>
   <li>
     <p>Mercurial repository of the lab where we saved everything using ssh</p>
   </li>
+  <li>
+    <p>Cross Compilers</p>
+  </li>
+  <li>
+    <p>ARM libraries for C language</p>
+  </li>
+  <li>
+    <p>QEMU (ARM Emulator)</p>
+  </li>
+</ul>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="introducing-docker">Introducing Docker</h2>
+
+<ul>
+  <li>
+    <p>What is Docker? It is a container.</p>
+  </li>
+  <li>
+    <p>What is Container? An isolated envirornment such as file system.</p>
+  </li>
+  <li>
+    <p>It has DockerFile, which describes how to setup the envrionment in the container.</p>
+  </li>
+  <li>
+    <p>Docker can run on any computer using an emulator such as QEMU.</p>
+  </li>
+  <li>
+    <p>Complex development environment can be build using DockerFile and docker built command.</p>
+  </li>
 </ul>
 
 
@@ -148,25 +206,27 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h2 id="why-docker">Why Docker?</h2>
+<h1 id="the-dockerfile">The DockerFile</h1>
 
-<p>Features of Docker:</p>
+<pre><code>FROM phitek/qemu-arm
+RUN apt-get update -y
+RUN apt-get remove gdb -y
+RUN apt-get install gcc-arm-none-eabi gdb-arm-none-eabi qemu-system-arm -y
+WORKDIR /code
+COPY ["src", "."]
+RUN make
+CMD /bin/bash
+</code></pre>
 
 <ul>
   <li>
-    <p>Easy and Faster Configuration</p>
-  </li>
-  <li>
-    <p>Increases productivity</p>
+    <p>FROM line specifies the shared image in Docker repository.</p>
   </li>
   <li>
-    <p>Application Isolation</p>
+    <p>apt-get installs Linux cross compiling tools.</p>
   </li>
   <li>
-    <p>Services</p>
-  </li>
-  <li>
-    <p>Security Management</p>
+    <p>Then it creates working directory, copies our sources to it, and executes make.</p>
   </li>
 </ul>
 
@@ -176,14 +236,23 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h2 id="why-xv6">Why xv6?</h2>
+<h2 id="docker-commands">Docker commands</h2>
 
 <ul>
   <li>
-    <p>It gives a good insight into Command Line Interface of Unix OS</p>
+    <p>Create docker image and environment, and build xv6 kernel</p>
+
+    <p>docker build –tag xv6-docker</p>
   </li>
   <li>
-    <p>xv6 is modern reimplementation of Sixth Edition Unix in ANSI C</p>
+    <p>Run xv6 kernel on QEMU in the container</p>
+
+    <p>docker run –rm –privileged -it xv6-docker ./run-debug.sh</p>
+  </li>
+  <li>
+    <p>Run gdb to connect the xv6 kernel running in the QEMU</p>
+
+    <p>docker exec -it xv6-docker ./debug.sh</p>
   </li>
 </ul>
 
@@ -193,11 +262,17 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h1 id="scheduling-processes-by-their-priorities">Scheduling processes by their priorities</h1>
+<h1 id="exercise--adding-priorities-to-the-xv6-scheduler">Exercise : Adding priorities to the xv6 scheduler</h1>
 
 <ul>
   <li>
-    <p>Added getpriority() and setpriority() and get_highest_priority() functions in proc.c file of xv6</p>
+    <p>Added getpriority() and setpriority()</p>
+  </li>
+  <li>
+    <p>get_highest_priority() functions in proc.c file of xv6</p>
+  </li>
+  <li>
+    <p>Implemented it in schelduler()</p>
   </li>
   <li>
     <p>Added a test function testpriority() in usertests.c file of xv6 to implement our algorithm</p>
@@ -210,30 +285,37 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
-<h2 id="the-function">The function</h2>
-
+<h2 id="function-used-in-our-exercise-to-find-highest-priority-process">Function used in our exercise to find highest priority process</h2>
 <pre><code class="language-c">int get_highest_priority_proc(void)
 {
   int highest_priority;
   int pid = 0;
   int hpid = -1;
   int rpid = 0;
-
   highest_priority=100;
-  struct proc *p;
+ 
+ struct proc *p;
   for(p = ptable.proc; p &lt; &amp;ptable.proc[NPROC]; p++, pid++){
     if(p-&gt;state != RUNNABLE) {
-      continue;
-    }
+      continue;    }
     rpid = pid;
     if (highest_priority &gt; p-&gt;priority) {
        highest_priority=p-&gt;priority;
-       hpid = pid;
-    }
-  }
+       hpid = pid; } }
   return hpid &gt; 0?hpid:rpid;
 }
 </code></pre>
+<ul>
+  <li>
+    <p>It assumes at least one process to be RUNNABLE.</p>
+  </li>
+  <li>
+    <p>It may allow no highest priority process.</p>
+  </li>
+  <li>
+    <p>The correctness of the function is <em>important</em>.</p>
+  </li>
+</ul>
 
 
 
@@ -243,14 +325,28 @@
   <!-- _S9SLIDE_ -->
 <h2 id="docker-limitation">Docker Limitation</h2>
 
-<p>Mutliple images present in repository due to form command.</p>
-
-<p>If repository breaks, Docker poses problem</p>
+<ul>
+  <li>
+    <p>If repository breaks, Docker poses a problem (a cloud problem).</p>
+  </li>
+  <li>
+    <p>Cloud may be used conveniently but we must not rely on it.</p>
+  </li>
+  <li>
+    <p>We can use a direct environment without Docker, since we have a Linux server.</p>
+  </li>
+  <li>
+    <p>Docker images can easily eat up our disk spaces.</p>
+  </li>
+</ul>
 
-<p>What can be done?</p>
+<p>in ~/.zsh_history</p>
 
-<p>We can keep track of images of Docker</p>
-
+<pre><code class="language-c">: 1561014922:0;docker system prune
+: 1561014973:0;docker container prune
+: 1561015350:0;docker image prune
+: 1561015362:0;docker volume prune
+</code></pre>
 
 
 </div>
@@ -261,13 +357,10 @@
 
 <ul>
   <li>
-    <p>Docker environment poses some problems, some of which are difficult to comprehend</p>
+    <p>Docker environment poses some problems, some of which are difficult to comprehend.</p>
   </li>
   <li>
-    <p>Storage is difficult too</p>
-  </li>
-  <li>
-    <p>Yet, it gives a good insight of the underlying important concepts of operating system beacuse it is well documented, fast and uses less resources</p>
+    <p>Yet, it gives a good insight of the underlying important concepts of operating system because it is well documented, fast and uses less resources.</p>
   </li>
 </ul>