z

(원문 http://blogs.msdn.com/oldnewthing/archive/2007/05/03/2383346.aspx)

Exiting is one of the scariest moments in the lifetime of a process. (Sort of how landing is one of the scariest moments of air travel.)

Many of the details of how processes exit are left unspecified in Win32, so different Win32 implementations can follow different mechanisms.
For example, Win32s, Windows 95, and Windows NT all shut down processes differently. (I wouldn't be surprised if Windows CE uses yet another different mechanism.)
Therefore, bear in mind that what I write in this mini-series is implementation detail and can change at any time without warning. I'm writing about it because these details can highlight bugs lurking in your code. In particular, I'm going to discuss the way processes exit on Windows XP.

I should say up front that I do not agree with many steps in the way processes exit on Windows XP. The purpose of this mini-series is not to justify the way processes exit but merely to fill you in on some of the behind-the-scenes activities so you are better-armed when you have to investigate into a mysterious crash or hang during exit. (Note that I just refer to it as the way processes exit on Windows XP rather than saying that it is how process exit is designed. As one of my colleagues put it, "Using the word design to describe this is like using the term swimming pool to refer to a puddle in your garden.")

When your program calls ExitProcess a whole lot of machinery springs into action. First, all the threads in the process (except the one calling ExitProcess) are forcibly terminated. This dates back to the old-fashioned theory on how processes should exit: Under the old-fashioned theory, when your process decides that it's time to exit, it should already have cleaned up all its threads. The termination of threads, therefore, is just a safety net to catch the stuff you may have missed. It doesn't even wait two seconds first.

Now, we're not talking happy termination like ExitThread; that's not possible since the thread could be in the middle of doing something. Injecting a call to ExitThread would result in DLL_THREAD_DETACH notifications being sent at times the thread was not prepared for. Nope, these threads are terminated in the style of TerminateThread: Just yank the rug out from under it. Buh-bye. This is an ex-thread.

Tell, that was a pretty drastic move, now, wasn't it. And all this after the scary warnings in MSDN that TerminateThread is a bad function that should be avoided!

Wait, it gets worse.

Some of those threads that got forcibly terminated may have owned critical sections, mutexes, home-grown synchronization primitives (such as spin-locks), all those things that the one remaining thread might need access to during its DLL_PROCESS_DETACH handling. Well, mutexes are sort of covered; if you try to enter that mutex, you'll get the mysterious WAIT_ABANDONED return code which tells you that "Uh-oh, things are kind of messed up."

What about critical sections? There is no "Uh-oh" return value for critical sections; EnterCriticalSection doesn't have a return value. Instead, the kernel just says "Open season on critical sections!" I get the mental image of all the gates in a parking garage just opening up and letting anybody in and out.

As for the home-grown stuff, well, you're on your own.

This means that if your code happened to have owned a critical section at the time somebody called ExitProcess, the data structure the critical section is protecting has a good chance of being in an inconsistent state. (Afer all, if it were consistent, you probably would have exited the critical section! Well, assuming you entered the critical section because you were updating the structure as opposed to reading it.) Your DLL_PROCESS_DETACH code runs, enters the critical section, and it succeeds because "all the gates are up". Now your DLL_PROCESS_DETACH code starts behaving erratically because the values in that data structure are inconsistent.

Oh dear, now you have a pretty ugly mess on your hands.

And if your thread was terminated while it owned a spin-lock or some other home-grown synchronization object, your DLL_PROCESS_DETACH will most likely simply hang indefinitely waiting patiently for that terminated thread to release the spin-lock (which it never will do).

But wait, it gets worse. That critical section might have been the one that protects the process heap! If one of the threads that got terminated happened to be in the middle of a heap function like HeapAllocate or LocalFree, then the process heap may very well be inconsistent. If your DLL_PROCESS_DETACH tries to allocate or free memory, it may crash due to a corrupted heap.

Moral of the story: If you're getting a DLL_PROCESS_DETACH due to process termination,† don't try anything clever. Just return without doing anything and let the normal process clean-up happen. The kernel will close all your open handles to kernel objects. Any memory you allocated will be freed automatically when the process's address space is torn down. Just let the process die a quiet death.

Note that if you were a good boy and cleaned up all the threads in the process before calling ExitThread, then you've escaped all this craziness, since there is nothing to clean up.

Note also that if you're getting a DLL_PROCESS_DETACH due to dynamic unloading, then you do need to clean up your kernel objects and allocated memory because the process is going to continue running. But on the other hand, in the case of dynamic unloading, no other threads should be executing code in your DLL anyway (since you're about to be unloaded), so—assuming you coded up your DLL correctly—none of your critical sections should be held and your data structures should be consistent.

Hang on, this disaster isn't over yet. Even though the kernel went around terminating all but one thread in the process, that doesn't mean that the creation of new threads is blocked. If somebody calls CreateThread in their DLL_PROCESS_DETACH (as crazy as it sounds), the thread will indeed be created and start running! But remember, "all the gates are up", so your critical sections are just window dressing to make you feel good.

(The ability to create threads after process termination has begun is not a mistake; it's intentional and necessary. Thread injection is how the debugger breaks into a process. If thread injection were not permitted, you wouldn't be able to debug process termination!)

Next time, we'll see how the way process termination takes place on Windows XP caused not one but two problems.

Footnotes

†Everybody reading this article should already know how to determine whether this is the case. I'm assuming you're smart. Don't disappoint me.

AND

류한석님의 포스트를 구경하다가 우연히 보게된 Architect구인 광고이다..

흠..국내에선 사실 아키텍트라는 직업은 말은 흔하되, 현업에서 보기가 상당히 드문 직업이다.

대형 구인사이트나 개발자 에이전시에서도 아키텍트를 찾는 일은 흔지않다. 그래서 PM과 아키텍트를 동일시 하는 현상까지 벌어지지 않나 생각한다. 하긴 그 역할 구분이 명확하지 않은게 국내현실이지만..

뭐 굳이 내가 일하고 있는 SI업계 뿐 아니라..게임, 상용 패키지, 임베디드, 컨설팅웨어 등 각종
분야에서 아키텍트의 구분이 명확하고, 그 선이 확실히 드러나야 하는것 만은 분명하다. 우린 그림을
잘 그리는 사람이 필요하고, 안드로메다 언어보다는 한국어에 익숙하기 때문이다.

----------------------------------------------------------------------------------
(전문은 요기)

Required Qualifications:
? Minimum of four years of UI/IA experience
? Proven success managing complex web projects from initial requirements through final revisions
? Demonstrated skill designing user flows, detailed schematics and site architecture based on business goals and user needs
? Experience with planning, conducting and analyzing user testing
? Ability to cleanly implement UI/IA concepts across different platforms and browsers
? Thorough familiarity with HTML hand coding, basic JavaScript coding, CSS, DHTML, FTP, Photoshop, Illustrator and Flash
? Experience working in collaborative teams, with a strong understanding the technical issues faced by engineers and the ability to clearly translate those issues to non-technical clients
? Strong communication skills to articulate content and UI goals, expectations and project deadlines.
? Ability to manage multiple projects under tight deadlines

AND

대략적 구분

 1) 제안서 작성
 2) 프로젝트 계획 및 스케줄링
 -  활동, 이정표, 전달물에 대한 정리
