Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Fundamental Architecture Question: (7 Items)
   
Fundamental Architecture Question  
Starting to lay down the design of a system (single CPU, single application) that will basically have to do the 
following:
  communicate with "outside" world via radio data link
  communicate with "internal" pieces via RS-232
  manage messaging, data transformation, etc between the internal    pieces & outside world
  internal pieces subject to change (new hardware for instance)

One of the problems/issues I am having is that after digging thru the docs for the past 7 - 10 days; I am stiil not 
convinced that I understand the relationships between partitions, processes and threads. Seems as if partitions have 
processes which in turn have threads (or some combination thereof). For example, I want the external I/O to have its own
 time slice (partition) and address space (process) and within it have thread(s) sitting on the input ports and moving 
message data to/from another area (partition/process/thread(s)) which does the work. 
Does this make sense from a QNX 6.4 standpoint or am I missing something (or maybe a lot of somethings).
Thanks for any light you may be able to shed
Re: Fundamental Architecture Question  
Hello Andrew,
the relationships between processes and threads is well described here
http://www.qnx.com/developers/docs/6.4.0/neutrino/getting_started/about.html
Regards,
Yuriy
RE: Fundamental Architecture Question  
Thanks Yuriy, I have indeed read this (more than once actually); what I
did not see in there is how, or even if, processes/threads tie in with
adaptive partitions.

Cheers!
Andy

-----Original Message-----
From: Yuriy Synytskyy [mailto:community-noreply@qnx.com] 
Sent: Wednesday, March 25, 2009 12:27 PM
To: momenticsgs-community
Subject: Re: Fundamental Architecture Question

Hello Andrew,
the relationships between processes and threads is well described here
http://www.qnx.com/developers/docs/6.4.0/neutrino/getting_started/about.
html
Regards,
Yuriy


_______________________________________________
QNX Momentics Getting Started
http://community.qnx.com/sf/go/post25242
RE: Fundamental Architecture Question  
Hi Andrew,
Let me give you an example.  I have a target board with 3 partitions on it. One I use for drivers, one I use for a 
network file system and one used for qconn.  Each partition is setup to only use a specific amount of my CPU resources. 
 With in each partition I have started one or more processes to take care of a certain function.  Each process has 
threads with in it to do individual tasks.  The Adaptive Partition Scheduler will make sure no process(es) goes over the
 alloted CPU resource.

So real world example
My APS breakdown.  Three Partitions.  
        sched_aps NFS 15
        sched_aps QCONN 40
        sched_aps INETD 10

One of my processes assigned to a partition(network driver).
         [sched_aps=IONET] io-pkt-v4 -dsmc9000 ioport=0x04800000,irq=200 -p tcpip 

Threads within the process that are ultimately with in the partition
       3   1 roc/boot/io-pkt-v4  21r SIGWAITINFO                             
       3   2 roc/boot/io-pkt-v4  10r RECEIVE     1                           
       3   3 roc/boot/io-pkt-v4  22r RECEIVE     14                          
       3   4 roc/boot/io-pkt-v4  21r RECEIVE     15    

Time used by the threads will be "billed" to the partition.  The scheduler in turn will make sure your Process(and in 
turn your threads) do not use more time then you have given them.  Of course there is a lot more to Adaptive 
Partitioning when it comes to scheduling but this should give you a rough idea of how it works.

-Wade


-----Original Message-----
From: Andrew Page [mailto:community-noreply@qnx.com]
Sent: Wed 3/25/2009 3:50 PM
To: momenticsgs-community
Subject: RE: Fundamental Architecture Question
 
Thanks Yuriy, I have indeed read this (more than once actually); what I
did not see in there is how, or even if, processes/threads tie in with
adaptive partitions.

Cheers!
Andy

-----Original Message-----
From: Yuriy Synytskyy [mailto:community-noreply@qnx.com] 
Sent: Wednesday, March 25, 2009 12:27 PM
To: momenticsgs-community
Subject: Re: Fundamental Architecture Question

Hello Andrew,
the relationships between processes and threads is well described here
http://www.qnx.com/developers/docs/6.4.0/neutrino/getting_started/about.
html
Regards,
Yuriy


_______________________________________________
QNX Momentics Getting Started
http://community.qnx.com/sf/go/post25242


_______________________________________________
QNX Momentics Getting Started
http://community.qnx.com/sf/go/post25247


Attachment: Text winmail.dat 3.6 KB
Re: Fundamental Architecture Question  
But don't forget that io-pkt-v4 threads that receive from another thread will inherit the partition of the
client.

Processes don't belong to partitions, threads do, much like only threads have priorities.  A process does have
a priority value, but it's simply the original priority we requested that it was launched at - it may not
have any bearing on the real priority of any threads belonging to it.

