Mercurial > hg > Members > shivanidubey > Internship_presentation
diff slide.md @ 2:54dd75a92d04
fix slies
author | shivanidubey |
---|---|
date | Sat, 22 Jun 2019 12:32:52 +0900 |
parents | be770be61183 |
children | 623da64aac7a |
line wrap: on
line diff
--- a/slide.md Fri Jun 21 15:28:51 2019 +0900 +++ b/slide.md Sat Jun 22 12:32:52 2019 +0900 @@ -1,39 +1,127 @@ -title: Studying Operating System Using Docker +title: Studying Operating System Using Docker Platform author: Shivani Dubey -profile: Intern, University of the Ryukyus +profile: Madan Mohan Malaviiya, University of Technology + +## Why we study Operating System? + +- Every computer system has an operating system, which manages the resource of the computer. + +- IoT or IT Services can't work well without resource manageents. + +- To handle it, we have to understand the API of OS + +- To understand the API, it it better to see the implentations. + +- For an example, API for tuning priorities of the processess + +## Xv6 Operating System as an educational tool + +- A Unix-like operating system developed in MIT, based on V6 kernel. + +- 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 ) + +- Or on ARM emulator such as QEMU -# Introduction +## Xv6 development envrionment with QEMU + +- QEMU emulates ARM CPU with virtual memory + +- Xv6 operating sytem itself is running on QEMU + +- 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 + + ... but it requires complex development envrionments setup + ... very time consuming + +## Our development envrionments + +- 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 + +- ARM libraries for C language + +- QEMU (ARM Emulator) +## Introducing Docker -- Docker -- xv6 +- What is Docker? It is a container. + +- What is Container? An isolateed envriornment such as file system. + +- 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 + +- Complex develement environment can be build using DockerFile and docker built command. + +# The DockerFile + +``` +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 lines specifies the shared image in Docker repository. + +- apt-get install Linux cross compiling tools -Why Docker? +- then it create workig directory, and copy our sources to it, and execute make + +## Docker command + +- create docker imagae and environment, and built xv6 kernel + + docker build --tag xv6-docker . + +- 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 + + docker exec -it xv6-docker ./debug.sh + +## Features of Docker: + +- Easy and Faster Configuration + +- Increases productivity + +- Application Isolation + +- Provies Services + +- Security Management -The modern platform for high velocity innovation. -Docker container is not any specific platform. It can run on any computer, on any infrastructure and in any cloud. +# Exercise : adding priorities to the xv6 scheduler -## Features of Docker +- Added getpriority() and setpriority() + +- get_highest_priority() functions in proc.c file of xv6 -- Easy and Faster Configuration -- Increases productivity -- Application Isolation -- Swarm -- Routing Mesh -- Services -- Security Management +- implement it in schelduler() -What is xv6? - - -xv6 is modern reimplementation of Sixth Edition Unix in ANSI C. +- Added a test function testpriority() in usertests.c file of xv6 to implement our algorithm -## Scheduling processes by their priorities - - - -We implemented the concept of scheduling processes by their priorities. +## The function ```c int get_highest_priority_proc(void) @@ -59,9 +147,34 @@ } ``` +- It assumes at least one process is RUNNABLE -## Docker Limitations +- It may allow no highest priority process. + +- The correctness of the function is *important*. + +## Docker Limitation + +- If repository breaks, Docker poses a problem (a cloud probelm) + +- Clound should be used conviniently but don't 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. - +in ~/.zsh_history -Docker environment poses some problems, some of which are difficult to comprehend. \ No newline at end of file +```c +: 1561014922:0;docker system prune +: 1561014973:0;docker container prune +: 1561015350:0;docker image prune +: 1561015362:0;docker volume prune +``` +# Conclusion + +- 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