Quiz 1 (CH 1 - 5)

Ace your homework & exams now with Quizwiz!

Briefly state the difference(s) between parallelism and concurrency.

A parallel system can perform more than one task simultaneously. A concurrent system supports more than one task by allowing multiple tasks to make progress.

Why do most modern operating systems use Hybrid systems structure?

Because Hybrid systems combine multiple approaches to address performance, security, usability needs, etc.

True or False: Each thread has its own register set and stack and data.

False

True or False: In RR scheduling, the time quantum should be small with respect to the context-switch time.

False

True or False: Interrupts may be triggered only by software.

False

True or False: The user-level library is supported by the kernel.

False

True or False: System calls can be run in user mode

False. they run in kernel mode

What are the two models of interporcess communication and what is the main difference between the two models.

Shared Memory & Message Passing The main difference is that kernel is not involved in Shared Memory, but it is in Message Passing.

_________ involves distributing data across multiple computing cores.

data parallelism

True or False: Direct communication uses a mailbox.

false

True or False: The difference between a program and a process is that a program is an active entity while a process is a passive entity.

false

A process control block ____.

includes information on the process's state

Bootstrap program is______

loaded at power-up or reboot, initializes all aspects of system, loads operating system kernel and starts execution

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

many-to-one model

Microkernels use _____ for communication.

message passing

Why are most modern applications multi-threaded?

most modern applications multi-threaded because most applications need to perform multiple tasks and each task is assigned to a separate thread for implementation

The _____ multithreading model multiplexes one user-level threads to one kernel thread.

one-to-one model

A blocking send() and blocking receive() is known as a(n) _________________

rendezvous

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

stack

A significant problem with priority scheduling algorithms is _____.

starvation

A microkernel is a kernel ____.

that is stripped of all nonessential components

The one program running at all times on the computer" is

the kernel

provides an API for creating and managing threads.

thread library

A ____ can be used to prevent a user program from never returning control to the operating system.

timer

True or False: Ready queue is where processes are ready and waiting to go to running state to execute.

true

True or False: Shared memory is typically faster than message passing.

true

The two separate modes of operating in a system are

user mode and kernel mode

The list of processes waiting for a particular I/O device is called a(n) ____.

waiting (or device) queue

List and briefly describe states of a process.

· New - the process is being created · Running - Instructions are being executed · Waiting - the process is waiting for some event to occur · Ready - the process is waiting to be assigned to a processor · Terminated - the process has completed execution

Explain the concept of a context switch.

· Switching the CPU from prom process to another requires performing a state save of the current process and state restore of a different process. This is called context switch. · Context Switching is considered, because the system does not do any useful work while switching.

Briefly explain why cluster systems are considered high-availability systems.

Clustered systems are considered high-availability in that these types of systems have redundancies capable of taking over a specific process or task in the case of a failure. The redundancies are inherent due to the fact that clustered systems are composed of two or more individual systems coupled together.

Which of the following would lead you to believe that a given system is a Symmetric Multiprocessing (SMP-type) system?

Each processor performs all tasks within the operating system.

Which of the following is true of multilevel queue scheduling?

Each queue has its own scheduling algorithm

Which of the following scheduling algorithms must be nonpreemtive? A. Priority algorithms B. RR C. FCFS D. SJF

FCFS

Briefly describe the purpose of interrupts and their implementation.

Interrupts are signals, generated by hardware or software. • Hardware interrupts - issued by hardware devices such as timers, disks, keyboard to notify CPU that an event has occurred that needs to be handled. CPU is directly involved in handling of the H/W generated interrupts. Kernel runs the appropriate routine for handling the H/W interrupt. • Software interrupts (trap or exception) - are software-generated interrupts, caused either by and error or a user request for I/O, communicated directly to kernel and handled by kernel which will schedule the I/O to occur. Interrupt handling (Implementation) • Because the normal flow of instruction execution has been stopped, a handler must preserve the state of the CPU at the time of interrupt by saving the registers and the program counter information, so when it finishes handling the interrupt, it would resume execution on CPU, from where it was before (according to Program Counter information) the interrupt occurred. There are many types of interrupts, handler determines which type of interrupt has occurred • Separate segments of code determine what action should be taken for each type of interrupt • Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines. • In order to quickly service these interrupts, systems often have an interrupt table with each kind of interrupt corresponding to a particular index in this table. Each entry of the table contains the memory address of a particular interrupt handler to execute. • Incoming interrupts are disabled while another one is being processed, to prevent a lost interrupt.

_____ allow each operating system service to be loaded dynamically (as needed) within the kernel.

