2016년 6월 14일 화요일

Fat tree

일반적은 tree 데이터 구조에서는 각각의 branch 가 자신의 depth 에 상관없이 같은 굵기를 가지게 된다. 하지만 fat tree 에서는 그림1.과 같이 상위 계층에 있는 branch 일수록 더 fatter (두꺼운) 성질을 가지게 되며, depth 가 커질수록 branch 는 가늘어 지게 된다. 

이와 같은 구조는 데이터 센터와 같은 네트워크 구조를 설명할 때 사용된다. core 를 거쳐가는 데이터 트래픽이 많은 상황에서 코어 주변에는 큰 BW를 가지는 링크가 필요하며, 실제로 이와 비슷한 형태로 네트워크 구조가 형성되게 된다. 따라서 fat tree 는 데이터 센터 내부 트래픽 분석 등에 효율적으로 사용되는 데이터 구조라고 할 수 있다.

그림1. Fat tree (wikipedia)
그림2. Simple fat-tree topology

2014년 11월 30일 일요일

Edge computing

Edge Computing is pushing the frontier of computing applications, data, and services away from centralized nodes to the logical extremes of a network. It enables analytics and knowledge generation to occur at the source of the data. This approach requires leveraging resources that may not be continuously connected to a network such as laptops, smartphones, tablets and sensors. Edge Computing covers a wide range of technologies including wireless sensor networks, mobile data acquisition, mobile signature analysis, cooperative distributed peer-to-peer ad hoc networking and processing also classifiable as Local Cloud/Fog Computing and Grid/Mesh Computing, distributed data storage and retrieval, autonomic self-healing networks, virtual cloudlets, remote cloud services, augmented reality, and more.


2014년 7월 25일 금요일

[콘티키/Contiki] MAC, RDC 프로토콜 변경

콘티키의 MAC layer는 크게 MAC, RDC 이렇게 두 부분으로 구분 됩니다.

MAC 은 우리가 일반적인 네트워크에서 생각하는 역할을 합니다.

CSMA 가 MAC에 구현되어 있습니다.

RDC는 Radio Duty cycle의 약자로, Duty cycle을 관리하는 역할을 합니다.

센서네트워크에서 sleep schedule을 관리하는 부분에 대한 다양한 연구들이 있는데요,

X-MAC, B-MAC 등등, 이런 부분들이 다 Duty cycle을 관리하는 것이라고 생각할 수 있습니다.

콘티키에는 RDC driver가 다음과 같이 5개가 있습니다.

 contikimac_driver
 xmac_driver
 cxmac_driver
 lpp_driver
 nullrdc_driver

이 중에서 우리가 마음대로 골라서 사용할 수 있습니다.

각각의 장단점이 있으니 상황에 맞는 RDC driver를 골라서 사용하면 됩니다.

이를 바꾸는 방법은 다음과 같습니다.


RDC driver 는 플랫폼에 따라서 따로 선택해서 사용할 수 있습니다.

따라서 이를 설정해주는 파일은 플랫폼 별로 만들어 져 있습니다.

micaz 플랫폼을 예로 들어서 설명을 하면,


CONTIKI/platform/micaz 폴더에 있는 contiki_conf.h 파일을 엽니다.


contiki_conf.h 파일에서는 우선 ipv6을 사용할지 아닐지에 대하여 구분 하여 설정을 합니다.

일반적인 센서 네트워크 구성에서는  ipv6를 사용하지 않기 때문에

/* Network setup for non-IPv6 (rime). */

이 부분에서 rdc driver를 선택할 수 있습니다.

#define NETSTACK_CONF_RDC     contikimac_driver
#define NETSTACK_CONF_RDC     xmac_driver
#define NETSTACK_CONF_RDC     cxmac_driver
#define NETSTACK_CONF_RDC     nullrdc_driver

그리고 다시 업로딩을 해서 실행하면 다음과 같이 RDC driver 가 바뀐것을 확인 할 수 있습니다.

___________________________________________________

Rime started with address 1.0
MAC 01:00:00:00:00:00:00:00
CSMA nullrdc, channel check rate 128 Hz, radio channel 26
Contiki 2.7 started. Node id 1
___________________________________________________

