티스토리 툴바

엑셀 다중창으로 열기

OS | 2010/04/14 09:47
Posted by zentle

XP에서 엑셀 문서를 여러 창으로 여는 방법

  • "시작 > 내 컴퓨터 > 도구 > 폴더 옵션 > 파일 형식"을 선택한다.
  • 확장명에서 "XLS" 선택 하고, "고급" 버튼을 클릭한다.
  • 이 때 키보드로 'xls'를 타이핑하면 자동으로 찾아준다.
  • "동작"에서 "열기(O)"를 선택한다.
  • "같은 창에서 열기(E)" 선택을 해제한다.
  • "편집" 버튼을 클릭한다.
  • "명령을 실행할 응용 프로그램(L):" 에 "C:\Program Files\Microsoft Office\Office12\EXCEL.EXE" /e "%1" 의 형식으로 입력한다. /e "%1" 형식에 주의한다.
  • "DDE 사용"을 해제한다.


 

TAG Excel, 엑셀

DNS 서버 주소

OS | 2010/01/22 17:36
Posted by kozent
1. OpenDNS
기본 DNS 서버 : 208.67.222.222
보조 DNS 서버 : 208.67.222.220

2. Google Public DNS
기본 : 8.8.8.8
보조 : 8.8.4.4

3. KT DNS 서버
기본 : 168.126.63.1
보조 : 168.126.64.2

4. 데이콤
기본 : 164.124.101.2
보조 : 203.248.252.2

5. 하나로
기본 : 131.107.1.7
보조 : 210.94.0.7

6. SK
기본 : 210.220.163.82
보조 : 210.94.6.67

telnet 접속이 느릴 경우

OS/Linux | 2010/01/22 17:20
Posted by kozent

DNS 설정이 잘 못된 경우 telnet 접속이 느려지는 현상이 발생한다.

 /etc/resolv.conf 에서 DNS 주소 설정이 올바른지 확인한다.

잘못된 DNS 서버 주소로 쿼리를 시도하면서 시간이 지연된다.

Ubuntu 한글 설정

OS/Ubuntu | 2009/03/26 17:22
Posted by kozent
우분투에서 euc-kr 한글 설정 방법

1. 한글 설치
# sudo apt-get install language-pack-ko
# sudo locale-gen ko_KR.EUC-KR
# sudo dpkg-reconfigure locales

2 gdm 로그인 화면에서 euc-kr 선택

Ubuntu 8.10 에서 마우스 통합 하기

OS/Ubuntu | 2009/03/26 17:13
Posted by kozent

1. 증상
Ubuntu 8.10 을 Virtualbox 에서 게스트로 설치
마우스 통합이 되지 않는다.

2. 참고
http://forums.virtualbox.org/viewtopic.php?p=43200#43200

3. 해결방법
1) /etc/X11/xorg.conf 파일에 아래 내용 추가
 Section "InputDevice"
        Identifier        "Configured Mouse"
        Driver            "vboxmouse"
        Option            "CorePointer"
EndSection

2) 재부팅

할글 설정, euc-kr

OS/opensolaris | 2009/03/16 15:56
Posted by kozent

GUI 로그인 화면에서 한글 locale은 ko_KR.UTF-8만 선택이 가능하다. 우분투의 경우는 locale-gen을 이용하여 추가할 수 있다. opensolaris에서는 비슷한 방법을 아직 찾지 못하였다. 아래와 같은 방법으로 가능하다.

1) /etc/X11/gdm/gdm.conf 에서 설정하는 방법

2)
다른 하나는 사용자의 ~/.profile 혹은 ~/.login 에서 설정하는 방법

~/.profile을 사용하는 경우

맨 처음 라인에
GDM_LANG=ko;export GDM_LANG
선언

~/.login을 사용하는 경우

맨 처음 라인에
setenv GDM_LANG ko
선언

< 에러 내용 >
To compile qedit.h you must install the DirectX 9 SDK, to obtain the dxtrans.h header.
d:\program files\microsoft sdks\windows\v6.1\include\qedit.h(838) : error C2504: 'IDXEffect' : 기본 클래스를 정의하지 않았습니다.

해결책1)
아래의 코드를 qedit.h를 include 하기 전에 추가한다.

#pragma include_alias( "dxtrans.h", "qedit.h" )
#define
__IDxtCompositor_INTERFACE_DEFINED__
#define
__IDxtAlphaSetter_INTERFACE_DEFINED__
#define
__IDxtJpeg_INTERFACE_DEFINED__
#define
__IDxtKey_INTERFACE_DEFINED__

