Operating Systems Principles Week 5

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which security mechanism is the most widely used today?

WPA

5.2 Deadlock detection Graph reduction A deadlock in a resource allocation graph can be detected by executing a graph reduction algorithm:

Repeat until no unblocked process remains in the graph: Select an unblocked process p. Remove p, including all request and allocation edges connected to p.

A process p is blocked on a resource r if one or more request edges directed from p to r exist and r does not contain sufficient free units to satisfy all requests.

The assumption in deadlock analysis and management is that the underlying code is correct. With erroneous code, a process could block itself, for example by acquiring a resource and then requesting the same resource again without releasing the first allocation. Similarly, a process could acquire k units of an n-unit resource and then request m additional units where m > n - k, thus blocking itself forever.

Mark all channels that can be used in 802.11b without causing interference to each other

1 6 11

Mark all channels that can be used in 802.11g, 802.11ac, 802.11n, and newer without causing interference to each other

1 6 11

Select all statements that are true

A node can only send one data frame after receiving CTS for its RTS. RTS/CTS mechanism addresses hidden terminal problem of WiFi. One would want to use RTS/CTS mechanism when sending large data frames.

Deadlock states and safe states

A process is deadlocked in a state s if the process is blocked in s and if no matter what state transitions occur in the future, the process remains blocked. A state s is called a deadlock state if s contains two or more deadlocked processes. A state s is a safe state if no sequence of state transitions exists that would lead from s to a deadlock state. When the sequence of all requests and releases by each process is known, a complete state transition graph can be constructed and analyzed for the presence of deadlock states and safe states.

For this question, you need to do a bit of googling. For each of the WiFi standards listed below, give an equivalent number in the new WiFi naming scheme. For example, for 802.11ax, it is WiFi 6. 802.11n: 802.11b: 802.11g: 802.11a: 802.11ac:

Blank 1 - WiFi 4Correct Blank 2 - WiFi 1Correct Blank 3 - WiFi 3Correct Blank 4 - WiFi 2Correct Blank 5 - WiFi 5Correct https://en.wikipedia.org/wiki/IEEE_802.11#802.11ax

Select all true statements

Broadcast storm in OSPF is prevented by having a state in the routers. Broadcast storm in IP is prevented by having a state in the packet. Ethernet have danger of broadcast stroms because Ethernet headers don't have a state neither in Ethernet header (no TTL field) nor in switches (cannot remember that saw the packet).

Imagine the case that node D is sending a reply back to A. Fill in the blanks addresses of the first frame D is sending to its access point (in each case, write one capital letter---designation of the node or BSSID): addr1: addr2: addr3: addr4:

C Correct D Correct A Correct C Correct 802.11 MAC Addresses in Action (Data Frame A->D) https://drive.google.com/file/d/18EQIqRXezW0aTgRiwPcBczAnlAEkykWR/view?usp=sharing

Continuous deadlock detection Testing for deadlock can be accomplished more efficiently if done on a continuous basis. If the current state s is not deadlocked, then the next state s' can be a deadlock state only if the operation that caused the transition was a request for a resource and the process p that issued the request is deadlocked in s'. Continuous deadlock detection then proceeds as follows:

If the current operation is a request for a resource and the requesting process p becomes blocked in s' then execute the graph reduction algorithm until either p is removed from the graph or no unblocked process remains in the graph

Deabbreviate IBSS

Independent Basic Service Set

5.1 A system model for deadlocks

Resource allocation graphs A resource allocation graph shows the current allocation of resources to processes and the current requests by processes for new resources. Processes are represented by circles. Resources are represented by rectangles. If a resource contains multiple units then each unit is represented by a small circle. Resource allocations are represented by edges directed from a resource to a process. Resource requests are represented by edges directed from a process to a resource.

Deadlock avoidance with single-unit resources With single-unit resources, a process p can be blocked only if p is waiting for a resource held by another blocked process p'. Since p' is blocked, p' must be waiting for another resource held by yet another process p", etc. To make the chain irreducible in the claim graph, the processes must be blocked in a directed cycle.

The banker's algorithm is then simplified: Given a request for a resource in a state s, temporarily grant the request by changing the claim edge to an allocation edge. Starting with the requesting process p, determine if the graph in the temporary state s' contains a directed cycle. If no cycle exists then accept s' as the new state. Otherwise disallow the acquisition by reverting to the state s.

The banker's algorithm The banker's algorithm emulates the strategy used by a bank when issuing loans. A loan corresponds to a resource allocation and a maximum claim corresponds to the credit limit of a customer (requesting process). The bank grants a request as long as a sequence of loans exist that would satisfy the needs of all customers in some order. Otherwise the granting of the request is postponed.

The banker's algorithm: Given a resource request in a state s, temporarily grant the request by changing claim edges to allocation edges. Execute a graph reduction on the new state s'. If the graph of state s' is completely reducible then accept s' as the new state. Otherwise disallow the acquisition by reverting to state s.

A resource allocation graph is completely reducible if at the termination of the graph reduction algorithm all processes have been deleted.

Theorem 1: A state s is a deadlock state if and only if the resource graph of s is not completely reducible. Theorem 2: All reduction sequences of a given resource allocation graph lead to the same final graph.

Theorem: If acquisition operations that do not result in a completely reducible claim graph are not executed then any system state is safe.

Theorem: If acquisition operations that do not result in a completely reducible claim graph are not executed then any system state is safe.


Ensembles d'études connexes

Tissue Bio: Lecture 13-14: Nervous System

View Set

Grammar: Verb Forms - Gerunds, Participles, and Infinitives

View Set