(아래의 반복)
-  제약 사항 판단 (인수일,엔지니어,전체예산 등)->  
    프로젝트 요인 추정 (구성,크기,기능 등) -> 
    이정표와 전달물 정의

위에 정의된 데로 스케줄 진행시 문제가 발생하면 기술검토회의를 열어 차선책을 찾는다.

소프트웨어  개발 계획 구성
2.1) 도입(Introduction)
2.2) 프로젝트 조직 (Project Oranization)
2.3) 위험분석 (Risk Analysis)
2.4) H/W, S/W 자원 요구사항
2.5) 작업분해(Work Breakdown) - 프로젝트를 세부 활동으로 분해, 이정표와 전달물 분석
2.6) 프로젝트 스케줄
-활동들 사이의 종속성 파악, 이정표를 얻는데 필요한 시간 분석, 인력배치
-활동네트워크(Activity Network Or CPM) 와 막대차트(간트차트) 이용한다.

2.7) 모니터링과 보고
2.8)기타 품질계획,  확인계획,  형상관리 계획,  직원 개발 계획

 3) 프로젝트 비용산출
 4) 프로젝트 모니터링 과 검토
 5) 모니터링과 검토
 6) 인력 선택과 평가
 7) 보고서 작성 및 PT

AND

AND



원본글