#include <qedit.h>

해결책 2)
DirectX SDK August 2007 버전을 설치한다.

참고글)
1. http://social.msdn.microsoft.com/forums/en-US/windowssdk/thread/ed097d2c-3d68-4f48-8448-277eaaf68252/

IPTV Functional Architecture

규격/IPTV | 2009/01/30 18:28
Posted by kozent

IMS based IPTV Functional Architecture

SCF(Service Control Function)
Ut: IPTV user profile
TAG IPTV

Message Queue 와 select

Programming/Linux | 2008/04/24 14:20
Posted by zentle

Introduction

When using message queue with socket or any other file descriptor based unix facilities, the most inconvenient thing is message queue does not support select() system call. So usually unix programmers solve the I/O multiplexing issue in a simple but ugly way like

while(1)

{

    select on socket with timeout;

    ...

    wait on a message queue with IPC_NOWAIT

}

Certainly, the above implementation is ugly. I don't like it. Another solution might be adopt multi-threading. But here in this article, I want to show you a funny approach, that is, implementing a new system call called msgqToFd(). I'm not trying to provide you with full-fledged, bug-free kernel implementation. I just want to present you my experiment. This article might be interesting to readers who like to play with GNU/Linux kernel source.


 

msgqToFd() - A new non-standard system call

Here is its signature.

int msgqToFd(int msgq_id)

It returns a file descriptor corresponding to a message queue , which can be used with select().

If any error happens, it returns -1.

An application can use the call like

      ...

q_fd = msgqToFd(msgq_id);

while(1)

{

      FD_ZERO(&rset);

      FD_SET(0, &rset);

      FD_SET(q_fd, &rset);

      select(q_fd + 1, &rset, NULL, NULL, NULL);

      if(FD_ISSET(0, &rset))

      {

           ...

      }

      if(FD_ISSET(q_fd, &rset))

      {

           r = msgrcv(msgq_id, &msg, sizeof(msg.buffer), 0, 0);

           ...

      }

}


How select() works

A file descriptor is associated with a file structure. In the file structure, there is a set of operations supported by this file type called file_operations. In the file_operations structure, there is an entry named poll. What the generic select() call does is call this poll() function to get status of a file (or socket or whatever) as the name suggests.

In general, the select() works like

while(1)

{

     for each file descriptor in the set

     {

         call file's poll() to get mask.

         if(mask & can_read or mask & can_write or mask & exception)

         {

             set bit for this fd that this file is readable/writable or there is an
             exception.

             retval++;

         }

     }

     if(retval != 0)

         break;

     schedule_timeout(__timeout);

}

For detailed implementation of select(), please take a look at sys_select() and do_select() in fs/select.c. of standard kernel source code.

Another thing required to understand is poll_wait(). What it does is put current process into a wait queue provided by each kernel facilities such as file or pipe or socket or in our case, message queue.

Please note that the current process may wait on several wait queues by calling select()


 

long sys_msgqToFd(long msqid)

The system call should return a file descriptor corresponding to a message queue.  The file descriptor should point to a file structure which contains file_operations for message queue.

To do that, sys_msgqToFd() does

  1. with msqid, locate the corresponding struct msg_queue

  2. allocate a new inode by calling get_msgq_inode()

  3. allocate a new file descriptor with get_unused_fd()

  4. allocate a new file structure with get_empty_filp()

  5. initialize inode, file structure

  6. set file's file_operations with msgq_file_ops

  7. set file's private_data with msq->q_perm.key

  8. install fd and file structure with fd_install()

  9. return the new fd

Please take a look at msg.c and the accompanying msg.h provided with this article. See also sys_i386.c

msgq_poll()

msgq_poll() implementation is pretty simple.

