Show
Ignore:
Timestamp:
01/15/2010 08:21:06 (7 months ago)
Author:
herwigb
Message:

Update Samba 3.3 to 3.3.10 (docs)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/docs/htmldocs/Samba3-Developers-Guide/architecture.html

    r218 r368  
    1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 3. Samba Architecture</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt02.html" title="Part II. Samba Basics"><link rel="prev" href="pt02.html" title="Part II. Samba Basics"><link rel="next" href="debug.html" title="Chapter 4. The samba DEBUG system"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Samba Architecture</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt02.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="debug.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="architecture"></a>Chapter 3. Samba Architecture</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Dan</span> <span class="surname">Shearer</span></h3></div></div><div><p class="pubdate"> November 1997</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="architecture.html#id2556708">Introduction</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556751">Multithreading and Samba</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556783">Threading smbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556844">Threading nmbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556889">nbmd Design</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556708"></a>Introduction</h2></div></div></div><p> 
     1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 3. Samba Architecture</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt02.html" title="Part II. Samba Basics"><link rel="prev" href="pt02.html" title="Part II. Samba Basics"><link rel="next" href="debug.html" title="Chapter 4. The samba DEBUG system"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Samba Architecture</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt02.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="debug.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 3. Samba Architecture"><div class="titlepage"><div><div><h2 class="title"><a name="architecture"></a>Chapter 3. Samba Architecture</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Dan</span> <span class="surname">Shearer</span></h3></div></div><div><p class="pubdate"> November 1997</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="architecture.html#id2562765">Introduction</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562808">Multithreading and Samba</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562839">Threading smbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562900">Threading nmbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562945">nbmd Design</a></span></dt></dl></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562765"></a>Introduction</h2></div></div></div><p> 
    22This document gives a general overview of how Samba works 
    33internally. The Samba Team has tried to come up with a model which is 
     
    77</p><p> 
    88It also tries to answer some of the frequently asked questions such as: 
    9 </p><div class="orderedlist"><ol type="1"><li><p> 
     9</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> 
    1010        Is Samba secure when running on Unix? The xyz platform? 
    1111        What about the root priveliges issue? 
    12 </p></li><li><p>Pros and cons of multithreading in various parts of Samba</p></li><li><p>Why not have a separate process for name resolution, WINS, and browsing?</p></li></ol></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556751"></a>Multithreading and Samba</h2></div></div></div><p> 
     12</p></li><li class="listitem"><p>Pros and cons of multithreading in various parts of Samba</p></li><li class="listitem"><p>Why not have a separate process for name resolution, WINS, and browsing?</p></li></ol></div></div><div class="sect1" title="Multithreading and Samba"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562808"></a>Multithreading and Samba</h2></div></div></div><p> 
    1313People sometimes tout threads as a uniformly good thing. They are very 
    1414nice in their place but are quite inappropriate for smbd. nmbd is 
     
    2727that we use a separate process for each connection is one of Samba's 
    2828biggest advantages. 
    29 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556783"></a>Threading smbd</h2></div></div></div><p> 
     29</p></div><div class="sect1" title="Threading smbd"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562839"></a>Threading smbd</h2></div></div></div><p> 
    3030A few problems that would arise from a threaded smbd are: 
    31 </p><div class="orderedlist"><ol type="1"><li><p> 
     31</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> 
    3232        It's not only to create threads instead of processes, but you 
    3333        must care about all variables if they have to be thread specific 
    3434        (currently they would be global). 
    35 </p></li><li><p> 
     35</p></li><li class="listitem"><p> 
    3636        if one thread dies (eg. a seg fault) then all threads die. We can 
    3737        immediately throw robustness out the window. 
    38 </p></li><li><p> 
     38</p></li><li class="listitem"><p> 
    3939        many of the system calls we make are blocking. Non-blocking 
    4040        equivalents of many calls are either not available or are awkward (and 
     
    4242        waiting. Imagine if one share is a slow NFS filesystem and the others  
    4343        are fast, we will end up slowing all clients to the speed of NFS. 
    44 </p></li><li><p> 
     44</p></li><li class="listitem"><p> 
    4545        you can't run as a different uid in different threads. This means 
    4646        we would have to switch uid/gid on _every_ SMB packet. It would be 
    4747        horrendously slow. 
    48 </p></li><li><p> 
     48</p></li><li class="listitem"><p> 
    4949        the per process file descriptor limit would mean that we could only 
    5050        support a limited number of clients. 
    51 </p></li><li><p> 
     51</p></li><li class="listitem"><p> 
    5252        we couldn't use the system locking calls as the locking context of 
    5353        fcntl() is a process, not a thread. 
    54 </p></li></ol></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556844"></a>Threading nmbd</h2></div></div></div><p> 
     54</p></li></ol></div></div><div class="sect1" title="Threading nmbd"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562900"></a>Threading nmbd</h2></div></div></div><p> 
    5555This would be ideal, but gets sunk by portability requirements. 
    5656</p><p> 
     
    7979complex structures) between the processes. We can't rely on each 
    8080platform having a shared memory system. 
    81 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556889"></a>nbmd Design</h2></div></div></div><p> 
     81</p></div><div class="sect1" title="nbmd Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562945"></a>nbmd Design</h2></div></div></div><p> 
    8282Originally Andrew used recursion to simulate a multi-threaded 
    8383environment, which use the stack enormously and made for really