작고 강한 기업을 위한 마케팅 제언 (III) - 제휴 비즈니스

랭키닷컴 송정훈 팀장 ( ZDNet Korea )   2007/02/23
자본이 충분치 않은 중소 인터넷 기업 입장에서 ‘제휴’는 회사와 사이트의 이름을 알리고, 실제적인 매출도 확보할 수 있는 아주 유용한 마케팅 활동이다. 그런데, 생각보다 많은 인터넷 기업이 제휴를 추진하는데 어려움을 겪고 있는 것으로 보인다. 특히, 제휴 활동의 폭이 배너 교환 정도로 제한되어 있어, 제휴의 실제적인 효과 보다는 제휴를 했다는 형식 자체에 의미를 두고 있는 경우도 많이 있다.


상대방 사이트의 니즈를 먼저 파악하라
사실, 제휴는 그렇게 쉽지도 않지만, 그렇게 접근하기 어려운 활동도 아니다. 하지만, 대부분의 경우 초기에 제안한 제휴안대로 실행되는 경우가 거의 없다. 위에 쓴 것처럼, 최초의 구상을 깎아내고 깎아내어 ‘조건 없는 배너 교환’으로 최종 합의에 이르는 경우는 이미 많은 분들이 경험해 본 일일 것이다.

제휴를 고민할 때는 대부분 우리 사이트가 무엇을 얻을 것인가를 먼저 고민하게 된다. 물론, 제휴에 관한 논의가 진행 중일 때도 마찬가지다. 그러다 보니 각자의 역량을 살린 시너지 넘치는 사업을 기획하기 보다는 자사의 이익을 우선한 안을 상대방에게 주게 되고, 이는 자연스럽게 상대방의 이해와 충돌하게 된다. 그 결과 제휴의 폭은 갈수록 협소해지게 된다.

제휴는 서로의 가려운 부분을 상대방의 손을 빌어 긁어주는 활동이다. 즉, 상대방의 가려운 부분을 알지 못하면, 제휴 제안 자체가 성립되기 힘들다.

꽃 배달 전문몰이 임신/육아 커뮤니티와 제휴하려면, 무엇이 필요할까? 임신/육아 커뮤니티 회원들이 꽃이 필요한 순간은 어떤 때일까? 예를 들어, 태아의 첫 초음파 사진을 올리면 그들에게 무료로 꽃을 배달해주는 서비스를 해당 커뮤니티에 제공하는 것은 어떨까? 임산부의 정서상 꽃 선물은 빼놓을 수 없는 것이고, 커뮤니티 입장에서도 가입자들의 게시글 또는 사진을 확보할 수 있는 계기가 될 수 있을 것이다.

그리고 해당 꽃 배달 전문 몰은 해당 고객의 주소를 확보하거나, 자신의 이름을 알릴 수 있게 된다. 그리고 애는 곧 태어나기 마련이기 때문에 꽃에 대한 추가 수요를 확보할 수도 있다.


제휴의 종류와 방식
제휴는 기본적으로 아이디어에 의존하는 경향이 크다. 이 아이디어를 제대로 산출하기 위해서 현재 인터넷 비즈니스에서 행해지는 제휴 활동의 종류를 확인해보는 것도 좋을 것이다.