What it does is

  1. With file->private_data, which is a key for a message queue, locate the corresponding message queue

  2. put current process into the message queue's wait queue by calling poll_wait()

  3. if the message queue is empty (msq->q_qnum == 0), set mask as writable( this may cause some arguments but let's forget this for now). If not, set mask as readable

  4. return the mask


 

Modification of existing message queue source code

To support poll() on a message queue, we need to modify existing message queue source code.

The modification includes

  1. adding a wait queue head to struct msg_queue, which will be used to put a process into for select(). Also the wait queue head should be initialized when a message queue is created. Please take a look at struct msg_queue and newque() in msg.c.

  2. Whenever a new message is inserted to a message queue, a process waiting on the message queue( by calling select()) should be awaken. Take a look at sys_msgsnd() in msg.c.

  3. When a message queue is removed or it's properties are changed, all the processes waiting on the message queue(by calling select()) should be awaken. Take a look at sys_msgctl() and freeque() in msg.c.

  4. To allocate a new inode and file structure, we need to set up some file system related

  5. s for VFS to operate properly. For this purpose, we need additional initialization code to register a new file system and set something up. Take a look at msg_init() in msg.c.

All the changes are "ifdef"ed with MSGQ_POLL_SUPPORT. So it should be easy to identify the changes.


 

File System Related Stuff

To allocate a file structure, we need to set up the file's f_vfsmnt and f_dentry properly. Otherwise you'll see some OOPS messages printed our on your console.  For VFS to work correctly with this new file structure, we need some additional setup, which is already explained briefly.

Since we support only poll() for the file_operations,  we don't have to care about every detail of the file system setup code. All we need is a properly set up f_dentry and f_vfsmnt. Most of the related code is copied from pipe.c.


 

Adding a new system call

To add a new system call, there two things need to be done.

The first step is add a new system call in kernel level, which we already did (sys_msgqToFd()).
In the GNU/Linux kernel, all system V IPC related calls are dispatched through sys_ipc() in arch/i386/kernel/sys_i386.c. sys_ipc() uses call number to identify a specific system call requested. To dispatch the new system call properly, we have to define a new call number(which is 25) for sys_msgqToFd() and modify sys_ipc() to call sys_msgqToFd(). Just for your reference, please take a look at  arch/i386/kernel/entry.S in the standard kernel source and sys_ipc() in sys_i386.c provided with this article.

The second step is add a stub function for user level application. Actually all the system call stub functions are provided by GLIBC. And to add a new system call, you have to modify the GLIBC and build your own and install it. Oh hell, NO THANKS!!!. I don't want to do that and I don't want you to do that either. To solve the problem, I did some copy and paste from GLIBC. If you look at user/syscall_stuff.c provided with this article, there is a function named msgqToFd(), which is the stub for msgqToFd() system call.

What it does is simply

return INLINE_SYSCALL(ipc, 5, 25, key, 0, 0, NULL);

Here is a brief description for the macro.

ipc  :  system call number for sys_ipc(). ipc is expanded as __NR_ipc, which is 117.
5    :  number of arguments for this macro.
25   :  call number for sys_msgqToFd()
key  :  an argument to sys_msgqToFd()

INLINE_SYSCALL sets up the arguments property and invokes interrupt 0x80 to switch to kernel mode to invoke a system call.

Conclusion

I'm not so sure about practical usability of this modification. I just wanted to see whether this kind of modification was possible or not.

Besides that, I want to talk about a few issues needed to be addressed.

  1.  If two or more threads or processes are accessing a message queue and one process is waiting on the message queue with msgrcv() and another is waiting with select(), then always the former process/thread will receive the new message. Take a look at pipelined_send() in msg.c.

  2. For writability test, msgq_poll() sets the mask as writable only if the message queue is empty. Actually we can set the mask as writable if a message queue is not full and there will be no big difference. But I chose the implementation for simplicity.

  3. Let's think about this scenario.

    1. A queue is created
    2. A file descriptor for the queue is created
    3. The queue is removed

    In this kind of case, what should be do? A correct solution would be close the fd when the queue is removed. But this is impossible since a message queue can be removed by any process which has a right to do that. This means a process removing the message queue may not have a file descriptor associated with the message queue even if the message queue is mapped to a file descriptor by some other process.

    Additionally, if the same queue (with the same key) is created again, the mapping will be still maintained.

  4. Efficiency problem. All the processes waiting on the wait queue by calling select() will be awaken when there is a new message. Eventually only one process will receive the message and all the other processes will go to sleep again.

  5. No support for message type. Regardless of message type, if there is any message, the select() will return.

TAG IPC, select
Error 내용
The requested property page could not be displayed.

원인
proppage.dll 파일이 제대로 등록이 되지 않았다.
..라는 내용을 다른 누군가의 블로그에서 보았다.
버전이 올라가면서 무언가 바뀐듯하다.

해결 방법
proppage.dll 파일을 찾아서 등록한다.

Windows SDK for Vista 인 경우 경로
C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin


블로그 이미지

kozent

나의 일, 관심분야들...

카테고리

분류 전체보기 (11)
Programming (4)
Tools (0)
OS (6)
규격 (1)
코어망 (0)
Telcoware (0)