[OS] Final Exam

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

Raid 0+1 vs 1+0.

0 + 1 (stripe and mirror, after single failure only copies are useful) 1 + 0 (mirror and stripe, can continue with other disks, industry standard)

Which of the following is considered directly managed storage?

1) Cache 2) Registers 3) Main Memory

Describe the 3 primary goals of an operating system.

1) Convenience 2) Efficiency 3) Ease of Use

Define Creation or Termination: 1) Concurrency 2) Deallocation of resources 3) Forking 4) Orphans 5) Parent-child relationships 6) Zombies

1) Creation 2) Termination 3) Creation 4) Termination 5) Creation 6) Termination

Which of these is an advantage of multiprocessors and multi-core technology?

1) Increased reliability 2) Economies of scale 3) Increased throughput

Name four ways of evaluating CPU scheduling algorithms.

1) Metrics 2) Deterministic modeling 3) Queuing models 4) Simulations

Which of the following describes a type of environment for operating systems?

1) Mobile 2) Cloud (SaaS, PaaS, IaaS) 3) Distributed 4) Virtualization

What are software locking solutions for the critical section?

1) Mutex 2) Semaphore 3) Monitor

One goal of CPU scheduling is to minimize which of the following:

1) Response time 2) Waiting time 3) Turnaround time

Name 3 key benefits to multi-threading?

1) Responsiveness 2) Resource sharing 3) Economy 4) Scalability

Name 4 disk scheduling algorithms.

1) SCAN/C-SCAN 2) First-Come, First-Served (FCFS) 3) LOOK/C-LOOK 4) Shortest Seek Time First (SSTF)

Match the following process components to the corresponding type of resource (shared or thread-local). 1) Code 2) Data 3) Files 4) Registers 5) Stack

1) Shared 2) Shared 3) Shared 4) Thread-Local 5) Thread-Local

One goal of CPU scheduling is to maximize which of the following:

1) Throughput (number of processes per time unit) 2) CPU utilization

Processor _______ reduces context switches and keeps caches alive.

Affinity

Which of the following are possible solutions to deadlocks? Avoid Allow Prevent Ignore

All of the above

Which of the following are requirements for a deadlock? Circular Wait No Preemption Hold and Wait Mutual Exclusion

All of the above.

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

Context Switch

Graph algorithms help detect cycles which mean _______

Deadlocks

What component is responsible for performing context switches?

Dispatcher

Describe loading.

Do not load until called, better memory utilization

Describe Heap.

Dynamically allocated memory for objects/structs

Describe Local Priority.

Each process only replaces their own frames.

Describe Proportionally Fixed.

Every process gets number of frames based on size

A _____ is a program in execution.

Process

Describe Text.

Program Code

_____ addresses are bound to relocatable (relative) addresses

Symbolic

What is a thread? How does it differ from a process?

1) More light weight 2) Better resource utilization 3) Avoid single thread of control blocking behavior

Process State Diagram Order.

1) New 2) Ready 3) Waiting 4) Running 5) Terminated

Describe three causes of deadlocks.

1) Process never finishes execution 2)System resources are tied up 3) Cyclic interdependencies between processes

There are 5 general areas of management that an operating system is responsible for. Name and briefly describe 3 of them.

1) Processes (e.g., CPU time, memory, threading, concurrency) 2) Memory (e.g., allocation, protection, accounting, caching) 3) Storage (e.g., files, allocation, caching)

Computer systems can be divided into four components (abstraction layers). What are they?

1) Users 2) System and Application 3) OS and Kernel 4) Hardware

What is a race condition?

1)Same data is concurrently modified 2) Outcome depends on order of execution (timing)

What is an operating system?

A system program consisting of kernel and system applications that provides abstraction layers to various types of users.

Memory blocks are defined by a ___A___ address and a ___B___.

A) Base b) Limit

In order to map ___A___ to ___B___efficiently via a page table the memory management unit makes use of the translation look-aside ___C___

A) Pages B) Frames C) Buffer

For processes the ___A____ keeps track of state, number, registers and management information as well as where we are in the execution code path which is called ___B____

A) Process Control Block B) Program Counter

Briefly discuss the need for disk partitioning and some of its benefits.

Allows for better file system management (OS, user data, boot, swap space, etc.) Allows more than one operating system to run on the same disk

Directed edges from resources to processes mean ______

Assignments

What are hardware locking solutions for the critical section?

