Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminate a process #8

Open
zzz0072 opened this issue Sep 24, 2013 · 2 comments
Open

Terminate a process #8

zzz0072 opened this issue Sep 24, 2013 · 2 comments
Assignees

Comments

@zzz0072
Copy link
Owner

zzz0072 commented Sep 24, 2013

http://eng.upm.edu.my/~kmbs/teaching/OS/html/forkexit_8c.html
Check destroy part

@ghost ghost assigned zzz0072 Sep 24, 2013
@zzz0072
Copy link
Owner Author

zzz0072 commented Oct 5, 2013

Study note:

  • tasks[number].stack stores a new task's .text entry at fork
  • How retenv did multitasking?
    • A infinite loop as a scheduler
      • Pick a task from READY queue
      • Start to run the task in user space (check activate( (tasks[current_task].stack);)
        • active may also suspend previous task before start to run selected task. Need to check
        • Task invokes syscall
          • Check r7, do related service
        • Task did invokes syscall
          • Wait for hardware interrupt timer (check tick_count)
            • Check if system needs to wake tasks who call 'sleep()' system call
      • Select next task

@zzz0072
Copy link
Owner Author

zzz0072 commented Oct 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant