Changes between Version 2 and Version 3 of InternalTricks
- Timestamp:
- Jun 30, 2006, 10:12:06 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InternalTricks
v2 v3 36 36 | Semaphore Tree structure | 37 37 ------------------------------------------------------------------------------ 38 ______39 | |40 | HEAD |41 |______|42 .' '.43 __.' '.__44 |__| |__|45 __.''.__ '.__46 |__| |__| |__|38 ______ 39 | | 40 | HEAD | 41 |______| 42 .' '. 43 __.' '.__ 44 |__| |__| 45 __.''.__ '.__ 46 |__| |__| |__| 47 47 48 | | | |49 `--------' `----'50 AST Free List48 | | | | 49 `--------' `----' 50 AST Free List 51 51 52 Further details can be found directly in source code :)52 Further details can be found directly in source code :) 53 53 }}} 54 54 … … 63 63 preemption trigger use. Moreover we had to guarantee the 64 64 accuracy of length of time-quantum assigned to scheduled 65 processes. The answer to both issues is a time-credit system. 65 processes. The answer to both issues is a '''time-credit 66 system.''' 66 67 [[BR]] 67 68 Time credits, as you can easily see, solves the problem about … … 82 83 time and memory usage. They do not deserve a deep explanation 83 84 but they must be mentioned: 84 * '''Direct passup''': external exception-handlers (loaded by85 * __Direct passup__: external exception-handlers (loaded by 85 86 internal ones) returns the control directly to the process 86 87 which raised the exception. 87 * '''Iterative `TERMTHREAD`''': process termination means88 * __Iterative `TERMTHREAD`__: process termination means 88 89 termination of its progeny. Instead of a recursive call, we 89 90 preferred to first breadth-visit the whole sub-tree and then 90 kill generation after generation.... muahuahuah uah!91 <pedice>Search for the mortuary among the code.</pedice>92 * '''Exception handler functions''': An unexpected benefit of91 kill generation after generation.... muahuahuah! 92 ,,Search for the `mortuary` among the code. 93 * __Exception handler functions__: An unexpected benefit of 93 94 modularization avoided exceptions raising after errors or 94 95 abnormal situations. We opted for a direct function-call 95 96 strategy, which clearly minimizes the over-head caused by 96 97 these recursion, reducing the number of context switches. 97 * '''Idle''': thumbs twiddling it is implemented without waste98 * __Idle__: thumbs twiddling it is implemented without waste 98 99 a whole process control block. A dummy-loop function is more 99 100 than enough, so we automagically set the interval timer up in