projects
/
iotcloud.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9211fb4
)
edits
author
bdemsky
<bdemsky@uci.edu>
Mon, 11 Jul 2016 21:58:30 +0000
(14:58 -0700)
committer
bdemsky
<bdemsky@uci.edu>
Mon, 11 Jul 2016 21:58:30 +0000
(14:58 -0700)
doc/iotcloud.tex
patch
|
blob
|
history
diff --git
a/doc/iotcloud.tex
b/doc/iotcloud.tex
index 78fee74f444fd8ad26aaffa443a92eea2c71cbfd..3c330127a561a45ae9bd5cfd2d72a96d46362626 100644
(file)
--- a/
doc/iotcloud.tex
+++ b/
doc/iotcloud.tex
@@
-127,37
+127,34
@@
Client can make a request to resize the queue. This is done as a write that comb
\subsection{Server Algorithm}
\r
$s \in SN$ is a sequence number\\
\r
$sv \in SV$ is a slot's value\\
\r
\subsection{Server Algorithm}
\r
$s \in SN$ is a sequence number\\
\r
$sv \in SV$ is a slot's value\\
\r
-$slot_s = \tuple{s, sv} \in
Q
\subseteq SN \times SV$ \\
\r
+$slot_s = \tuple{s, sv} \in
SL
\subseteq SN \times SV$ \\
\r
\r
\textbf{State} \\
\r
\r
\textbf{State} \\
\r
-\textit{
Q
= set of live slots on server} \\
\r
+\textit{
SL
= set of live slots on server} \\
\r
\textit{max = maximum number of slots (input only for resize message)} \\
\r
\textit{n = number of slots} \\
\r
\r
\begin{algorithmic}[1]
\r
\textit{max = maximum number of slots (input only for resize message)} \\
\r
\textit{n = number of slots} \\
\r
\r
\begin{algorithmic}[1]
\r
-\Function{GetSlot}{$s
'
$}
\r
-\State \Return{$\{\tuple{s, sv} \in
Q \mid s \geq s'
\}$}
\r
+\Function{GetSlot}{$s
_g
$}
\r
+\State \Return{$\{\tuple{s, sv} \in
SL \mid s \geq s_g
\}$}
\r
\EndFunction
\r
\end{algorithmic}
\r
\r
\begin{algorithmic}[1]
\r
\Function{PutSlot}{$s',sv',max'$}
\r
\EndFunction
\r
\end{algorithmic}
\r
\r
\begin{algorithmic}[1]
\r
\Function{PutSlot}{$s',sv',max'$}
\r
-\If{$(max' \neq \emptyset) \land (max' > max)$}\Comment{Resize}
\r
- \State $Q' \gets new\:queue\:of\:\langle s,sv \rangle\:with
\r
- \:size\:max'$
\r
- \State $Q \gets Q' \cup Q$
\r
- \State $max \gets max'$
\r
+\If{$(max' \neq \emptyset)$}\Comment{Resize}
\r
+\State $max \gets max'$
\r
\EndIf
\r
\If{$(s' = s_n + d)$}
\r
\If{$n = max$}
\r
\EndIf
\r
\If{$(s' = s_n + d)$}
\r
\If{$n = max$}
\r
- \State $
Q \gets Q
- \{\langle s_n,sv_n \rangle\}$
\r
+ \State $
SL \gets SL
- \{\langle s_n,sv_n \rangle\}$
\r
\Else \Comment{$n < max$}
\r
\State $n \gets n + 1$
\r
\EndIf
\r
\Else \Comment{$n < max$}
\r
\State $n \gets n + 1$
\r
\EndIf
\r
- \State $
Q \gets Q
\cup \{\langle s',sv' \rangle\}$
\r
+ \State $
SL \gets SL
\cup \{\langle s',sv' \rangle\}$
\r
\State \Return{$true$}
\r
\Else
\r
\State \Return{$true$}
\r
\Else
\r
- \State \Return{$(false,\{\langle i,sv_i \rangle \in
Q
\mid
\r
+ \State \Return{$(false,\{\langle i,sv_i \rangle \in
SL
\mid
\r
s' \leq i \leq s_n\})$}
\r
\EndIf
\r
\EndFunction
\r
s' \leq i \leq s_n\})$}
\r
\EndIf
\r
\EndFunction
\r