Search Results

Search found 56 results on 3 pages for 'epsilonvector'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • Duplicate mails in unread mail view of Windows Live Mail

    - by EpsilonVector
    When I get new mail and go to the "unread email" quick view I always see two version of the email, even though I definitely have only one such version in the inbox itself. Further, viewing the message via inbox usually marks only one of these copies as read, or sometimes none at all. I have no custom filters defined that could cause duplication. Any idea what's going on? PS This is the new version (2011).

    Read the article

  • How do I pick a motherboard?

    - by EpsilonVector
    When building your own computer one part was always a mystery to me: the motherboard. Picking a CPU/GPU/memory is easy- you just figure out where the various chips are in the low end to high end scale, do a little market research on what current games demand, and pick the parts from their respective continuums of low-to-high-end models. A mother board is more complicated though. Its features are not as obvious as "this motherboard is faster than that motherboard". Now you need to deal with part compatibilities, bus speeds, maybe power management stuff, etc. I'm interested in a short guide for selecting a motherboard, especially- what pitfalls to avoid (for example, can bus speed become a bottleneck?). To clarify: I'm not looking for motherboard recommendations. I'm looking for guidance regarding how to evaluate the fitness of a motherboard given the rest of the computer parts.

    Read the article

  • How does fork() return for child process

    - by EpsilonVector
    I know that fork() returns differently for the son and father processes, but I'm unable to find information on how this happens. How does the son process receive the return value 0 from fork? And what is the difference in regards to the call stack? As I understand it, for the father it goes something like this: father process--invokes fork--system_call--calls fork--fork executes--returns to--system_call--returns to--father process. What happens in the son side?

    Read the article

  • Kernel panic when altering system_call in entry.S

    - by EpsilonVector
    I'm trying to implement a system call counter, and as a result I included an int value in task_struct, and a function that increments it in a separate file. This function is supposed to be called from system_call right before it actually calls the required sys_call (I have my reasons to call it before and not after). However, if I place it before the sys_call then after compiling and booting there's a kernel panic ("tried to kill init_idle"), and if I place it right after the sys_call, it works. What's the difference and how do I overcome this? Here's the relevant code ENTRY(system_call) pushl %eax # save orig_eax SAVE_ALL GET_CURRENT(%ebx) testb $0x02,tsk_ptrace(%ebx) # PT_TRACESYS jne tracesys cmpl $(NR_syscalls),%eax jae badsys call update_counter /*This causes a kernel panic*/ call *SYMBOL_NAME(sys_call_table)(,%eax,4) movl %eax,EAX(%esp) # save the return value

    Read the article

  • How does fork() return for son process

    - by EpsilonVector
    I know htat fork() returns differently for the son and father processes, but I'm unable to find information on how this happens. How does the son process receives the return value 0 from fork? And what is the difference in regards to the call stack? As I understand it, for the father it goes something like this: father process--invokes fork--system_call--calls fork--fork executes--returns to--system_call--returns to--father process. What happens in the son side?

    Read the article

  • How does a syscall knows where the wrapper function put its parameters in?

    - by EpsilonVector
    I'm trying to implement a syscall in Linux (RedHat Enterprise 8) and I'm a bit confused about the way it works. From what I understand, I implement a wrapper in user mode which puts the syscall number in eax and parameters in ebx, ecx, edx, etc, and then invokes int 0x80 which calls the appropriate syscall. My question is, since a syscall is written like a regular C function, how does it know what registers contain what parameters? Is it a convention, or is there a mechanism for it, and if so where and how does it do it?

    Read the article

  • How to properly siglongjmp out of signal handler?

    - by EpsilonVector
    Suppose I have the following code: In order to implement a context switch I activate ualarm and when it jumps to the handler it setjmp's the current context, and longjmps to the next, expecting to eventually return to the alarm handler and longjmped back into this context (the contexts are cycled through in a Round Robin). For this I need to keep SIGALRM unblocked in between alarm_handlers. I came up with the following code, which doesn't seem to work. What's wrong with it and what is the right way to do this? void alarm_handler(){ if(sigsetjmp(toc->threads[toc->RR_pointer].env, 0)){ ualarm(200, 0); signal(SIGALRM, alarm_handler); return; } get_next_context_number(toc->RR_pointer); //is a macro for (j=0; j<10; j++) printf("ALARM HANDLER\n"); siglongjmp(toc->threads[toc->RR_pointer].env, 1); }

    Read the article

  • What is the best way to save the environment from before an alarm handler goes off when the alarm do

    - by EpsilonVector
    I'm trying to implement user threads on a 2.4 Linux kernel (homework) and the trick for context switch seems to be using an alarm that goes off every x milliseconds and sends us to an alarm handler from which we can longjmp to the next thread. What I'm having difficulties with is figuring out how to save the environment to return to later. Basically I have an array of jmp_buffs, and every time a "context switch" using the alarm happens I want to save the previous context to the appropriate entry of the array and longjmp to the next one. However, just the fact that I need to do this from the event handler means that just using setjmp in the event handler won't give me exactly the kind of environment I want (as far as stack and program counter are involved) because the stack has the event handler call in it and the pc is in the event handler. I suppose I can look at the stack and alter it to fit my needs, but that feels a bit cumbersome. Another idea I had is to somehow pass the environment before the jump to event handler as a parameter to the event handler, but I can't figure out if this is possible. So I guess my question is- how do I do this right?

    Read the article

  • Linux synchronization with FIFO waiting queue

    - by EpsilonVector
    Are there locks in Linux where the waiting queue is FIFO? This seems like such an obvious thing, and yet I just discovered that pthread mutexes aren't FIFO, and semaphores apparently aren't FIFO either (I'm working on kernel 2.4 (homework))... Does Linux have a lock with FIFO waiting queue, or is there an easy way to make one with existing mechanisms?

    Read the article

  • Converting jiffies to milli seconds

    - by EpsilonVector
    How do I manually convert jiffies to milliseconds and vice versa in Linux? I know kernel 2.6 has a function for this, but I'm working on 2.4 (homework) and though I looked at the code it uses lots of macro constants which I have no idea if they're defined in 2.4.

    Read the article

  • Is there a "good enough" solution for the halting problem?

    - by EpsilonVector
    It is known that the halting problem cannot have a definite solution, one that a) returns true <== the program does indeed halt, and b) handles any input, but I was wondering if there are good enough solutions to the problem, ones that can maybe handle certain types of program flows perfectly, or is able to identify it when it cannot correctly solve the problem, and so on.... If so, how good are they, and what ideas/limitations do they rely on?

    Read the article

  • Deferring signal handling in Linux

    - by EpsilonVector
    I'm trying to figure out how to block a signal in Linux kernel 2.4 (user space) from invoking its handler, but keep it available to be handled later, preferably as soon as I re activate the handling of said signal. The function sigprocmask seem to come up in all my search results, but I can't find a good, clear description that explains whether the blocked signal gets "saved" to be handled later, and if so where and how do I handle it when I'm ready for it. Can someone please clarify what's going on, preferably with a code example? Thanks in advance.

    Read the article

  • sigsetjmp and siglongjmp inside signal handler

    - by EpsilonVector
    How do I: sigsetjmp inside the handler and then return from the handler such that the signal will be unmasked once I siglongjmp back to this point? In pseudo code this is sort of the function that I have: signal_handler(){ if(sigsetjmp(env[i++])) return; else siglongjmp(env[i]); } It's supposed to be the context switch code for user threads in Linux.

    Read the article

  • Strange behavior of for loop in scheduler_tick

    - by EpsilonVector
    I'm working on Linux kernel 2.4 (homework) and I inserted the following code into the scheduler_tick function: if (unlikely(rt_task(p)) || (p->policy==SCHED_PROD && p->time_ran>=p->process_expected_time)) { /* * RR tasks need a special form of timeslice management. * FIFO tasks have no timeslices. */ if ((p->policy == SCHED_RR || /*change*/p->policy==SCHED_PROD) && !--p->time_slice) { /*changes*/ if (p->policy == SCHED_PROD){ for (i=0; i<5000; i++){ printk("I'm leeching off SCHED_RR code! %d\n", i); } } /*end changes*/ The addition was added for debugging purposes. For some reason this causes very weird behavior: when a SCHED_PROD process triggers this code (and consequently the loop that follows) the loop counts to about 4600 normally, but then goes back to 4600 each time it counts to 4800, and gets stuck in an infinite loop. What's going on?? EDIT: The i variable is my own.

    Read the article

  • Using sigprocmask to implement locks

    - by EpsilonVector
    I'm implementing user threads in Linux kernel 2.4, and I'm using ualarm to invoke context switches between the threads. We have a requirement that our thread library's functions should be uninterruptable, so I looked into blocking signals and learned that using sigprocmask is the standard way to do this. However, it looks like I need to do quite a lot to implement this: sigset_t new_set, old_set; sigemptyset(&new_set); sigaddset(&new_set, SIGALRM); sigprocmask(SIG_BLOCK, &new_set, &old_set); This blocks SIGALARM but it does this with 3 function invocations! A lot can happen in the time it takes for these functions to run, including the signal being sent. The best idea I had to mitigate this was temporarily disabling ualarm, like this: sigset_t new_set, old_set; time=ualarm(0,0); sigemptyset(&new_set); sigaddset(&new_set, SIGALRM); sigprocmask(SIG_BLOCK, &new_set, &old_set); ualarm(time, 0); Which is fine except that this feels verbose. Isn't there a better way to do this?

    Read the article

  • What does an empty run queue entry points to?

    - by EpsilonVector
    I'm trying to figure out the technicalities of scheduling in Linux. What I can't figure out is what happens with those entries in the run_queue where there are no running processes. In the run_queue we have a bitmap, a counter, and the array of lists themselves. For a list that is empty because there are no running tasks with its priority, what do the next and prev pointers point to?

    Read the article

  • Kernel error causing cpu to go into shutdown state

    - by EpsilonVector
    What kind of Kernel error can cause the cpu to go into a shut down state? I'm doing a homework assignment in OS, and we did changes in sched.c (adding a new scheduling policy, which involved ading another prio_array to the queue and switching between them when needed). Processes using this policy cause the cpu to enter a shut down state when they finish. Any suggestions where to look?

    Read the article

  • sigprocmask not working

    - by EpsilonVector
    I'm using sigprocmask as follows: void mask(){ sigset_t new_set,old_set; sigemptyset(&new_set); sigaddset(&new_set,SIGALRM); sigprocmask(SIG_BLOCK, &new_set, &old_set); } and to my surprise a function which prints a big list somehow gets interrupted by the signal, even though I invoke mask() at its beginning. It looks as if mask fails, since my function doesn't invoke any other functions and therefore nowhere in its run should an unmask() happen. What can cause sigprocmask to fail?

    Read the article

  • Catching the return of main function before it deallocates resources

    - by EpsilonVector
    I'm trying to implement user threads in Linux kernel 2.4, and I ran into something problematic and unexpected. Background: a thread basically executes a single function and dies, except that when I call thread_create for the first time it must turn main() into a thread as well (by default it is not a thread until the first call, which is also when all the related data structures are allocated). Since a thread executes a function and dies, we don't need to "return" anywhere with it, but we do need to save the return value to be reclaimed later with thread_join, so the hack I came up with was: when I allocate the thread stack I place a return address that points to a thread_return_handler function, which deallocates the thread, makes it a zombie, and saves its return value for later. This works for "just run a function and die" threads, but is very problematic with the main thread. Since it actually is the main function, if it returns before the other threads finish the normal return mechanism kicks in, and deallocates all the shared resources, thus screwing up all the running threads. I need to keep it from doing that. Any ideas on how it can be done?

    Read the article

  • Reading a variable messes it up?!?!

    - by EpsilonVector
    We have the following line of code: printf("%d\n", toc->runlist.next); printf("%d\n", toc->runlist.next); These are the definitions: typedef struct thread_overview_control{ int id[NR_UTHREADS]; list_t runlist; int active_counter; int main_thread; int need_resched; } thread_overview_control; thread_overview_control* toc; What I'm trying to do is implement user threads. For some reason the output of the above code at the point where our test run crushes is: 12345678 //some address 0 //NOW IT'S NULL?!?!?! How can this happen?? All we do is read a variable. And the strange thing is, without printf's there are no crashes. What's going on?

    Read the article

< Previous Page | 1 2 3  | Next Page >