I have a problem with the banker’s algorithm. There are 6 processes and one type of resources. The allocation is `(0, 29, 35, 10, 25, 35)`

and the MAX need is `(50, 80, 50, 25, 40, 90)`

. The available resources are equal to `D`

. The first question is what is the minimum value for `D`

as the state to be safe. I have managed to solve this and the value is `15`

. But the next question is: To how many processes can be allocated additional `5`

resources to keep the state safe (multiple situations)? I am not sure I understand this. It means that I need to add 5 to the allocation array or both allocation array and MAX need?

# Tag: Allocation

## Let $V_1$ be the variance of the estimated mean from a stratified random sample of size $n$ with proportional allocation.

Let $ V_1$ be the variance of the estimated mean from a stratified random sample of size $ n$ with proportional allocation. Assume that the strata sizes are such that the allocations are all integers.Let $ V_2$ be the variance of the estimated mean from a simple random sample of size $ n$ . Show that the ratio $ \frac{V1}{V2}$ is independent of $ n$ .

We define the estimator $ \bar y_{st}=\sum_{h}w_h \bar{y}_h$ , where $ w_h=\frac{N_h}{N}$ . We know this is an unbiased estimator of the population mean. For proportional allocation, $ n_h=nw_h $

$ V(\bar y_{st})=V_1=\frac{1}{n}\sum w_h \sigma^2_h$ (If we assume SRSWR is applied to sample from each strata)

Again, $ V_2=V(\bar y)=\frac{\sigma^2}{n}$

Now, $ \frac{V_1}{V_2}=\sum w_h \frac{\sigma^2_h}{\sigma^2}=\frac{1}{N}-\sum \frac{w_h(\bar Y_h- \bar Y)^2}{\sigma^2}$ Now, how can I proceed from here?

## Symbol Table Memory Allocation methods

I wanted to know how symbol table for a compiler are allocated memory.Are they statically allocated memory or dynamically?

## Avoiding GC Allocation in Unity UNet API

I’m trying to profile the game using `Unity Profiler`

, I can see in the Hierarchy tab that there’s an `18.3 KB`

correlated to `NetworkIdentiry.UNetStaticUpdate()`

.

I guess this has happened inside the `Unity UNet API`

, is there a workaround to avoid that to happen? and why an internal Unity calls can cause `GC`

?