Mercurial > hg > Members > shivanidubey > Internship_presentation
diff slide.md @ 3:623da64aac7a default tip
Internship_presentation
author | shivanidubey |
---|---|
date | Mon, 24 Jun 2019 13:05:55 +0900 |
parents | 54dd75a92d04 |
children |
line wrap: on
line diff
--- 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.