@@ -91,9 +91,9 @@ with the function `erlang:process_info/2`.
9191We will look closer at the different statuses that a process
9292can have later in this chapter, but for now all we need
9393to know is that a process that is _running_ or _garbage_collecting_
94- is actually running in on a scheduler.
94+ is actually running in a scheduler.
9595Since the machine in the example has four cores and four schedulers
96- there are four process running in parallel (the shell process and
96+ there are four processes running in parallel (the shell process and
9797three of the _busy processes_). There are also five busy processes
9898waiting to run in the state _runnable_.
9999
@@ -182,7 +182,7 @@ has to save its internal state somehow before it returns and then set
182182up the state again on re-entry. This can be very costly, especially
183183for a function that sometimes only does little work and sometimes lot.
184184The reason for writing a function in C instead of Erlang is usually to
185- achieve performance and to not do unnecessary book keeping work.
185+ improve performance and to not do unnecessary book keeping work.
186186Since there is no clear definition of what one reduction is, other
187187than a function call on the Erlang level, there is a risk that a
188188function implemented in C takes many more clock cycles per reduction
@@ -234,7 +234,7 @@ The field `status` in the PCB contains the process state. It can be one
234234of _free_, _runnable_, _waiting_, _running_, _exiting_, _garbing_,
235235and _suspended_. When a process exits it is marked as
236236free---you should never be able to see a process in this state,
237- it is a short lived state where the process no longer exist as
237+ it is a short lived state where the process no longer exists as
238238far as the rest of the system is concerned but there is still
239239some clean up to be done (freeing memory and other resources).
240240
@@ -412,7 +412,7 @@ it at the end of the appropriate ready queue.
412412If the receive statement has a `timeout` clause a timer will be
413413created for the process which will trigger after the specified timeout
414414time. The only guarantee the runtime system gives on a timeout is that
415- it will not trigger before the set time, it might be some time after
415+ it will not trigger before the set time. It might be some time after
416416the intended time before the process is scheduled and gets to execute.
417417
418418Timers are handled in the VM by a _timing wheel_. That is, an array of
@@ -560,15 +560,15 @@ it is up to the OS to allocated scheduler threads to cores, but you
560560can also choose to bind schedulers to cores.
561561
562562The load balancer assumes that there is one scheduler running on each
563- core so that moving a process from a overloaded scheduler to an under
563+ core so that moving a process from an overloaded scheduler to an under
564564utilized scheduler will give you more parallel processing power. If
565565you have changed how schedulers are allocated to cores, or if your OS
566566is overloaded or bad at assigning threads to cores, the load balancing
567567might actually work against you.
568568
569569The load balancer uses two techniques to balance the load, _task
570570stealing_ and _migration_. Task stealing is used every time a
571- scheduler runs out of work, this technique will result in the work
571+ scheduler runs out of work. This technique will result in the work
572572becoming more spread out between schedulers. Migration is more
573573complicated and tries to compact the load to the right number of
574574schedulers.
@@ -674,7 +674,7 @@ than average (S3, S4) will be targeted for immigration.
674674
675675This is done by looping over the ordered set of schedulers with two
676676indices (immigrate from (`fix`)) and (emigrate to (`tix`)). In each
677- iteration of the a loop the immigration path of S[tix] is set to S[fix]
677+ iteration of the loop the immigration path of S[tix] is set to S[fix]
678678and the emigration path of S[fix] is set to S[tix]. Then tix is increased
679679and fix decreased till they both pass the balance point. If one index
680680reaches the balance point first it wraps.
0 commit comments