2014년 7월 20일 일요일

[콘티키/Contiki] 미카즈(Micaz)에 콘티키 올리기 (2) : uisp command not found

Micaz에 콘티키를 바로 올리려는 시도를 하면 아래와 같은 에러 메세지가 뜰 수 있습니다.

make: uisp: Command not found






해결 방법:

간단한 해결 방법은 tinyos-tools 을 설치하는 것이에요.

과정이 조금 복잡하긴 한데, 다음과 같이 순서로 진행하면 됩니다.

1. Tell apt about the TinyProd Signing Key.

gpg --keyserver keyserver.ubuntu.com --recv-keys A9B913B9
gpg -a --export A9B913B9 | sudo apt-key add -

2. Add the following lines to /etc/apt/sources.list.d/tinyprod-debian.list:

deb http://tinyprod.net/repos/debian wheezy main
deb http://tinyprod.net/repos/debian msp430-46 main

위의 두 줄을 tinyprod-debian.list 파일에 추가해야 하는데,
아래 명령어로 추가할 수 있습니다.

sudo -s
cd /etc/apt/sources.list.d
echo "deb http://tinyprod.net/repos/debian wheezy main" >> tinyprod-debian.list
echo "deb http://tinyprod.net/repos/debian msp430-46 main" >> tinyprod-debian.list

3. Install tinyos tools

sudo apt-get update
sudo apt-get install tinyos-tools


4. 이렇게 하고

CONTIKI/example/hello-world 폴더에서 다음과 같은 명령어로 미카즈에 콘티키를 올릴 수 있어요.

sudo make hello-world.upload TARGET=micaz PORT=/dev/ttyUSB0





참고 : http://tinyprod.net/repos/debian/

2014년 7월 18일 금요일

[콘티키/Contiki] 미카즈(Micaz)에 콘티키 올리기

센서 네트워크 및 IOT 관련 논문들에서 자주 찾아볼 수 있는 Micaz platform.

Micaz에 TinyOS를 이용하는 것이 많이 소개되었는데요,

콘티키도 올려서 사용할 수 있습니다.


Micaz에서 hello-world example 실행하기

콘티키 설치를 마친 후, 아래 폴더로 갑니다.

CONTIKI/example/hello-world/


1. Makefile 설정

 폴더 내에 기본적으로 Makefile 이 존재 합니다.

 혹시 파일을 추가하거나, 새로운 application을 만들 경우에는 Makefile 부터 만들어 줍니다.


2. Compile

 hello-world.c 파일을 컴파일 합니다.

 make hello-world TARGET=micaz

 (이 때, 혹시 hello-world 폴더 외부의 다른 파일들, 예를 들어 core, platform 폴더의 파일을 수정한 경우에, make clean TARGET=micaz 를 꼭 해주셔야 합니다.)

3. Upload

 sudo make hello-world.upload TARGET=micaz PORT=/dev/ttyUSB0


4. 출력

 Micaz를 통해서 나오는 출력을 확인하고 싶으면

 cat /dev/ttyUSB1

이 명령어를 통해서 확인해볼 수 있습니다.



* make: uisp: Command not found 이와 같은 에러가 발생하는 경우가 있는데요,

 다음 포스팅을 보시면 해결할 수 있어요~

2014년 6월 1일 일요일

[콘티키/Contiki] Install contiki using Instant Contiki

Download Instant Contiki


아래 링크로 들어갑니다.

http://sourceforge.net/projects/contiki/files/Instant%20Contiki/

여기서 Instant Contiki 2.7 를 다운받고

Virtual box를 이용하여 설치하면 됩니다.

Virtual box에서 새로만들기 메뉴에서 우분투를 선택하고

하드 드라이브 항목에서

"기존 가상 하드 드라이브 파일 사용" 을 선택합니다.

위에서 받아서 압축을 푼 폴더 속에 있는

Instant_Contiki_Ubuntu_12.04_32-bit.vmdk

을 선택하고 실행하면 설치 끝!


참고로 이때 Ubuntu 의 비밀번호는 user 입니다.