Modules Explanation: The modular approach combines the benefits of both the layered and microkernel design techniques. In a modular design, the kernel needs only to have the capability to perform the required functions and know how to communicate between modules. However, if more functionalities (or services) are required in the kernel, then the user can dynamically load modules into the kernel either during the boot time or run time. The kernel can have sections with well-defined, protected interfaces, a desirable property found in layered systems. More flexibility can be achieved by allowing the modules to communicate with one another. So, in summary: Most modern operating systems implement kernel modules. This approach: • Uses object-oriented approach, • Each core component is separate, • Each talks to the others over known interfaces, and • Each is loadable as needed within the kernel.

Briefly describe the difference between Operating System services and System Program services.

Operating Systems Services, provide users with an environment and services for the execution of their programs. System Services provide an environment for program development and execution. • File manipulation • Status information sometimes stored in a file • Programming language support • Program loading and execution • Communications • Background services • Application programs

Explain the difference between response time and turnaround time.

Response time: is the amount of time it takes for a process to get the CPU for the first time after it arrives in ready queue. Response time = time at which the process gets the CPU for the first time - Arrival time. Turnaround time: is the total amount of time spent by the process from its arrival in the ready queue for the first time, until its completion time. Turnaround time = completion time - Arrival time

Explain the concept of a context switch.

Saving the state of the old process into its PCB and reloading the state of the new process from its PCB into the Running state.

Explain the process of starvation and how aging can be used to prevent it.

Starvation occurs when low priority processes don't get scheduled to go to the running state for execution. Aging allows the priority of the low priority processes to increase overtime, until it gets to be the highest in the Ready queue, and finally get selected by the scheduler to go to the Running state.

Briefly describe the purpose of system calls and their implementation.

Systems calls are requests from user applications for OS services, such as reading a file, writing to some device, or maybe even running another program. They are mostly accessed by programs via a high-level Application Programming Interface (API) rather than direct system call use System Call Implementation: • A number is assigned to each systems call. • System-call interface maintains a table indexed according to these numbers. • System-call interface invokes the intended system call in OS's Kernel and returns status of the system call and any return values. • System calls are requests from user processes for OS services.

_________ involves distributing tasks across multiple computing cores.

Task parallelism

List the four major categories of the benefits of multithreaded programming. Briefly explain each.

The benefits of multithreaded programming fall into the categories: · Responsiveness: means that a multithreaded program can allow a program to run even if part of it is blocked. · Resources sharing: occurs when an application has several different threads of activity within the same address space. Threads share the resources of the process to which they belong. · Economy: As a result of resource sharing, it is more economical to create new threads than new processes. · Scalability: a single threaded process can only execute on one processor regardless of the number of processors actually present. Multiple threads can run on multiple processors, thereby increasing efficiency.

What is the purpose of CPU scheduling? List and briefly explain some examples of CPU Scheduling algorithms.

The purpose of CPU scheduling is to maximize CPU utilization. Examples of CPU Scheduling algorithms: · FCFS: · SJF & Shortest-Remaining Job First: · Priority: · RR & Priority: · Multilevel Queue: · Multilevel Feedback Queue:

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

Throughput

What role does the dispatcher play in CPU scheduling?

To transfer the control of CPU from the (old) process that leaves the Running state, to the (new) process selected by the CPU Scheduler. This process involves context switching.

True or False: Application programmers typically use an API rather than directly invoking system calls.

True

True or False: CLI or Command Interpreter allows direct entry of user command, and its execution.

True

True or False: Direct memory access (DMA) is considered an efficient mechanism for performing I/O because it removes the CPU from being responsible for transferring data.

True

True or False: Round-robin (RR) scheduling degenerates to first-come-first-served (FCFS) scheduling if the time quantum is too long.

True

True or False: The logging service provided by Operating System, keeps track of system users and the type of computer resources they use.

True

True or False: Virtual memory allows execution of processes not completely in memory.

True

True or False: Virtualization allows operating systems to run applications within other operating systems.

True

____________ is the amount of time to execute a particular process.

Turnaround time

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

convoy effect

What are the advantages and disadvantages of a microkernel approach?

• Moves some of its services/functions from the kernel into user space, in which case it needs to communicate between user modules. • Uses message passing model for communication between user modules • Benefits: Easier to extend a microkernel Easier to port the operating system to new architectures More reliable (less code is running in kernel mode) More secure • Detriments: Performance overhead of user space to kernel space communication

What are the three general methods of passing system call parameters to the operating system?

• Passing parameters in registers • Parameters stored in a block or table, in memory, and address of block passed as a parameter in a register. • Parameters placed, or pushed, onto the stack by the program and popped off the stack by the OS.


Related study sets

guía de estudio para elaboración del examen

View Set

Pharmacology Chapters 56, 57, 58

View Set

Unit 1: Challenge 1 and Challenge 2

View Set

Classical Art & Archeology - Quiz 8

View Set

نظم معلومات محاسبية

View Set

1.8 - c++ standard library TO 1.12 - basics of a typical c++ environment

View Set