Tag Archives: systems

Dedicating multiprocessors per OS structure

A few weeks ago something I’ve been thinking about for a while came back into my thoughts. What if instead of multithreading at the application level, we instead dedicate a chip of a multicore processor to a specific OS resource.

What kind of OS resource? I don’t know. Maybe four processors at ring zero, or at the IO subsystems. We could have application specific cores that are optimized for specific software tasks, just as the new graphic processors are used for APU.

I’m certainly not a system designer and the above is probably pure drivel. Like, how would context switching work and not slow everything down? However, there are possible reasons why perhaps its not.

  • Number of cores will keep growing.
  • GPUs will become more important and powerful.
  • Future applications will be distributed and require advanced resource handling, example, hierarchical robust device systems, like memory handling.
  • Thermal limitations will demand new forms of optimization.
  • AI and robotics applications will reach a tipping point and become ubiquitous, and even more performance will be demanded from computing systems

After thinking about this, I later started seeing articles on internet-on-a-chip, a new way of connecting multicores. Interesting.

Further reading

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Using Powershell instead of cygwin for scripting

In this blog entry, Windows Tricks For Whacking Lingering Java Processes …, the author resorts to the cygwin linux shell to automate an admin need.  Now cygwin is awesome, bringing some of the best tools from *nix.  However, with Powershell, Microsoft finally transformed the Windows command line into a powerful and usable administration resource.

Below a line from the bash script the author used to find each process given a process name and then loop thru each process ID and terminate it.   Note how the script requires a good understanding of bash scripting and in addition multiple Linux utilities  ps, grep, and sed.   The most important line in the script is:

found=` ps -aW | grep $procText |  sed -e's/^s*([0-9][0-9]*).*/1/' `
Here is how this works.
ps -aW:   show all processes and windows too.
grep $procText:   only use lines that contain the command line string
sed -e:   run stream editor inline
s///:   substitute
^s*:  all beginning white space
([0-9][0-9]*):  find two or more digits, remember these.
.*:  any characters.
/1/:  replace with the found digits

Very complex!!!! But, to *nix users this is nothing. Its even fun to do. With a Linux command line you can rule the world. Note that in the above script line, it’s just text processing.

Powershell has a different approach. In Powershell one works with objects (in the OOP sense). Thus, instead of transforming everything to text, one manipulates properties of objects. One pipes object instead of text.

To do:
Show how to do this in Powershell. Unfortunately, wrote the above a long time ago and lost what little Powershell mojo I was developing. Any help?

3/18/12: The powershell approach will probably be expanded from something like this, which just lists the processes by name and process ID:

$strComputer = "."

$colItems = get-wmiobject -class "Win32_Process" -namespace "rootCIMV2" `
-computername $strComputer

foreach ($objItem in $colItems) {
      write-host "Name: " $objItem.Name
      write-host "Process ID: " $objItem.ProcessId

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

State Machine discord as system error detection

It takes three subsystem state machines to create an error adaptive system.

This morning in the shower I was thinking about my last post on SCXML. What do you use as states in a system? Easy question, but then I thought, sure its internal states of a process, but how does the external “real” come into the picture, via guards? That could get messy in a very complex real world system. So, what if the external system is also modeled as a state machine?

Now we have two state machines, internal system and external system. What is the advantage? Well, each can have a peak into the other or using historical information, compute how the other works. Then if this prediction is not matched, it is an error. That is, if the internal machine is at state x and it knows that the external machine should be at state y at this point, and it is not, it is a system error. What to do?

This is where a third error machine would come into use. The function of this machine is to bring the other two into resonance, reduce the entropy, heat.

Depending on whether the machines are Mealy or Moore based, one would detect errors at particular points, events, transitions, or states.

I remember reading years ago about fault tolerant hardware systems. The minimum components was three; similar.

Hmmm. I don’t know what everything above really means, if anything. 🙂

Tangential subject: State machines, life cycles, etc:

For future thinking …

  • How does a FSM approach differ from a REST architecture.
    Building a RESTful Hypermedia Agent, Part 1
  • On the finite-state machine, a minimal model of mousetraps, ribosomes and the human soul“, Brian Hayes, Scientific American, 1983. Accessed November 6, 2011, at http://bit-player.org/bph-publications/SciAm-1983-12-Hayes-FSA.pdf
  • “Exception Handling Mechanism in Communicating Threads for Java”, Gerald. H. HILDERINK, Communicating Process Architectures 2005;
    Jan Broenink, Herman Roebbers, Johan Sunter, Peter Welch, and David Wood (Eds.), IOS Press, 2005
  • “Self-Healing in Modern Operating Systems”, Michael W. Shapiro, Sun Microsystems, QUEUE December/January 2004-2005.


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.