Atomic Instructions (e.g., test and set, swap)

Name one advantage and one disadvantage of priority scheduling.

Better control over process execution Starvation of CPU time slices possible for low priority processes

Address _____ can occur at multiple times (compile, load, execution)

Binding

Which of the following are properties of virtual memory demand paging?

Brings pages with code being used into memory instead of entire program Signals page faults when page needs to be loaded from disk Less I/O, less memory, faster response Uses page tables for caching information (valid and invalid bits)

What is a critical section?

Code paths where data is modified concurrently bounded by entry and exit sections.

Implicit threading can be achieved using which of the following approaches?

Compiler support and run-time libraries

Describe Equally Fixed.

Every process gets same number of frames

A preemptive kernel means that processes cannot be interrupted and need to finish before releasing cpu time. T/F

False

The performance gained when moving from a single core system to a multi-core system is proportionate to the number of additional cores added to the system. T/F

False

The Massive Boot Registration (MBR) keeps track of partitions and boot initialization T/F

False, it's Master Boot Record

Describe the difference between the following process scheduling algorithms:

First-Come, First-Served (FCFS) (long processes can cause bottleneck, non-preemptive) Shortest-Job-First (SJF) (estimation of process CPU time slice needs, non-preemptive andpreemptive variants) Round-Robin (every process gets a single CPU time slice, causes dispatcher overhead) Multilevel Queue (separate queues based on priority) Multilevel Feedback Queue (separate queues based on priority with option to move)

Describe three main memory storage allocation approaches for processes.

First-Fit: Goes for the first available hole it can fit into. Best-Fit: Goes into the smallest hole it can fit into. Worst-Fit: Goes into the largest hole.

Describe Data.

Global variables

Briefly describe the evolution of operating systems with regards to: Hardware, Users and Tasks

Hardware: First singular, than agnostic than both singular and agnostic. User: Moved from requiring constant user input, to only necessary users input and now towards more automation. Task: Monolithic execution of simple functions to advanced execution of many tasks within one process.

Describe Global Priority.

Higher priority process can take frames from lower priority process.

Briefly describe two ways mass-storage can be connected to a computer system.

Host-attached (directly to the computer system) Network-attached (indirectly via some network)

Explain the difference between an I/O-bound process and a CPU-bound process.

I/O-Bound: Processing based on data and storage. These processes are limited by input output devices. CPU-Bound: Processing based on number crunching. These processes are limited by compute capability.

_____ addresses are generated by the CPU

Logical

Why are operating systems usually implemented in low-level languages?

Low-level languages (i.e. assembly) allows for much more direct access to the hardware of a system. It takes a lot of time code, but is far more efficient. It is also much more difficult to code than high-level languages, but requires much less space.

Discuss the different properties of magnetic tape, magnetic disks and solid-state disks.

Magnetic tape (durable long-term storage, low transfer rate, slow access time) Magnetic disks (decent transfer rate 50-100MB/s, decent access time 5-15ms) Solid-state disks (fast transfer rate 500-1000MB/s, fast access time 0.1ms)

Describe Mutual Exclusion.

Make resources sharable, read-only approach

There are 3 strategies to map user to kernel threads. Briefly describe each. Which one is used in most modern operating systems?

Many-to-one (bottleneck) One-to-one (overhead) Many-to-many (balanced)

What are the two main mechanisms for interprocess communication? Explain key characteristics of each.

Message passing (slow, efficient, small data amounts) Shared memory (fast, need to synchronize)

Describe the 3 key properties of a critical section,

Mutual Exclusion: (only one process allowed at a time) Progress: (process thread of control moves ahead) Bounded Waiting: (process cannot hold on to the critical section indefinitely)

______ are sets of processes P and resources R.

Nodes

Describe No Preemption.

Once resource is allocated do not allow interruption

What are atomic instructions?

Only one process is able to modify particular piece of data Not always available/supported via hardware and software

Describe Race Conditions.

Outcome depends on order of execution (timing).

What is the difference between parallelism and concurrency?

Parallelism (multiple tasks can be performed simultaneously) Concurrency (all tasks make progress)

Which of these is NOT a type of operating system?

Personal

_____ addresses are provided by the memory hardware

Physical

Give two examples each for physical and logical resources that if limited could cause deadlocks.

Physical Resources: 1) HDD 2) RAM Logical Resources: 1) Files 2) Semaphores

