Coder Social home page Coder Social logo

mycontainer's People

Contributors

materialofmouse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mycontainer's Issues

ソースファイル分割

ソースファイルの分割

現在、container.c一本でやってるからそろそろ分けておきたい。
理由として、

  • 行数が増えてきてスクロールがめんどくさい
  • 各機能の追加などを楽に行えるようにしたい

ソースファイル

  • cgroup.c
  • cgroup.h
  • capability,c
  • capability.h

その他はそこまで大きくないのでmainで処理を行う。
unshareとかはフラグもあるし、どうしようかな

OverlayFSの導入

OverlayFSの導入をする

技術調査

  • OverlayFSがなにか再確認
  • OverlayFSの周辺技術
  • OverlayFSをどのように使うか(ライブラリとか)

導入

  • OverlayFSのインストールや設定

その他追記があればコメントで書く

CPU制限を割合でできるようにする。

int restrict_cpu(int percent)

引数:割合
返り値:失敗時-1 成功時0
全体のCPU時間をとってきて勝手に割合を計算したら設定してくれるようにする。

subsytem周りの関数の書き直し

int set_subsystem( char * subsytem)

引数:文字列
返り値:失敗時-1 成功時0
手打ちでやってるから入力された文字列からいい感じにしてくれるようにする

overlayの設定を構造体でできるようにする

構造体名 : overlay_t
メンバ
char *upperdir
char *lowerdir
char *workdir
char *targetdir(mountのほうで使うけど、overlay_tに入れちゃって良さそう。)
を導入して、init_overlayの引数にする

インターフェースの追加

コマンドの引数的な感じで扱えるようにする。

インターフェース一覧

  • 作成
  • 停止
  • 権限、リソースの制御
  • 消去

各種引数の名前については後で考える。

処理を関数に分ける

処理が複雑になってきたから関数で分ける
できればファイルで分けていきたい。

OCIに準拠

リソースそれぞれに制限をかけれるようにする

  • CPU時間
  • メモリ
  • ディスク??

Statusを実装

  • creating
  • created
  • running
  • stopped

の4つを最低限実装

なお、OCI Imageの実装はまだ行わない

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.