home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.ai.fuzzy      Fuzzy logic... all warm and fuzzy-like      1,275 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 584 of 1,275   
   Maxim S. Shatskih to All   
   Re: Fuzzy Logic Operating Systems   
   20 Feb 06 15:20:22   
   
   XPost: alt.os.development   
   From: maxim@storagecraft.com   
      
       About Ada. The "widespread" of Ada in real-world software business proves   
   my position and not yours :-)   
      
   > Safety. You need a helper object to ensure freeing the resource [in the   
   > destructor.] Though this still wouldn't prevent deadlocks. Because just two   
   > mutexes can create a deadlock.   
      
   So what? Just don't do the stupid errors :)   
      
   > Mutex is too low-level. Problems are: deadlocks and priority inversion.   
      
   Once again - don't do stupid things. Priority inversion (and starvations   
   similar to it) is a real-world problem which immediately arises when 2 threads   
   of different priority use the same mutex. The developer must know this.   
      
   For deadlocks - once again, don't do stupid things, and use the mutexes with   
   deadlock detection (easy to develop yourself).   
      
   >In   
   > general, mutexes aren't composable. That means: put together two safe,   
   > tested pieces of code, and you won't be able to say anything useful about   
   > the combination.   
      
   Most inter-module calls are done with no mutexes held. This is a must. This is   
   a default - you must not do any, say, API calls with mutexes held. You must not   
   do callbacks to upper layers while you have any mutexes held. If the things are   
   otherwise and this is allowed - then this must be documented.   
      
   The above approach is enough to write the OS kernel, I can assure you, knowing   
   Windows well and knowing Linux too.   
      
   >With functional-only decomposition it becomes a disaster,   
   > because the callee does not know mutexes held along the path.   
      
   Correct, the APIs must be called without any mutexes held, unless stated   
   otherwise.   
      
   Anyway holding a mutex for a long time and around the long operation is evil,   
   since it is not scalable.   
      
   > The problem isn't to be able to write something, after all, almost every   
   > language is Turing-complete. The problem is to manage complexity.   
      
   Language-embedded features are the poor way to manage complexity. They provide   
   only the illusion of "management", while in reality the complexity is just   
   pushed somewhere down, and will manifest itself is some very unconvinient way   
   sooner or later, the way which can be solved on low-level and cannot be solved   
   on higher levels like the language constructs.   
      
   > C++ is a bad language, especially because of its types system.   
      
   Very strong type system. Is this bad?   
      
   > The core   
   > problem that there is no distinction between types and classes. As the   
   > result:   
   >   
   > 1. Small value objects cannot have classes (int)   
      
   Why is this bad? C++ classes are _structure types only_. If you need int as a   
   class (for what?) - write your own "class Int", it's trivial.   
      
   > 2. Multiple dispatch cannot be implemented   
      
   What is "multiple dispatch" and what real-world, practical advantages will it   
   provide?   
      
   > 3. Multiple inheritance requires lots of vtab pointers   
      
   Can you imagine the better (in this term of memory load by auxuliary   
   structures) implementation of multiple inheritance then in C++?   
      
   > 4. Construction model is unsound (no dispatch in c/dtors)   
      
   C++ suggests all dtors to be virtual for all classes which have at least 1   
   virtual method. So, the problem is solved.   
      
   > > Linux is safe, distributed, portable, scalable, real-time (with extensions)   
   > > system,   
   >   
   > Where is a smiley? That's a joke, wasn't it?   
      
   No, this is a real-world truth. The major OSes and platforms used everywhere   
   are written in C or sometimes (and some parts) C++. While Ada and others remain   
   the exotic toy of fans.   
      
   --   
   Maxim Shatskih, Windows DDK MVP   
   StorageCraft Corporation   
   maxim@storagecraft.com   
   http://www.storagecraft.com   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca