Re: l4/sys/syscalls.h: No such file or directory

2014-09-18 Thread Valentin Hauner
Hi, On 09/17/2014 04:31 PM, Björn Döbel wrote: In the end means, that your stack mapping did not succeed as intended. OK, that helped. Indeed, some of the arguments concerning the size of the area to map were wrong. Now, there is no page fault on the stack any more. Then, I got the following

Re: l4/sys/syscalls.h: No such file or directory

2014-09-18 Thread Valentin Hauner
Hi, the infinite sleep did it, no page faults any more. Thanks! :) On 09/18/2014 09:29 AM, Björn Döbel wrote: Did you see the printf() output before? No, that's the only problem I'm struggling with at the moment. There's no error message or the like, but the output does simply not appear.

Re: l4/sys/syscalls.h: No such file or directory

2014-09-17 Thread Valentin Hauner
Hi, On 09/17/2014 08:02 AM, Björn Döbel wrote: How is thread_stack declared? It's declared on line 21 in lib/src/edft.c: l4_umword_t *thread_stack[THREAD_MAX_NUM]; Currently, THREAD_MAX_NUM is set to 20. What call are you using to map the actual stack to the task? I thought that the

Re: l4/sys/syscalls.h: No such file or directory

2014-09-17 Thread Valentin Hauner
Hi, On 09/17/2014 10:23 AM, Björn Döbel wrote: An fpage() wants an address and a size. Your malloc() call yields an address (note: this is probably unaligned, maybe prefer to use posix_memalign()), the size is what you pass to malloc(). What would be the problem? Still the same problem,

Re: l4/sys/syscalls.h: No such file or directory

2014-09-17 Thread Valentin Hauner
Hi, was the alignment correct? On 09/17/2014 02:53 PM, Björn Döbel wrote: * What is thread_stacks[thread.id]? It's the stack of that thread organized in an array, as suggested by Adam. The stack is prefilled with data: thread_stacks[count][THREAD_STACK_SIZE - 1] =

Re: l4/sys/syscalls.h: No such file or directory

2014-09-17 Thread Valentin Hauner
Hi, thanks again for your reply! On 09/17/2014 03:47 PM, Björn Döbel wrote: I don't know as you didn't tell us about the return value you got from malloc/memalign. It was 0, so no error. I was enquiring about the actual value. Yes, but what IS this value, numerically? Values in

Re: l4/sys/syscalls.h: No such file or directory

2014-09-16 Thread Valentin Hauner
Hi, On 09/16/2014 12:04 AM, Adam Lackorzynski wrote: Are there any entries? Yes, there are produced more than thousand identical entries in less than a second: pf: 0026 pfa=4f3c ip=01000200 (w-) spc=0xfcffae94 err=6 '26' is the id of the thread that is waiting for '1b'. On

Re: l4/sys/syscalls.h: No such file or directory

2014-09-16 Thread Valentin Hauner
Hi, thanks again for your quick reply! On 09/16/2014 01:21 PM, Björn Döbel wrote: * What is this instruction? * What address is this? It does not seem to be part of the binary as it is far off the instruction address. * Does this page fault appear in your pager? (It should?) * What are

Re: l4/sys/syscalls.h: No such file or directory

2014-09-16 Thread Valentin Hauner
Hi, thanks, I've used addr2line and found out that it was the head of thread_func (l. 27 in examples/libedft-example/main.c). So it seems that the stack I'm using for passing arguments to the thread function is the problem. As I am creating a dynamic number of threads, it does not make sense for

Re: l4/sys/syscalls.h: No such file or directory

2014-09-16 Thread Valentin Hauner
Hi, On 09/16/2014 03:54 PM, Björn Döbel wrote: Just to be sure: How large is this per-thread stack? Are you properly aligning it to page boundaries? Adam suggested to give it a size of 2000 * l4_umword_t (THREAD_STACK_SIZE is set to 2000) in his mail from September 3th, so I'm using the

Re: l4/sys/syscalls.h: No such file or directory

2014-09-15 Thread Valentin Hauner
Hi, On 09/15/2014 12:10 AM, Adam Lackorzynski wrote: l4_fpage(i, L4_LOG2_PAGESIZE, L4_FPAGE_RWX), A size needs to be specified for the fpage. And read-only will not be enough, as for example, the stack needs to be written by the thread functions.

Re: l4/sys/syscalls.h: No such file or directory

2014-09-13 Thread Valentin Hauner
Hi, On 09/11/2014 02:13 PM, Valentin Hauner wrote: What does everything from _stext to _end mean? OK, I've found a snippet in Moe that seems to fit: It's located in ./l4/pkg/moe/server/src/main.cc lines 523 f. I've adapted it to fit my needs, but the issue is still the same: extern char

Re: l4/sys/syscalls.h: No such file or directory

2014-09-11 Thread Valentin Hauner
Hi, On 09/10/2014 09:34 PM, Björn Döbel wrote: Are you looking for examples on using the l4_task_map() system call? No, I'm already using l4_task_map. But Adam suggested to map everything from _stext L4_PAGEMASK to _end L4_PAGEMASK to all tasks, but I don't know how to realize this. What

Re: l4/sys/syscalls.h: No such file or directory

2014-09-10 Thread Valentin Hauner
Hi, On 09/08/2014 12:17 AM, Adam Lackorzynski wrote: Your threads page-fault all around. The reason is that I was slightly wrong with my last statement on paging. The pager of the parent task resolves the page-fault however just maps the memory locally to the parent task, so the memory never

Re: l4/sys/syscalls.h: No such file or directory

2014-09-05 Thread Valentin Hauner
Hi, On 09/05/2014 12:28 AM, Adam Lackorzynski wrote: Does it work with the default scheduler? No, it does not work with the default Fixed_prio scheduler. Tasks are created properly and my threads are assigned to them. But after that, nothing happens. Instead, one of the created threads (thread0

Re: Passing data to a thread

2014-09-03 Thread Valentin Hauner
Hi, On 09/03/2014 12:45 AM, Adam Lackorzynski wrote: For that we need to know the calling convention of functions. For x86-32, the arguments are passed via the stack. So you'd do it like this: l4_umword_t stack[2000]; stack[1999] = (l4_umword_t)my_data; stack[1998] = 0; And use

Re: l4/sys/syscalls.h: No such file or directory

2014-09-03 Thread Valentin Hauner
Hi, On 09/03/2014 12:32 AM, Adam Lackorzynski wrote: And indeed, you need to map the cap to the new task. l4_task_map(task_cap, L4RE_THIS_TASK_CAP, l4_obj_fpage(l4re_env()-rm, 0, L4_FPAGE_RO), l4_map_obj_control(l4re_env()-rm, L4_MAP_ITEM_MAP)); Thanks, that works, there's no more kernel

Re: l4/sys/syscalls.h: No such file or directory

2014-09-02 Thread Valentin Hauner
Hi, On 09/02/2014 12:27 AM, Adam Lackorzynski wrote: Most use the C++ interface, so looking for 'create_task' is better. Why not use ned for creating tasks? My whole EDF library is written in C now, so switching to C++ or Lua makes it very uncomfortable for me. On 09/02/2014 12:27 AM, Adam

Passing data to a thread

2014-09-02 Thread Valentin Hauner
Hi, I'm trying to pass some data to a newly created thread. Since l4_thread_ex_regs only accepts an instruction pointer, but no data pointer, it seems impossible to me to use a parameterized function such as: thread1_func(void *data) { /* Read the data ... */ } So far, my efforts are: 1. I've

Re: l4/sys/syscalls.h: No such file or directory

2014-09-01 Thread Valentin Hauner
a small working example for creating new tasks? Basically, I want to create a new task for each thread demanded by my end users. So the number of tasks and threads to create is variable. Thanks! Best regards, Valentin Hauner ___ l4-hackers mailing list l4

Re: l4/sys/syscalls.h: No such file or directory

2014-08-28 Thread Valentin Hauner
Hi, On 08/24/2014 11:27 PM, Adam Lackorzynski wrote: I suggest that you first make sure you program behaves like it should with the default scheduler, and only then change over to your scheduler. Thanks, that's a good idea. Is there a simple way to set the name of the threads displayed in the

Re: l4/sys/syscalls.h: No such file or directory

2014-08-23 Thread Valentin Hauner
* * This example shows how threads owning a deadline are created for the EDF scheduler. * It's adapted from the utcb-ipc example by Adam Lackorzynski, Alexander Warg and Björn Döbel. */ /* * * (c) 2014 Valentin Hauner v...@hnr.name * * This file is distributed under the terms of the * GNU

Re: l4/sys/syscalls.h: No such file or directory

2014-08-21 Thread Valentin Hauner
* * This example shows how threads owning a deadline are created for the EDF scheduler. * It's adapted from the utcb-ipc example by Adam Lackorzynski, Alexander Warg and Björn Döbel. */ /* * * (c) 2014 Valentin Hauner v...@hnr.name * * This file is distributed under the terms of the * GNU

Re: l4/sys/syscalls.h: No such file or directory

2014-08-20 Thread Valentin Hauner
Hi, On 08/19/2014 02:55 PM, Björn Döbel wrote: 2) Use Fiasco's thread primitives. For examples using this, you might want to grep for l4_thread_control in pkg/examples. There are a couple of examples using this. That worked, I used ex_utcb_ipc as a basis (located in

l4/sys/syscalls.h: No such file or directory

2014-08-19 Thread Valentin Hauner
Hi, I'm using the following example provided by Michael Hohmuth in 2000 to create new tasks and threads: http://os.inf.tu-dresden.de/pipermail/l4-hackers/2000/000384.html I've placed the code in a copy of the hello example, but added REQUIRES_LIBS = l4sys to the Makefile. The directory

