view user/matac42/note/2021/07/20.md @ 80:6b630ccd9480

backup 2021-07-21
author autobackup
date Wed, 21 Jul 2021 00:10:04 +0900
parents
children
line wrap: on
line source

# 研究目的

アプリケーションの信頼性を保証するために、アプリケーションが動作するOSの信頼性を高める必要がある。

本研究室では、信頼性に重きを置いたGearsOSを開発している。

GearsOSはノーマルレベル、メタレベルの処理を切り分けることができるCbC(Continuation Based C)で記述されている。

信頼性とは

- どのユーザーがどのようなファイル操作をしたかわかること
- logが残ること
- item 操作の辻褄があっていること

を指す。

また、GearsOSには現在未実装の機能があり、その一つにファイルシステムが挙げられる。信頼性を確保するため、ファイルシステムは

- ファイルシステム全体のトランザクション化
- ファイルシステム全体のバックアップ\&ロギング

を取り入れたDataGearManagerとして実装したい。

本卒業研究では、GearsOSへファイルシステムの実装を目指す。

# Christie

## reflection と annotation

reflectionの役割がわかった

- reflectionはclassの情報を取得する
- ChristieではCGにあるannotationを読み取るために使っている
- 結構強力な機能かも
- isAnnotationPresent

annotationの作り方がわかった

```java
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;

# 自作のannotationはこうやって作る
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@interface Take {
}

public class ReflectionTest {

    String hello;

    int num;

    @Take
    private String huga() {
        return hello;
    }
}

class Main {
    public static void main(String[] args) {
        ReflectionTest target = new ReflectionTest();

        try {
            Class<? extends ReflectionTest> clazz = target.getClass();
            Method method = clazz.getDeclaredMethod("huga", null);
            method.setAccessible(true);
            String result = (String) method.invoke(target, null);
//            System.out.println(result);
        } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
            System.out.println(e);
        }

        for (Method field : target.getClass().getDeclaredMethods()) {
            System.out.println("---");
            System.out.println(field);
//            System.out.println(field.getType());
            System.out.println(Arrays.toString(field.getDeclaredAnnotations()));
//            if (field.isAnnotationPresent(Take.class)) {
//                System.out.println("Take is exist");
//            }
        }
    }
}
```

## commandList

![commandList.svg](/attachment/60f69e720a7b37004aeff124)

annotationを読み取った後、setCommandでaddが行われcommandListのArrayに突っ込まれる

## 赤黒木


このサイトはかなりわかりやすいがinsertの場合分けが4つ

- http://wwwa.pikara.ne.jp/okojisan/rb-tree/index.html

insertの場合分けが6つのものがあるらしい

アルゴリズムとデータ構造の第6章読んでもうちょっと理解進めたいところ

### 操作

- member
- insert
- delete

### nodeのメンバ

- key
- parent
- left
- right
- rank

# syskan

## Wireless Diagnostics

`$open /System/Library/CoreServices/Applications/Wireless\ Diagnostics.app`

macにデフォで入ってる。wifiのスキャンができる。楽しい!便利!

@hsrmy_ie さんに教えてもらった

電波強度(RSSI)、チャンネル、バンド、プロトコルとか結構いろいろみれる

wifiルータがたくさんある環境でルーターの生死が特定できる

こういうのをiPhoneでささっとやりたいが、なかなか良いappが見つからない

Androidだと割とありそうな感じ

## 台風対策

あまり強い台風ではなさそうだが、とりあえずサーバー室の窓から雨が入ってこないように雑巾とか突っ込んどいた

停電しないよう祈る

## VMの監査

なんかスクリプト書くかして自動的に行いたい

## 報告

yahoooのインターン落ちた わー

大学院受かった いえい

## その他

小林さんちのメイドラゴンsの作画がとても良い

サマーウォーズはシス管のモチベがあがる