(1) 수익 교환형 제휴
- 배너 교환 : 배너를 교환하고, 이 링크를 통해 유입된 방문자가 구매 또는 회원 가입했을 때 이에 대한 일정한 수수료를 받는 방식

- Reseller : 배너교환과 비슷하지만, 구체적인 영업활동을 전제한다는 측면에서 배너 교환보다는 좀 더 적극적인 방식

(2) 광고형 제휴
- 포털 입점형 제휴 : 네이버, 다음 등 포털 사이트의 특정 콘텐츠로 입점하는 것. 이 경우, 입점료가 발생하게 되며 이는 광고비와 거의 동일한 개념으로 볼 수 있음. 해당 비용에 대한 ROI 판단이 필수

- Affiliate Site 이용 : 제휴 마케팅 프로그램을 의미하며, 대표 업체로 아이라이크클릭이나, 링크프라이스 등이 있음. 주로 CPS (Cost Per Selling)조건으로 광고를 게재하게 되고, 이 광고는 Affiliate로 가입되어 있는 다양한 매체 사들에 추천되어, 해당 매체를 통해 들어온 방문자가 구매를 할 경우, 일정액의 수수료를 제휴 마케팅 회사에 납부하는 방식이다. 제휴라기보다는 광고의 한 형태로 보는 것이 좋다.

(3) 콘텐츠 제휴
- 콘텐츠 제휴 : 운세, 복권 등 구체 콘텐츠 간의 교환이 이루어지는 경우를 의미. 이 때, 단순히 콘텐츠만 교환하는 경우도 있고, 유료 콘텐츠를 교환하며 수수료 조건을 붙이는 경우도 있음. 콘텐츠 교환은 콘텐츠의 양이 부족한 전문 콘텐츠 사이트들에게 무척 유용하지만, 자사의 핵심 콘텐츠와 상관없는 콘텐츠를 게재하게 될 때는 오히려 역효과를 볼 수도 있음(고객이 전문 사이트를 방문하는 이유는 다양한 콘텐츠를 보기 위함이 아니고, 그 사이트에 고유한 콘텐츠를 보기 위해임)

- 포인트 교환 : 마일리지 프로그램이 있는 사이트의 경우, 누적된 마일리지로 상대방 사이트의 제품을 구매할 수 있도록 하는 것을 의미. 이를 통해 누적된 마일리지를 소진시킬 수 있고, 타사 마일리지를 이용함으로써, 결과적으로 판매 채널을 확장하는 효과가 있음.

(4) 프로모션 제휴
- 공동 홍보 : 이름이 알려지지 않은 중소규모 사이트의 경우, 보도자료 배포시 기사로 채택되기가 쉽지 않으며, 이 때 이해가 맞는 사이트들이 공동의 이슈를 만들어 보도 자료를 배포하곤 함. 여기에는 공동 이벤트 또는 프로모션에 대한 보도 자료도 포함되나, 궁극적으로는 공동조사에 근거한 보도자료 – 예컨대, 취업포털 사이트들의 기업 하반기 공채 계획 조사 등- 가능

- 프로모션 제휴 : 위에서 말한 꽃 배달 쇼핑몰의 경우가 대표적임. 대상 사이트 또는 커뮤니티 가입자의 니즈에 적합한 상품 또는 콘텐츠를 제공하고, 그에 대한 대가로 자사 사이트를 홍보하거나 구체적인 구매 프로모션을 진행하기도 함. 아이디어에 따라 상당히 효과적인 프로모션 진행 가능

이외에도 아주 다양한 제휴의 방식들이 나올 수 있다. 중요한 것은 제휴도 일반 콘텐츠 기획과 똑같이 아이디어 싸움이라는 것이다. 아이디어의 독특함에 따라 그 제휴 사업의 성패가 좌우될 수 있다.

그리고 이런 아이디어는 상대방 회사/고객의 니즈에 대한 통찰(Insight)을 통해 확보될 수 있으며, 이러한 통찰(Insight)은 자사의 이익에 대한 배타적 관점을 버릴 때, 보다 정확하게 찾아낼 수 있다. @
AND