Skip to content

Commit ff47221

Browse files
committed
Small grammar fixes
Fix small grammar issues, including a few comma splices.
1 parent 106fad3 commit ff47221

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

chapters/scheduling.asciidoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ with the function `erlang:process_info/2`.
9191
We will look closer at the different statuses that a process
9292
can have later in this chapter, but for now all we need
9393
to 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.
9595
Since 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
9797
three of the _busy processes_). There are also five busy processes
9898
waiting to run in the state _runnable_.
9999

@@ -182,7 +182,7 @@ has to save its internal state somehow before it returns and then set
182182
up the state again on re-entry. This can be very costly, especially
183183
for a function that sometimes only does little work and sometimes lot.
184184
The 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.
186186
Since there is no clear definition of what one reduction is, other
187187
than a function call on the Erlang level, there is a risk that a
188188
function 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
234234
of _free_, _runnable_, _waiting_, _running_, _exiting_, _garbing_,
235235
and _suspended_. When a process exits it is marked as
236236
free---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
238238
far as the rest of the system is concerned but there is still
239239
some clean up to be done (freeing memory and other resources).
240240

@@ -412,7 +412,7 @@ it at the end of the appropriate ready queue.
412412
If the receive statement has a `timeout` clause a timer will be
413413
created for the process which will trigger after the specified timeout
414414
time. 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
416416
the intended time before the process is scheduled and gets to execute.
417417

418418
Timers are handled in the VM by a _timing wheel_. That is, an array of
@@ -560,17 +560,17 @@ it is up to the OS to allocated scheduler threads to cores, but you
560560
can also choose to bind schedulers to cores.
561561

562562
The 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
564564
utilized scheduler will give you more parallel processing power. If
565565
you have changed how schedulers are allocated to cores, or if your OS
566566
is overloaded or bad at assigning threads to cores, the load balancing
567567
might actually work against you.
568568

569569
The load balancer uses two techniques to balance the load, _task
570570
stealing_ 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
572572
becoming more spread out between schedulers. Migration is more
573-
complicated and tries to compact the load to the right number of
573+
complicated and aims to compact the load to the right number of
574574
schedulers.
575575

576576
==== Task Stealing
@@ -674,7 +674,7 @@ than average (S3, S4) will be targeted for immigration.
674674

675675
This is done by looping over the ordered set of schedulers with two
676676
indices (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]
678678
and the emigration path of S[fix] is set to S[tix]. Then tix is increased
679679
and fix decreased till they both pass the balance point. If one index
680680
reaches the balance point first it wraps.

0 commit comments

Comments
 (0)