Operating Systems: Test 2 Chapters 6 - 10

¡Supera tus tareas y exámenes ahora con Quizwiz!

The four conditions to a deadlock: No preemption

A resource can be released only voluntarily by the process holding it, after that process has completed its task -if a process is that is holding some resource request another resource that will not be available for a while, it should release its current resource that it is holding.

Memory Management Unit

Hardware device that at run time maps virtual to physical address

Limit

How long that segment can be

Compile time

If memory location known a priori, absolute code can be generated; must recompile code if starting location changes

Mutual Exclusion

If process Pi is executing in its critical section, then no other processes can be executing in their critical sections

physical address

address seen by the memory unit

A(n) ___ matches the process with each entry in the TLN

address-space identifier

Internal Fragmentation

allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used

Semaphore

an integer variable that, apart from initialization, is accessed only through two standard atomic operations: wait() and signal().

A solution to the critical section problem does not have to satisfy which of the following requirements?

atomicity

Backing store

fast disk large enough to accommodate copies of all memory images for all users; must provide direct access to these memory images

Belady's Anomaly is the observation that ______.

for some PRAs, the page fault rate may increase as the number of allocated frames increases

logical address

generated by the CPU; also referred to as virtual address

A calling java thread becomes the owner of a lock when ___

It enters the synchronized method.

What is the purpose of the mutex semaphore in the implementation of the bounded-buffer problem using semaphores?

Iy ensures mutual exclusion to the shared buffer pool

segment table

- maps two-dimensional physical addresses. Each table entry has a base and limit

When a thread invokes notify():

-A random Thread call T from the wait set is selected -T is then moved from the wait set to the entry set -The state of T is set to runnable

Inverted Page Table

-One page for each real page frame of memory

when a thread invokes wait():

-The thread releases the object lock -The state of the thread is set to locked -The thread is set into the wait set for the object

A spinlock ____.

-does not require a context switch when a process must wait on a lock -is useful when locks are expected to be held for a short amount of time.

Consider a logical address with a page size of 8 KB. How many bits must be used to represent the page offset in the logical address?

13

Consider a logical address with a page size of 16 KB. How many bits must be used to represent the page offset in the logical address?

14

Consider a logical address with a page size of 32 KB. How many bits must be used to represent the page offset in the logical address?

15

Consider a logical address with a page size of 64 KB. How many bits must be used to represent the page offset in the logical address?

16

acquire() & release()

2 methods used by mutex locks Have to be mutually exclusive

Suppose a program is operating with execution-time binding and the physical address generated is 300. The relocation register is set to 100. What is the corresponding logical address?

200

Bounded Waiting

A bound must exist on the number of times that other processes are allowed to enter their critical sections after a process has made a request to enter its critical section and before that request is granted

request edge

A directed edge from a process to a resource

assignment edge

A directed edge from the resource to the process

First fit

Allocate the first hole that is big enough

Worst-Fit

Allocate the largest hole. Again, we must search the entire list.

best fit

Allocate the smallest hole that is big enough, must search entire list unless it is ordered by size.

execution time

Binding delayed until run time if the process can be moved during its execution from one memory segment to another

Reentrant Code

Can be Shared

First Fit and Best Fit suffer from _____

External Fragmentation

TRUE OR FALSE: Fragmentation does not occur in paging system

False

TRUE OR FALSE: If a resource allocation graph has a cycle, the system must be in a deadlock

False

TRUE OR FALSE: The value of a counting semaphore can range only between 0 and 1

False

TRUE OR FALSE: There is a 1:1 correspondence between the number of entries in the TLB and the number of entries in the page table.

False

Suppose a process using semaphores does a release() operation before executing its critical section and an acquire() operation afterward, instead of the other way around. What may happen due to this error?

Multiple processes could be in their critical section simutaneously

Load Time

Must generate relocatable code if memory location is not known at compile time

Each Java lock has an associated lock

