Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key


Play button


Play button




Click to flip

106 Cards in this Set

  • Front
  • Back

The operating system kernel consists of all system and application programs in a computer.


Flash memory is slower than DRAM but needs no power to retain its contents.


A system call is triggered by hardware.


UNIX does not allow users to escalate privileges to gain extra permissions for a restricted activity.


Processors for most mobile devices run at a slower speed than a processor in a desktop PC.


Interrupts may be triggered by either hardware or software.


A dual-core system requires each core has its own cache memory.


Virtually all modern operating systems provide support for symmetric multiprocessing(SMP).


All computer systems have some sort of user interaction.


Solid state disks are generally faster than magnetic disks.


Solid state disks are considered volatile storage.


There is no universally accepted definition of an operating system.


The __________ of a process contains temporary data such as function parameters, return addresses, and local variables.


A process control block __________.

Includes information on the process's state

The list of processes waiting for a particular I/O decide is called a __________.

Device queue

The __________ refers to the number of processes in memory.

Degree of multiprogramming

When a child process is created, which of the following is a possibility in terms of the execution or address space of the child process?

The child process runs concurrently with the parent.

The child process has a new program loaded into it.

The child is a duplicate of the parent.

A __________ saves the state of the currently running process and restores the state of the next process to run.

Context switch

Which of the following statements is true?

Shared memory is typically faster than message passing.

Imagine that a host with IP address wishes to download a file from the web server at IP address Select a valid socket pair for a connection between this pair of hosts. &

For a single-processor system, there will never be more than one process in the running state.


Shared memory is a more appropriate IPC mechanism than message passing for distributed systems.


Ordinary pipes in UNIX require a parent-child relationship between the communicating processes.


A socket is identified by an IP address concatenated with a port number.


Pthreads refers to a __________.

Specification for thread behavior

The __________ multithreading model multiplexes many user-level threads to a smaller or equal number of kernel threads.

Many-to-many model

Cancellation points are associated with __________ cancellation.


Thread-local storage is data that __________.

Is unique to each thread

__________ is not considered a challenge when designing applications for multicore systems.

Ensuring there is a sufficient number of cores

A __________ provides an API for creating and managing threads.

Thread library

The __________ model multiplexes many user-level threads to a smaller or equal number of kernel threads.


A traditional (or heavyweight) process has a single thread of control.


A thread is composed of a thread ID, program counter, register set, and heap.


Virtually all contemporary operating systems support kernel threads.


Each thread has its own register set and stack.


Deferred cancellation is preferred over asynchronous cancellation.


The single benefit of a thread pool is to control the number of threads.


It is possible to create a thread library without any kernel-level support.


What is the better locking mechanism when the lock is to be held for a short duration?


What is the better locking mechanism when the lock is to be held for a long duration?


What is the better locking mechanism when the thread may be put to sleep while holding the lock?


Assume you have a mutex lock named mutex with the operations acquire() and release(). Indicate where the locking needs to be placed to prevent the race condition(s).

A call to acquire() must be placed upon entering each function and a call to release() immediately before exiting each function.

A race condition ____________.

Results when several threads try to access and modify the same data concurrently

An instruction that executes atomically ____________.

Executes as a single, uninterruptible unit

A counting semaphore ____________.

Is essentially an integer variable

A mutex lock ____________.

Is essentially a boolean variable

In Peterson's solution, the ____________ variable indicates if a process is ready to enter its critical section.


A ____________ type presents a set of programmer-defined operations that are provided mutual exclusion within it.


What is the correct order of operations for protecting a critical section using mutex locks?

Acquire() followed by release()

What is the correct order of operations for protecting a critical section using a binary semaphore?

Wait() followed by signal()

____________ is not a technique for handling critical sections in operating systems.

Peterson's solution

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


A ____________ refers to where a process is accessing/updating shared data.

Critical section

Spinlocks can be used to prevent busy waiting in the implementation of semaphore.


What three conditions must be satisfied in order to solve the critical section problem?

No thread executing in its critical section, if one already is.

Only threads not executing in their critical section decide which enters next.

The number of times other threads enter their critical states, after a thread makes a request, must be bound.

Explain two general approaches to handle critical sections in operating systems.

Preemptive Kernel: Allows a process to be preempted while it is running in kernel mode.

Non Preemptive Kernel: Does not allow a process to be preempted while it is running in kernel mode. Basically free from race conditions.

Which of the following is true of cooperative scheduling?

A process keeps the CPU until it releases the CPU either by terminating or by switching to the waiting state.

____________ is the number of processes that are completed per time unit.


____________ scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts.


The ____________ scheduling algorithm is designed especially for time-sharing systems.


Which of the following scheduling algorithms must be non-preemptive?


Which of the following is true of multilevel queue scheduling?

Each queue has its own scheduling algorithm

