Changes between Version 23 and Version 24 of almosOnTsarDoc


Ignore:
Timestamp:
Aug 21, 2012, 10:17:00 PM (13 years ago)
Author:
almaless
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • almosOnTsarDoc

    v23 v24  
    2222== Compatibility ==
    2323
    24 The distribution package contains some binary executables (e.g. GCC cross-compiler, TSAR simulator). These programs can run on a Linux based distribution. They were tested on Ubuntu 10.04/12.04 and on Scientific Linux 6.2. Both 64 and 32 bits host machines are supported.   
     24The distribution package contains some binary executables (e.g. GCC cross-compiler, TSAR simulator). These programs can run on a Linux based distribution. They were tested on Ubuntu 10.04/12.04 and on Scientific Linux 6.2. Both of 64 and 32 bits host machines are supported.   
    2525
    2626== Setup ==
     
    3636== Start the simulation ==
    3737
    38 Before '''any use''' of the distribution package you need to set some environment variables:
     38Before '''''any use''''' of the distribution package you need to set some environment variables:
    3939
    4040{{{
     
    4343}}}
    4444
    45 '''Note''': by default you have to source this file from its local directory: that is, you have to be in the ''DISTRIB'' directory.
     45'''Note''': by default you have to source this file from its local directory: that is, you have to be in the ''DISTRIB'' directory before typing the ''source'' command.
    4646
    4747Now, lets go to ''DISTRIB/test/pf1'' and run ''make sim1'':
     
    5656That is it ... you are done !!
    5757
    58 The tty0 and tty3 are reserved for the kernel trace and information messages. For a user application, the tty1 represent the stdin and stdout while the tty2 represent the stderr.
    59 
    60 ''Sim1'' rule means the simulator of TSAR is configured to one cluster: that is, 4 cores. Using ''sim4'', ''sim16'', ''sim64'' or ''sim128'' lets you start the simulator with (respectively) 4, 16, 64 or 128 clusters of 4 cores each.
     58The tty0 and tty3 are reserved for the kernel logs. For a user application, the tty1 represent the stdin and stdout while the tty2 represent the stderr.
     59
     60''Sim1'' rule means the simulator of TSAR is configured to one cluster: that is, 4 cores. Using ''sim4'', ''sim16'', ''sim64'' or ''sim128'' lets you start the simulator with (respectively) 4, 16, 64 or 128 clusters of 4 cores each. The frame-buffer is only present when using the ''sim1'' rule. For the other supported rules, the frame-buffer is absent.
    6161
    6262'''Note''': although the hardware configuration can be changed at each simulation, there is no need to recompile or regenerate the kernel. The kernel of ALMOS detects the hardware resources at each boot. A user application can get the number of online cores using the standard ''sysconf()'' call (man sysconf).   
     
    7373The ''kernel-soclib.bin'' file is the ALMOS kernel while the ''bootloader.bin'' file is the ALMOS boot-loader for TSAR. The ''arch-info.bin'' file contains the description of the TSAR hardware resources. This file is regenerated (copied from ''DISTRIB/test/arch-bins'') at each ''make simN'' command.
    7474
    75 You can take a look to ''DISTRIB/test/pf1/Makefile''. This file lets you customize some parameters like the used ALMOS kernel revision and the number of simulator threads. If you want to run simultaneously several configurations, lets say 4, you can create 3 additional ''DISTRIB/test/pf![2-4]'' directories each of which with its own customized Makefile. Than in each of these ''pf'' directories you can type your ''make simN'' command.
    76 
    77 '''Note''': by default, the location from where the corresponding kernel revision is looked for is ''DISTRIB/test/kern-bins''. The number of simulator's threads should not exceed the number of the physical CPUs (not the logical one) of your host machine. Finally, the hdd-imge.bin is a symbolic link to ''DISTRIB/test/misc/hdd-img.bin'' so be careful to provide an ''hdd-img.bin'' regular file per ''pf'' directory when you run simultaneously a multiple instances of the simulator.
     75You can take a look to ''DISTRIB/test/pf1/Makefile''. This file lets you customize some parameters like the used ALMOS kernel revision and the number of simulator threads. If you want to run simultaneously several configurations, lets say 4, you can create 3 additional ''DISTRIB/test/pf![2-4]'' directories each with its own customized Makefile. Than in each of these ''pfX'' directories you can type your ''make simN'' command.
     76
     77'''Note''': by default, the location from where the corresponding kernel revision is looked for is ''DISTRIB/test/kern-bins''. The number of simulator's threads should not exceed the number of the physical CPUs (not the logical one) of your host machine. Finally, the ''hdd-imge.bin'' is a symbolic link to ''DISTRIB/test/misc/hdd-img.bin'' so be careful to provide an ''hdd-img.bin'' regular file per ''pfX'' directory when you run simultaneously a multiple instances of the simulator.
    7878
    7979== Your first application ==
     
    8383 1. Write your application
    8484 2. Cross-compile it using ALMOS headers and libraries
    85  3. Install it on the hdd-img.bin file system image
     85 3. Install it on the ''hdd-img.bin'' file system image
    8686 4. Go to your ''DISTRIB/test/pfX'' directory and run the TSAR simulator
    8787 
    88 Some example of applications source code can be found in ''DISTRIB/apps''. Lets try the ''hello_world'' one. The ''main()'' function of this application asks the system for the number of online cores (''count'') and then it fires ''count'' threads before it synchronizes on their end. Each fired thread executes the ''thread_func()'' function which prints a "Hello World" message.
     88Some examples of applications source-code can be found in ''DISTRIB/apps''. Lets try the ''hello_world'' one. The ''main()'' function of this application asks the system for the number of online cores (''count'') and then it fires ''count'' threads before it synchronizes on their termination. Each fired thread executes the ''thread_func()'' function which prints a "Hello World" message.
    8989
    9090To Cross-compile the application using ALMOS headers and static libraries:
     
    110110}}}
    111111
    112 Wait until you get a prompt on the ''tty1'' console, then type:
     112Wait until you get a prompt in the tty1 console, then type:
    113113
    114114{{{
     
    116116}}}
    117117
    118 The contents of ''/bin'' directory will be listed and the ''hello'' program must figure in the list. To run ''/bin/hello'' program, type the following command on the ''tty1'' console:
     118The contents of ''/bin'' directory will be listed and the ''hello'' program must figure in the list. To run ''/bin/hello'' program, type the following command in the tty1 console:
    119119
    120120{{{