What is the difference between a policy and mechanism? Why should they be separate?

Policy - what will be done Mechanism - how will it be done Separating allows for changes in the policy without having to consider how to implement the policy (the mechanisms).

Describe Priority Inversion.

Preemption causes dependencies/priorities to get out-of-order

Name the two different types of scheduling and briefly describe their pros and cons.

Preemptive (can interrupt, more powerful, race conditions) Non-preemptive (cannot interrupt, simple, no race conditions)

Describe Circular Wait.

Prioritize resources and indirectly processes

There are 6 general types of system calls. List 4 of the types and briefly discuss tasks that can be carried out by them.

Process Control: Abort, Load, etc. File Management: Create, Copy, etc. Communication: Message Passing, etc. Protection: User access or permission.

Why is process synchronization needed?

Processes can share resources and must therefore be synchronized in order to maintain data integrity.

What is considered primarily during memory management?

Protection and performance

Describe Hold and Wait

Queue resource requests, limit number of requests a process is allowed to make

Describe the 3 types of parameter passing for system calls.

Registers: Easiest Address block: Stored in a block in memory. Stack: Pushed and popped off the stack.

_____ addresses are bound to absolute addresses

Relocatable

Directed edges from processes to resources mean ______

Requests

Name 3 process state transitions at which scheduling decisions need to be made and describe them.

Running -> Waiting (freeing up the CPU for the next process) Running -> Ready (freeing up the CPU for the next process, needs to be rescheduled) Waiting -> Ready (process needs to be scheduled accordingly) Running -> Terminate (process leaves the scheduling context)

Which of the following statements concerning open source operating systems is TRUE?

Source code is freely available

Describe Linking.

Stub code is replaced during execution if needed

Rate Memory for slow to fast (cheap to expensive).

Tape-> Optical Drive-> HDD-> SSD-> RAM-> Cache-> Registers

Describe Stack.

Temporary data, function parameter, return addresses, local variables

Which of these is NOT a type of user interface? Batch, Command-Line and Graphical.

They all are types of user interfaces

A program needs to be in memory to execute but not all of it needs to be there at all times. T/F

True

Files and folders are logical abstractions for physical storage. T/F

True

It is possible to have concurrency without parallelism. T/F

True

Operating system schedulers are responsible for order of task execution? T/F

True

The actual disk and the I/O bus it is connected to are often regarded as the two main parts of storage systems. T/F

True

The basic idea behind virtual memory is to extend existing memory using lower level storage (disk, etc.) as well. T/F

True

The operating system uses queues for cpu and I/O to keep track of a list of jobs in various states. T/F

True

Describe Deadlocks.

Two processes are waiting on each other.

Operating system services provide functionality that focuses on ease of use and convenience for users as well as efficiency for the system itself.

User (ease of use and convenience) Program execution I/O operations System (efficiency) Resource allocation Accounting

Discuss the user and system views for an operating system. How do the goals differ for each view? Discuss a few key differences associated with file management for BOTH the user and system views.

User: This involves ease of use and GUI access. The strong usability for the user. User file management is GUI based held within the storage. The idea is to give user direct access to these files. System View: This involves control and management of resources. The goal of this view is to facilitated resources required by the operating system. File management is a done based on what the OS is asking for (i.e. create, delete, copy, as required)..

Describe how an operating system can be viewed differently depending on the use case (e.g., administrators, users, developers, system engineers).

Users: All about ease of use. Simple GUI allowing for easy operation. Administrator: Command-line based. Access to deeper functions and custom operations, specified by Admin. In other words, allows for advanced customization of OS functionality. Developers: Code based. View and develop text based languages which create the foundation of how an OS operates.

Describe Starvation.

Using up all tokens of a semaphores

Describe the problem of virtual memory thrashing and possible solutions.

Virtual Memory Thrashing: This is when a processing is swapping memory back and forth, without accomplishing much of anything. Solutions 1) Keep what is required in memory 2) Monitor the page faults and adjust implementation as necessary.


Ensembles d'études connexes

Geology Exam 2 DSM & Quiz Questions

View Set

Chapter 2: Traditional and Contemporary Management Perspectives

View Set

Types of Informative Presentations

View Set

TestOut PcPro All of Chapter 9 Questions

View Set

Microbiology Homework Chapter 2 Study Guide

View Set

Chapter 6: Prices and Unemployment

View Set