The ____________ occurs in first-come-first-served scheduling when a process with a long CPU burst occupies the CPU.

Convoy effect

In Little’s formula, λ represents the ___________.

Average arrival rate for new processes in the queue

__________ allows a thread to run on only one processor.

Processor affinity

_________ involves the decision of which kernel thread to schedule onto which CPU.

System-contention scope

A significant problem with priority scheduling algorithms is _______.


The rate of a periodic task in a hard real-time system is _____, where p is a period and t is the processing time.


Which of the following is true of the rate-monotonic scheduling algorithm?

CPU utilization is bounded when using this algorithm

Which of the following is true of the EDF scheduling algorithm?

When a process becomes runnable, it must announce its deadline requirements to the system

The two general approaches to load balancing are _____ and _____.

Push migration, pull migration

What are the two types of latency that affect the performance of real-time systems?

Interrupt latency and dispatch latency

What are the advantages of the EDF scheduling algorithm over the rate-monotonic scheduling algorithm?

EDF does not require a constant period or burst time. It is theoretically optimal.

A deadlocked state occurs whenever _________.

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

One necessary condition for deadlock is ____, which states that at least one resource must be held in a nonsharable mode.

Mutual exclusion

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

In a system resources-allocated graph, _________.

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

A cycle in a resource-allocation graph is _________.

A necessary and sufficient condition for deadlock in the case that each resource has exactly one instance

To handle deadlocks, the OS will most often __________.

Pretend that deadlocks never occur

Assume there are three resources, R1, R2, R3, that are each assigned unique integer values 15, 10, and 25 respectively. What is a resource ordering which prevents circular waiting?

R2, R1, R3

Explain what has to happen for a set of processes to achieve a deadlocked state.

All four deadlock conditions must be satisfied simultaneously

Describe the four conditions that must hold simultaneously in a system if a deadlock is to occur.

Mutual exclusion - 1 process to 1 resource at a time

Hold and wait - a process holding a resource is waiting to acquire additional resources Circular wait - a series of processes that are waiting for the next process to release its resource

No preemption - a resource can only be released voluntarily by the process holding it

What is the difference between deadlock prevention and deadlock avoidance?

Deadlock prevention - 1 of the 4 conditions for deadlock to occur is not true

Deadlock avoidance - additional information is needed to determine if deadlock will occur

What is one way to ensure that a circular-wait condition does not occur?

Ordering - give each process a unique number

Describe two methods for eliminating processes by aborting a process.

Abort all processes at once

Abort one process at a time until all processes are aborted

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

Logical address

The mapping of a logical address to a physical address is done in hardware by the ______.


The _____ binding scheme facilitates swapping.

Execution time

________ is the dynamic storage-allocation algorithm which results in the smallest leftover hole in memory.

Best fit

Which of the following is true of compaction?

It is possible only if relocation is dynamic and done at execution time

Assume a system has a TLB hit ratio of 90%. It requires 15 nanoseconds to access the TLB, and 85 nanoseconds to access main memory. What is the effective memory access time in nanoseconds for this system? (HR * TT) + (MR * (MMT + TT))


Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page number?


With segmentation, a logical address consists of ___________.

Segment number and offset

A(n) _____ matches the process with each entry in the TLB.

Address-space identifier

Distinguish between internal and external fragmentation.

Internal - wasted space due to the block of data loaded being smaller than the partition. Internal fragmentation is eliminated by segmentation

External - memory becomes more and more fragmented; memory utilization declines

Explain the basic method for implementing paging.

Partition memory into equal fixed-size chunks that are relatively small

Process is also divided into small fixed-size chunks of the same size

What is the difference between simple paging and virtual memory paging?

Simple - All pages are loaded into main memory Virtual memory - Few pages are loaded at the same time into main memory

Explain thrashing

Thrashing is a state in which the system spends most of its time swapping process pieces rather than executing instructions.

To avoid this, the OS tries to guess which pieces are least likely to be used in the near future. Guess is based on recent history.

What elements are typically found in a page table entry? Briefly define each element.

Frame number - sequential page number in main memory

Present bit - indicates if page is in main memory

Modify bit - indicates if page has been modified since coming to main memory

What is the purpose of a translation lookaside buffer (TLB)?

A cache that helps avoid going to the disk to retrieve a page. This decreases memory access time.

Which of the following is a benefit of allowing a program that is only partially in memory to execute?

Programs can be written to use more memory than is available in physical memory

CPU utilization and throughput is increased

Less I/O is needed to load or swap each user program into memory

In systems that support virtual memory, ______.

Physical memory is separated from logical memory

Belady’s anomaly states that _________.

For some page replacement algorithms, the page-fault rate may increase as the number of allocated frames increases

__________ allows the parent and child processes to initially share the same pages, but when either process modifies a page, a copy of the shared page is created.


__________ is the algorithm implemented on most systems.


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