Thread vs. Multithreaded CPU, NPU, ...:     Last updated on 2011     3     19, a full moon day;


Before developing a 128bit systems, calculating throughput bandwidths with or without thread-switch instruction in 32bit platforms, or in 64bit platforms, in 128bit platforms, ... ;


1st to understand time slices of scheduling,

2nd to understand threads to be scheduled,

3rd to understand those scheduled threads communicate each others,

4th to understand conditional variables and mutexes acting like semaphores "flagging behavior" ,

5th to understand multithreaded multiple processes by multithreading AND avoiding deadlock, and then do research on concurrency, concurrent applications, concurrent programming, ... ;


Thread Concept in Java;   Also see: System.Threading in MSDN;




In Java:

class XYZthread  extends Thread { …                 

Note: Thread is super-class; XYZthread is sub-class; XYZthread is derived from the Thread class.

☺   XYZthread  NewlyCreatedThread  =  new   XYZthread( );

♥    NewlyCreatedThread.start( ) ; 

♫    Public void run( ) {  …  is a method


public boolean isInterrupted( )

public ClassLoader getContextClassLoader( )

public final boolean isDaemon( )

public final int getPriority( )

public final native boolean isAlive( )

public final String getName( )

public final synchronized void join(long  milliSeconds)

public final synchronized void join(long  milliSeconds, int  nanoSeconds)

public final synchronized void stop(Throwable  object)

For further information: Throwable class’s hierarchy in Java

public final ThreadGroup getThreadGroup( )

public final void checkAccess( )

public final void join( )

public final void resume( )

public final void setDaemon(boolean  onORoff)

public final void setName(String  nameInString)

public final void setPriority(int  newPriorityNumber)

public final void stop( )

public final void suspend( )

public native int countStackFrames( )

public static boolean interrupted( )

public static int activeCount( )

public static int enumerate(Thread  threadArray)

public static native Thread currentThread( )

public static native void sleep(long  milliSeconds)                          

public static native void yield( )                                                      

public static void dumpStack( )

public static void sleep(long  milliSeconds, int  nanoSeconds)

public String toString( )

public synchronized native void start( )

public void destroy( )

public void interrupt( )

public void run( )

public void setContextClassLoader(ClassLoader  className)




Notice that there is no WAIT state at above diagram, however Sun provides sleep() and yield() in static; If multithreaded CPU provides thread-switch instruction explicitly, how to solve N numbers of threads?


Assuming in NPU design(high-end), if each packet-engine processes 1 thread for kernel, 4 threads for handling packets, and then thread control methods should or should not contain WAIT state ?


Motorola C-5, Sitera Packet Engines contains automatic-switch, whenever a XYZthread WAITs for memory; How to optimize a hardware-oriented compiler to enhance computing-bandwidth?


In OSI Layer 1, duplicating of 32bit registers, or 64bit registers, or ... provides more threads for multithreaded CPU, NPU, ..., for enhancing processing-speed; In OSI Layer 3, packet engines avoid "packet-data of thread" waiting for memory; In OSI Layer 5, application's sessions are populating; For, system experts only, calculate a throughput gain if OSI Layer 1 is changed from 32bit register to 64bit registers while at the same OSI Layer 3~5 at the same memory bandwidth. Calculate a throughput gain if OSI Layer 1 is changed from X-numbers of threads to Y-numbers of threads, but use of the same registers while at the same OSI Layer 3~5 at the same memory bandwidth.


Note for systems novices:

Before developing threads, multiplexing  must be understood. Before developing pipelining, threading and multiplexing must be understood. After understanding multiplexing, pipelining, and threading, hybrids-systems such as GaAs with SiO2-CMOS must be understood, and then advance optical computing, bio-bonds computing, and ...; Once hardware can be overviewed, software becomes a little bit easier ... because most algorithms have been micro-coded and embedded already.