Colin

Wade Hawkins wrote:
> Hi Andrew,
> Let me give you an example.  I have a target board with 3 partitions on 
> it. One I use for drivers, one I use for a network file system and one 
> used for qconn.  Each partition is setup to only use a specific amount 
> of my CPU resources.  With in each partition I have started one or more 
> processes to take care of a certain function.  Each process has threads 
> with in it to do individual tasks.  The Adaptive Partition Scheduler 
> will make sure no process(es) goes over the alloted CPU resource.
> 
> So real world example
> My APS breakdown.  Three Partitions. 
>         sched_aps NFS 15
>         sched_aps QCONN 40
>         sched_aps INETD 10
> 
> One of my processes assigned to a partition(network driver).
>          [sched_aps=IONET] io-pkt-v4 -dsmc9000 ioport=0x04800000,irq=200 
> -p tcpip
> 
> Threads within the process that are ultimately with in the partition
>        3   1 roc/boot/io-pkt-v4  21r SIGWAITINFO                            
>        3   2 roc/boot/io-pkt-v4  10r RECEIVE     1                          
>        3   3 roc/boot/io-pkt-v4  22r RECEIVE     14                         
>        3   4 roc/boot/io-pkt-v4  21r RECEIVE     15   
> 
> Time used by the threads will be "billed" to the partition.  The 
> scheduler in turn will make sure your Process(and in turn your threads) 
> do not use more time then you have given them.  Of course there is a lot 
> more to Adaptive Partitioning when it comes to scheduling but this 
> should give you a rough idea of how it works.
> 
> -Wade
> 
> 
> -----Original Message-----
> From: Andrew Page [mailto:community-noreply@qnx.com]
> Sent: Wed 3/25/2009 3:50 PM
> To: momenticsgs-community
> Subject: RE: Fundamental Architecture Question
> 
> Thanks Yuriy, I have indeed read this (more than once actually); what I
> did not see in there is how, or even if, processes/threads tie in with
> adaptive partitions.
> 
> Cheers!
> Andy
> 
> -----Original Message-----
> From: Yuriy Synytskyy [mailto:community-noreply@qnx.com]
> Sent: Wednesday, March 25, 2009 12:27 PM
> To: momenticsgs-community
> Subject: Re: Fundamental Architecture Question
> 
> Hello Andrew,
> the relationships between processes and threads is well described here
> http://www.qnx.com/developers/docs/6.4.0/neutrino/getting_started/about.
> html
> Regards,
> Yuriy
> 
> 
> _______________________________________________
> QNX Momentics Getting Started
> http://community.qnx.com/sf/go/post25242
> 
> 
> _______________________________________________
> QNX Momentics Getting Started
> http://community.qnx.com/sf/go/post25247
> 
> 
> 
> 
> _______________________________________________
> QNX Momentics Getting Started
> http://community.qnx.com/sf/go/post25256
> 

-- 
cburgess@qnx.com
RE: Fundamental Architecture Question  
Ah, this was what I was missing; that processes don't belong to
partitions. In my case, then could I have the one application aka
process (we will have a single node, no networking, single CPU) which I
can "distribute" over multiple partitions running multiple threads
within the partitions? However, if I chose I could put a network driver
(say, ethernet) in it own process putting its data into a shared memory
region and then have my app pick it up and do whatever?

Andy

-----Original Message-----
From: Colin Burgess [mailto:community-noreply@qnx.com] 
Sent: Wednesday, March 25, 2009 1:38 PM
To: momenticsgs-community
Subject: Re: Fundamental Architecture Question

But don't forget that io-pkt-v4 threads that receive from another thread
will inherit the partition of the client.

Processes don't belong to partitions, threads do, much like only threads
have priorities.  A process does have a priority value, but it's simply
the original priority we requested that it was launched at - it may not
have any bearing on the real priority of any threads belonging to it.

Colin

Wade Hawkins wrote:
> Hi Andrew,
> Let me give you an example.  I have a target board with 3 partitions 
> on it. One I use for drivers, one I use for a network file system and 
> one used for qconn.  Each partition is setup to only use a specific 
> amount of my CPU resources.  With in each partition I have started one

> or more processes to take care of a certain function.  Each process 
> has threads with in it to do individual tasks.  The Adaptive Partition

> Scheduler will make sure no process(es) goes over the alloted CPU
resource.
> 
> So real world example
> My APS breakdown.  Three Partitions. 
>         sched_aps NFS 15
>         sched_aps QCONN 40
>         sched_aps INETD 10
> 
> One of my processes assigned to a partition(network driver).
>          [sched_aps=IONET] io-pkt-v4 -dsmc9000 
> ioport=0x04800000,irq=200 -p tcpip
> 
> Threads within the process that are ultimately with in the partition
>        3   1 roc/boot/io-pkt-v4  21r SIGWAITINFO