Re: Adding a new scheduling algorithm to Fiasco.OC

2014-08-15 Thread Valentin Hauner
Hi, On 08/14/2014 11:22 PM, Adam Lackorzynski wrote: 3a is one of the hello threads. The thread waits for itself, with a one second timeout (that's the 1s), so basically it does a sleep(1). You were right. My hello application was printing Hello World ten times, with a sleep after each

Accessing dbg_info()-dbg_id() for threads in ready queue class

2014-08-13 Thread Valentin Hauner
Hi, how can I access the identificator used in JDB's thread list in the enqueue method of my ready queue class? Following code snippet does not work: include thread.h [...] Ready_queue_edfE::enqueue(E *i, bool) { printf(%d, static_castThread*(i-context())-dbg_info()-dbg_id()); } It results

Re: Adding a new scheduling algorithm to Fiasco.OC

2014-08-13 Thread Valentin Hauner
Hi, thanks, that makes things much clearer to me. On 08/13/2014 10:23 PM, Adam Lackorzynski wrote: The assertion says that when starting an IPC, none of the IPC-related thread state flags must be enabled. Print state() before the assertion to know which one and get some more info. Before

Re: Adding a new scheduling algorithm to Fiasco.OC

2014-08-12 Thread Valentin Hauner
Hi, On 08/11/2014 11:35 PM, Adam Lackorzynski wrote: I'd assume that the ready queue also has moe because moe should be ready. Wouldn't, with a requeue, sigma0 moved behind moe now (next deadline of sigma0 is further away)? On the other side, sigma0 is not done with that single message, so it

Re: Adding a new scheduling algorithm to Fiasco.OC

2014-08-07 Thread Valentin Hauner
= { }, log = { hello1, blue } }, rom/hello1); l:start({ caps = { }, log = { hello2, green } }, rom/hello2); Where can I pass my deadlines here? Thanks again for your support! Best regards, Valentin Hauner ___ l4

Re: Adding a new scheduling algorithm to Fiasco.OC

2014-08-01 Thread Valentin Hauner
Hi, On 06/13/2014 10:01 PM, Adam Lackorzynski wrote: You should look at the wfq files as those already implement an algorithm that is quite close to EDF I've found out that Weighted Fair Queuing is used for scheduling network data packets. However, no source I've read through mentions a

Re: Adding a new scheduling algorithm to Fiasco.OC

2014-06-30 Thread Valentin Hauner
in advance! Best regards, Valentin On 06/13/2014 10:01 PM, Adam Lackorzynski wrote: Hi, On Thu Jun 12, 2014 at 16:29:43 +0200, Valentin Hauner wrote: I'm planning to add a new scheduling algorithm to Fiasco.OC. I will implement EDF. First of all, is there some handout written by you main

Adding a new scheduling algorithm to Fiasco.OC

2014-06-12 Thread Valentin Hauner
Hi, I'm planning to add a new scheduling algorithm to Fiasco.OC. I will implement EDF. First of all, is there some handout written by you main developers that copes with the issues of implementing EDF in Fiasco.OC? What I've achieved so far: I've created the files sched_context-edf.cpp and

Documentation of Sched_context

2014-05-30 Thread Valentin Hauner
any information about these. Best regards, Valentin Hauner ___ l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Re: Doing simple I/O in clntsrv example

2014-05-22 Thread Valentin Hauner
Does anyone have an idea? I need to get it to work until next Monday. Here, a similar problem is discussed, but no solution was found then: http://os.inf.tu-dresden.de/pipermail/l4-hackers/2014/006323.html Best regards, Valentin On 05/20/2014 11:11 AM, Valentin Hauner wrote: On 05/19/2014 08

Doing simple I/O in clntsrv example

2014-05-20 Thread Valentin Hauner
On 05/19/2014 08:00 PM, Marcus Hähnel wrote: Do 'svn up libc_be_stdin' in the pkg/ directory. Then build the new package and you can link against it. Thanks, compiling and linking works fine now. But when running the application with qemu (either directly via 'make qemu E=...

Doing simple I/O in clntsrv example

2014-05-19 Thread Valentin Hauner
Hi Marcus, thanks for your reply! On 05/17/2014 05:47 PM, Marcus Hähnel wrote: Do not forget to also link against libc_be_file_stdin (in the same way as above) if you want to have keyboard interactions. Adding libstdc++ to REQUIRES_LIBS works like a charm, but adding libc_be_file_stdin gives

Doing simple I/O in clntsrv example

2014-05-17 Thread Valentin Hauner
Hi! I'm having some trouble with doing simple I/O actions in the clntsrv example (/src/l4/pkg/examples/clntsrv). I want the client to enter minuend and subtrahend himself, so I've added the following code to client.cc: printf(Please enter minuend and subtrahend: \n); l4_uint32_t val1, val2;