The lock is Acquired by invoking a synchronized method The lock is released by exiting a synchronized method

notifyAll()

This method wakes up ALL waiting threads; the scheduler decides which one will run -this is more of a conservative strategy

____ occurs when a process spends more time paging than executing.

Thrashing

TRUE OR FALSE: Entering a synchronized method in Java requires owing the object Lock

True

TRUE OR FALSE: Race conditions are prevented by requiring that critical regions be protected by locks

True

TRUE OR FALSE: Reentrant code can be shared

True

TRUE OR FALSE: Without a mechanism such as a address-space identifier. the TLB must be flushed during a context switch

True

hashed page table

Virtual Page number is hashed into a page table -This page table contains a chain of elements tasing to the same location

____ is the dynamic storage allocation algorithm which results in the largest left over hole in memory

Worst fit

In a system resource-allocation graph, ____.

a directed edge from a process to a resource is called a request edge

The four conditions to a deadlock: Hold and Wait

a process holding at least one resource is waiting to acquire additional resources held by other processes -must guarantee that whenever a process request a resource, it does not hold any other resource -low resource utilization and possible starvation

Hierarchical page table

break up the logical address space into multiple page tables

Writers

can both read and write

Base

contains the starting physical address where the segment resides in memory

A(n) _______ refers to where a process is accessing/updating shared data.

critical section

MMU maps logical addresses _____

dynamically

Threads that are waiting to acquire the object lock are placed into ____ for the object lock

entry set

A deadlock state occurs whenever ___

every process in a set is waiting for an event that can only be caused by another process in the set

An instruction that executes atomically ____.

executes as a single, uninterruptible unit

Physical and Logical Address differ in ____.

execution time

One necessary condition for deadlock is ______, which states that a process must be holding one resource and waiting to acquire additional resources.

hold and wait

starvation

indefinite blocking. A process may never be removed from the semaphore queue in which it is suspended.

Binary Semaphore

integer value can range only between 0 and 1 (same as mutex lock)

Counting Semaphore

integer value can range over an unrestricted domain

A(n) ___ page table has one page entry for each for each physical frame of memory

inverted

Optimal page replacement ____.

is used mostly for comparison with other page-replacement schemes

An address generated by a CPU is referred to as a ____.

logical address

The four conditions to a deadlock: Mutual Exclusion

only one process at a time can use a resource - does not require shareable resources, must hold for non-sharable resources

readers

only read the data set; they do not perform any updates

block

place the process invoking the operation on the appropriate waiting queue

To handle deadlocks, operating systems most often ___.

pretend that deadlock never occur

wakeup

remove one of processes in the waiting queue and place it in the ready queue

The four conditions to a deadlock: circular wait (as a necessary condition for deadlock)

require that each process request resources in an increasing order of enumeration

A race condition ___

results when several threads try to access and modify the same data concurrently. -If this is not on the test then it is none of the above

Virtual Memory

separation of user logical memory from physical memory

Ready Queue

set of all processes residing in main memory, ready and waiting to execute

Cache

sits between main memory and CPU registers

Roll out, roll in

swapping variant used for priority-based scheduling algorithms; lower-priority process is swapped out so higher-priority process can be loaded and executed

External Fragmentation

total memory space exists to satisfy a request, but it is not contiguous


Conjuntos de estudio relacionados

14 TYPES OF PROPAGANDA TECHNIQUES

View Set

Flexible & Static Budgets and Variance Analysis

View Set

II. POLICY RIDERS, PROVISIONS, OPTIONS, AND EXCLUSIONS - 21% of EXAM

View Set

CMIS 108 Computer Concepts MindTap Module 2

View Set

Mastering - Chapter 13 cell biology

View Set

Chapter 18 Caring for the Normal Newborn

View Set

CFA 32: Non-Current Long-term Liabilities

View Set

Dignity Health Non-Employee Orientation Quiz

View Set