>        3   2 roc/boot/io-pkt-v4  10r RECEIVE     1

>        3   3 roc/boot/io-pkt-v4  22r RECEIVE     14

>        3   4 roc/boot/io-pkt-v4  21r RECEIVE     15   
> 
> Time used by the threads will be "billed" to the partition.  The 
> scheduler in turn will make sure your Process(and in turn your 
> threads) do not use more time then you have given them.  Of course 
> there is a lot more to Adaptive Partitioning when it comes to 
> scheduling but this should give you a rough idea of how it works.
> 
> -Wade
> 
> 
> -----Original Message-----
> From: Andrew Page [mailto:community-noreply@qnx.com]
> Sent: Wed 3/25/2009 3:50 PM
> To: momenticsgs-community
> Subject: RE: Fundamental Architecture Question
> 
> Thanks Yuriy, I have indeed read this (more than once actually); what 
> I did not see in there is how, or even if, processes/threads tie in 
> with adaptive partitions.
> 
> Cheers!
> Andy
> 
> -----Original Message-----
> From: Yuriy Synytskyy [mailto:community-noreply@qnx.com]
> Sent: Wednesday, March 25, 2009 12:27 PM
> To: momenticsgs-community
> Subject: Re: Fundamental Architecture Question
> 
> Hello Andrew,
> the relationships between processes and threads is well described here

>
http://www.qnx.com/developers/docs/6.4.0/neutrino/getting_started/about.
> html
> Regards,
> Yuriy
> 
> 
> _______________________________________________
> QNX Momentics Getting Started
> http://community.qnx.com/sf/go/post25242
> 
> 
> _______________________________________________
> QNX Momentics Getting Started
> http://community.qnx.com/sf/go/post25247
> 
> 
> 
> 
>...
View Full Message
RE: Fundamental Architecture Question  
Thanks Wade, that clears up the "time" part. 

-----Original Message-----
From: Wade Hawkins [mailto:community-noreply@qnx.com] 
Sent: Wednesday, March 25, 2009 1:29 PM
To: momenticsgs-community
Subject: RE: Fundamental Architecture Question

Hi Andrew,
Let me give you an example.  I have a target board with 3 partitions on
it. One I use for drivers, one I use for a network file system and one
used for qconn.  Each partition is setup to only use a specific amount
of my CPU resources.  With in each partition I have started one or more
processes to take care of a certain function.  Each process has threads
with in it to do individual tasks.  The Adaptive Partition Scheduler
will make sure no process(es) goes over the alloted CPU resource.

So real world example
My APS breakdown.  Three Partitions.  
        sched_aps NFS 15
        sched_aps QCONN 40
        sched_aps INETD 10

One of my processes assigned to a partition(network driver).
         [sched_aps=IONET] io-pkt-v4 -dsmc9000 ioport=0x04800000,irq=200
-p tcpip 

Threads within the process that are ultimately with in the partition
       3   1 roc/boot/io-pkt-v4  21r SIGWAITINFO

       3   2 roc/boot/io-pkt-v4  10r RECEIVE     1

       3   3 roc/boot/io-pkt-v4  22r RECEIVE     14

       3   4 roc/boot/io-pkt-v4  21r RECEIVE     15    

Time used by the threads will be "billed" to the partition.  The
scheduler in turn will make sure your Process(and in turn your threads)
do not use more time then you have given them.  Of course there is a lot
more to Adaptive Partitioning when it comes to scheduling but this
should give you a rough idea of how it works.

-Wade


-----Original Message-----
From: Andrew Page [mailto:community-noreply@qnx.com]
Sent: Wed 3/25/2009 3:50 PM
To: momenticsgs-community
Subject: RE: Fundamental Architecture Question
 
Thanks Yuriy, I have indeed read this (more than once actually); what I
did not see in there is how, or even if, processes/threads tie in with
adaptive partitions.

Cheers!
Andy

-----Original Message-----
From: Yuriy Synytskyy [mailto:community-noreply@qnx.com]
Sent: Wednesday, March 25, 2009 12:27 PM
To: momenticsgs-community
Subject: Re: Fundamental Architecture Question

Hello Andrew,
the relationships between processes and threads is well described here
http://www.qnx.com/developers/docs/6.4.0/neutrino/getting_started/about.
html
Regards,
Yuriy


_______________________________________________
QNX Momentics Getting Started
http://community.qnx.com/sf/go/post25242


_______________________________________________
QNX Momentics Getting Started
http://community.qnx.com/sf/go/post25247




_______________________________________________
QNX Momentics Getting Started
http://community.qnx.com/sf/go/post25256