OS Concepts Exam 1

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

Which of the following models are possible for the relationship between the user threads and kernel threads? (a)all of them(b)one-to-one model(c)many-to-many model(d)many-to-one model

A

Which of the following refers to the capability to allow multiple tasks make progress on a single processor system? (a)concurrency(b)parallelism(c)data parallelism(d)task parallelism

A

What does priority inversion refer to?

A phenomenon in which a better-priority process is slowed by waiting on a resource held by a worse-priority process

"Ans: A Feedback: 3.5.2 Difficulty: Moderate"

"10 . Which of the following is true in a Mach operating system? A) All messages have the same priority. B) Multiple messages from the same sender are guaranteed an absolute ordering. C) The sending thread must return immediately if a mailbox is full. D) It is not designed for distributed systems."

","Ans: D Feedback: 3.6.1 Difficulty: Moderate"

"11.When communicating with sockets a client process initiates a request for a connection and is assigned a port by the host computer. Which of the following would be a valid port assignment for the host computer? A) 21 B) 23 C) 80 D) 1625

"Ans: B Feedback: 3.6.3.2 Difficulty: Moderate"

"12. A(n) ______________ allows several unrelated processes to use the pipe for communication. A) named pipe B) anonymous pipe C) LIFO D) ordinary pipe"

Which of the following is a synchronous signal? (a)illegal memory access(b)division by zero(c)terminating a process with specific keystrokes(d)none of the them

A

12. The close() system call in UNIX is used to close a file. What is the equivalent system call in Windows? A) CloseHandle() B) close() C) CloseFile() D) Exit()

A) CloseHandle()

Which of the following scheduling algorithms gives the minimum average response time? A) SJF B) FCFS C) RR D) Multilevel queue

A) SJF

Which of the following scheduling algorithms gives the minimum average waiting time for a given set of processes? A) SJF B) FCFS C) RR D) Multilevel queue

A) SJF

Which of the following information is shared when the flag CLONE_VM is set up? (a)file-system information(b)memory space(c)signal handlers(d)set of open files

B

Which of the following process state will be switched from "running" state when an interrupt occurs?(a)terminated(b)ready(c)waiting(d)new

B

___________ is a formula that identifies potential performance gains from adding additional computing cores to an application that has a parallel and serial component. (a)Task parallelism(b)Amdahl's Law(c)Data parallelism(d)Data splitting

B

Which of the following system calls is used to have a new program loaded into the new process's memory space? A) fork() B) exec() C) wait() D) exit()

B) exec()

Which of the following principles is used for adding and removing items from a stack? A) first in first out (FIFO) B) last in first out (LIFO) C) random order D) round robin

B) last in first out (LIFO)

Which of the following data structure is used to manage the processes in Linux? A) tree B) linked list C) hash map D) stack

B) linked list

Which of the following is tertiary storage medium? A) register B) magnetic tapes C) main memory D) hard-disk drive

B) magnetic tapes

Which of the following IPC mechanism is easier to implement in a distributed system? A) shared memory B) message passing C) socket communication D) ordinary pipe

B) message passing

13. The Windows CreateFile() system call is used to create a file. What is the equivalent system call in UNIX? A) ioctl() B) open() C) fork() D) createfile()

B) open()

28 A boot block ____. A) typically only knows the location and length of the rest of the bootstrap program B) typically is sophisticated enough to load the operating system and begin its execution C) is composed of multiple disk blocks D) is composed of multiple disk cylinders

A) typically only knows the location and length of the rest of the bootstrap program

A hard disk drive has 16 platters, 8192 cylinders, and 256 4KB sectors per track. The storage capacity of this disk drive is at most A) 128 TB. B) 32 TB. C) 32 GB. D) 128 GB.

C) 32 GB.

Which of the following is true? A) No deadlock implies no starvation; B) No starvation implies no deadlock; C) Deadlock doesn't imply starvation; D) Starvation implies deadlock.

C) Deadlock doesn't imply starvation;

Why can we not address deadlocks by avoiding mutual exclusion?

Because the need for mutual exclusion cannot be avoided

Which of the following is a method for implicit threading? (a)thread pools(b)OpenMP(c)all of them(d)grand central dispatch

C

T/F - Once the process is allocated CPU, it is not possible for the process to create a subprocess.

False

T/F, symmetric and asymmetric communication - A benefit of symmetric communication is that provides a queue with indefinite length; thus ensuring the sender will never have to block while waiting to copy a message.

False

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

Interrupt latency - period of time from the arrival of an interrupt at the CPU to the starts of the routine that services the interrupt Dispatch latency - amount of time required for the scheduling dispatcher to stop one process and start another

Advantages of open source

It is available in both source and binary format, it is available to public and anyone can review and contribute, and operating systems can be read inside out and certain answers can be obtained by looking at the code

Which of these is a reason not to disable interrupts in critical sections?

It will negatively impact system stability

Program that runs at all times in a computer

Kernel

When there is an interrupt to a process, then what is the stage that the process will move into?

Ready

Define clustered/interactive systems

These systems combine multiple computers into a single system to perform computational tasks distributed across the cluster / This system is composed of many short transactions where the results of the next transaction maybe unpredictable - quick response time needed

The buddy system for allocating kernel memory is very likely to cause fragmentation within the allocated segments.

True

The circular-wait condition for a deadlock implies the hold-and-wait condition.

True

What resources must be managed carefully in workstations compared to servers?

CPU and memory

Difference between CPU scheduling and job scheduling?

CPU scheduling is choosing between several jobs that are ready to run, while job scheduling is choosing among several jobs to be brought into memory

Which of these is true of a critical section?

Can destructively interfere with, or be interfered with by, another process

Higher level requests are translated into a sequence of system calls using what?

Command interpreter and Shell

What is a disadvantage of the FCFS scheduling algorithm?

Waiting time depends on arrival order Convoy effect: short process stuck waiting for long process Head of the line blocking

Scheduling, T/F - In multiprocessing there is no difference between medium-term, and long term scheduling.

False

As processes enter the system, they are put into a ...

job queue

One of the advantages of using a .......... system is to provide high availability which is obtained through redundancy.

clustered

Which of the following contains local data?(a)stack section(b)data section(c)heap section(d)text section

A

(T/F) Load balancing algorithms have no impact on the benefits of processor affinity.

False

(T/F) Load balancing is typically only necessary on systems with a common run queue.

False

A maskable interrupt can never be disabled.

False

The default scheduling class for a process in Solaris is ____. A) time sharing B) system C) interactive D) real-time

A) time sharing

A mutex lock is released immediately after entering a critical section.

False

Disk controllers do not usually have a built-in cache.

False

Reentrant code cannot be shared. True False

False

KDE and GNOME run on..

Linux OS

Ans: D

"1. The ____ of a process contains temporary data such as function parameters return addresses, and local variables. A) text section B) data section C) program counter D) stack"

Describe the compute-server and file-server types of server systems.

----file-serve system provides a file-system interface where clients can create, update, read, and delete files. An example of such a system is a web server that delivers files to clients running web browsers. The actual contents of the files can vary greatly, ranging from traditional web pages to rich multimedia content such as high-definition video. ----compute-server system provides an interface to which a client can send a request to perform an action (for example, read data). In response, the server executes the action and sends the results to the client. A server running a database that responds to client requests for data is an example of such a system.

Explain cache coherency.

---In multiprocessor environments, two copies of the same data may reside in the local cache of each CPU. Whenever one CPU alters the data, the cache of the other CPU must receive an updated version of this data. --the coordination of the contents of caches such that an update to a value stored in one cache is immediately reflected in all other caches that hold that value.

Describe cloud computing.

--A computing environment in which hardware, software, or other resources are made available to customers across a WAN, such as the Internet, usually with APIs for management. A type of computing that delivers computing, stor- age, and even applications "as a service" across a network.

Why is main memory not suitable for permanent program storage or backup purposes? Furthermore, what is the main disadvantage to storing information on a magnetic disk drive as opposed to main memory?

--loses its content when power is turned off or otherwise lost—we cannot trust it to hold the bootstrap program. --too small to store all needed programs and data permanently. -BC magnetic disk drives are much slower

Distinguish between system and application programs.

--system programs : associated with the operating system (not necessarily apart of kernel); programs that manage the computer hardware and the programs that run on them. ex: operating systems, utility programs, software development tools --application programs: all programs not associated with operation of the system; programs that provide services to the user. ex: word processing, games, programs to solve specific problems

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

1) no thread may be executing in its critical section if a thread is currently executing in its critical section. 2) only threads that are not executing in their critical sections can participate in the decision on which process will enter its critical section next. 3) a bound must exist on the number of times that other threads are allowed to enter their critical state after a thread has made a request to enter its critical state.

A disk that has a boot partition is known as

A system disk or boot disk

Which of the following can be a solution to the problem of indefinite blockage of low-priority processes? A) Aging B) Starvation C) Multilevel queue D) All of the above

A) Aging

Which of the following is true in a Mach operating system? A) All messages have the same priority. B) Multiple messages from the same sender are guaranteed an absolute ordering. C) The sending thread must return immediately if a mailbox is full. D) It is not designed for distributed systems.

A) All messages have the same priority.

Which of the following is true? A) An I/O-bound process is one that spends more of its time doing I/O than it spends doing computations B) An I/O-bound process is one that spends more of its time doing computations than it spends doing I/O C) Both A and B D) None of the above

A) An I/O-bound process is one that spends more of its time doing I/O than it spends doing

Which of the following selects from among the processes that are in the ready queue to execute and allocate the CPU to one of them? A) CPU scheduler B) context switch C) swapping D) job scheduler

A) CPU scheduler

31. _____ is/are not a technique for passing parameters from an application to a system call. A) Cache memory B) Registers C) Stack D) Special block in memory

A) Cache memory

Which of the following technology reduces the overhead for bulk data movement? A) Direct Memory Access (DMA) B) Non-uniform Memory Access (NUMA) C) Symmetric Multiprocessing (SMP) D) Storage Area Network (SAN)

A) Direct Memory Access (DMA)

Which of the following disk head scheduling algorithms does not take into account the current position of the disk head? A) FCFS B) C-SCAN C) SCAN D) All scheduling algorithms take into account the current position of the disk head

A) FCFS

2. Which of the following is an inter-process communication that requires two processes share memory? A) message passing B) shared memory C) socket communication D) all of the above

A) MESSAGE PASSING

____ operating systems are designed primarily to maximize resource utilization. A) PC B) Handheld computer C) Mainframe D) Network

A) PC

Which of the following is a software-based solution to the critical-section problem? A) Peterson's solution B) test_and_set C) compare_and_swap D) all of the above

A) Peterson's solution

Shortest-remaining-time-first scheduling is the preemptive version of __________? A) SJF B) FCFS C) RR D) Multilevel queue

A) SJF

Component that measures elapsed time and to trigger operations is called a A) programmable interval timer. B) high performance event timer. C) network time protocol. D) socket.

A) programmable interval timer.

Which of the following is true for race condition? A) race condition occurs where several processes access and manipulate the same data concurrently B) when race condition occurs, the outcome of the execution depends on the particular order in which the access takes place C) both of the above D) none of the above

A) race condition occurs where several processes access and manipulate the same data concurrently

The device controller _____ an interrupt by asserting a signal on the interrupt request line. A) raises B) catches C) dispatches D) clears

A) raises

Which of the following is NOT secondary storage device? A) random access memory B) solid state disks C) optical disk D) magnetic tape

A) random access memory

Which of the following process state will be switched from "running" state when an interrupt occurs? A) ready B) terminated C) waiting D) new

A) ready

What are the two components of positioning time? A) seek time + rotational latency B) transfer time + transfer rate C) effective transfer rate - transfer rate D) cylinder positioning time + disk arm positioning time

A) seek time + rotational latency

Which of the following structures defines the process control block for Linux system? A) task_struct B) files_struct C) mm_struct D) schedu_entity

A) task_struct

Which of the following contains the executable code? A) text section B) data section C) heap section D) stack section

A) text section

Number of sectors per track increases as we move from inner zone to outer zone, because A) the drive can increase its rotation speed as the head moves from the outer to the inner tracks. B) the drive can decrease its rotation speed as the head moves from the outer to the inner tracks. C) angular velocity of disk rotation can vary. D) angular velocity of disk rotation can remain constant.

A) the drive can increase its rotation speed as the head moves from the outer to the inner tracks.

Anonymous memory of a process refers to A) the pages not associated with the binary executable file of the process. B) the pages associated with the binary executable file of the process. C) the pages associated with the static data of the process. D) the pages that cannot be swapped out of the physical memory.

A) the pages not associated with the binary executable file of the process.

4. Which of the following is a user interface where human fingers slide across the screen or press buttons to select choices? A) touch screen B) graphical user interface C) command line D) voice control

A) touch screen

In a blocking system call, the execution of a process is suspended A) until the process is woken up by some other process. B) until a fixed amount of time has elapsed. C) the kernel raises the priority of that process. D) the I/O has completed.

A) until the process is woken up by some other process.

Which of these is a problem with all forms of priority-based scheduling?

Allows starvation of low-priority processes

Which of the following contains global data? A) text section B) data section C) heap section D) stack section

B) data section

32. If a program terminates abnormally, a dump of memory may be examined by a ____ to determine the cause of the problem. A) module B) debugger C) shell D) control card

B) debugger

34. Policy ____. A) determines how to do something B) determines what will be done C) is not likely to change across places D) is not likely to change over time

B) determines what will be done

What does the program counter do?

Specifies the next instruction to execute in a single thread process

Which of the following is preemptive? A) rate-monotonic scheduling B) earliest-deadline-first scheduling C) both of the above D) none of the above

B) earliest-deadline-first scheduling

Which of the following contains the addresses of all the service routines? A) page table B) interrupt vector C) system call table D) file descriptor table

B) interrupt vector

Which of the following critical-section problem's requirements limits the amount of time a program will wait before it can enter its critical section? A) mutual exclusion B) progress C) bounded waiting D) none of the above

B) progress

Name some shells in UNIX and Linux Systems

Bourne Shell, Bourne Again Shell, Korn Shell, C Shell

One technique for implementing lottery scheduling works by assigning processes lottery tickets, which are used for allocating CPU time. Whenever a scheduling decision has to be made, a lottery ticket is chosen at random, and the process holding that ticket gets the CPU. The BTV operating system implements lottery scheduling by holding a lottery 50 times each second, with each lottery winner getting 20 milliseconds of CPU time (20 milliseconds × 50 = 1 second). Describe how the BTV scheduler can ensure that higher-priority threads receive more attention from the CPU than lower-priority threads.

By assigning more lottery tickets to higher-priority processes.

Which are included in the context of a thread?(a)stacks(b)private storage area(c)all of them(d)register set

C

Which of the following contains dynamically allocated data during program run time?(a)data section(b)text section(c)heap section(d)stack section

C

Which of the following contains global data?(a)heap section(b)text section(c)data section(d)stack section

C

Which of the following is an asynchronous signal? (a)none of the them(b)illegal memory access(c)terminating a process with specific keystrokes(d)division by zero

C

Which of the following system calls is used to let the parent process create a child process?(a)wait();(b)exec().(c)fork();(d)abort();

C

Consider a disk queue holding requests to the following cylinders in the listed order: 210, 67, 11, 99, 87, 90, 19, 150. Using the C-SCAN scheduling algorithm, what is the order that the requests are serviced, assuming the disk head is at cylinder 88 and moving upward through the cylinders? A) 87 - 90 - 99 - 67 - 19 - 11 - 150 - 210 B) 210 - 67 - 11 - 99 - 87 - 90 - 19 - 150 C) 90 - 99 - 150 - 210 - 11 - 19 - 67 - 87 D) 90 - 99 - 150 - 210 - 87 - 67 - 19 - 11

C) 90 - 99 - 150 - 210 - 11 - 19 - 67 - 87

I/O-bound program typically has many short ______ and a CPU-bound program might have a few long __________. A) I/O burst, CPU burst B) I/O burst, I/O burst C) CPU burst, CPU burst D) CPU burst, I/O burst

C) CPU burst, CPU burst

Solid state disks (SSDs) commonly use the ___________ disk scheduling policy. A) C-SCAN B) SCAN C) FCFS D) None of the above

C) FCFS

Which of the following scheduling algorithms must be nonpreemptive? A) SJF B) RR C) FCFS D) priority algorithms

C) FCFS

Which of the following is the denotation of 10243 bytes? A) KB B) MB C) GB D) TB

C) GB

In what way is an operating system like a government? A) It seldom functions correctly. B) It creates an environment within which other programs can do useful work. C) It performs most useful functions by itself. D) It is always concerned primarily with the individual's needs.

C) It performs most useful functions by itself.

1. Which of the following statements is incorrect? A) An operating system provides an environment for the execution of programs. B) An operating system manages system resources. C) Operating systems provide both command line as well as graphical user interfaces. D) Operating systems must provide both protection and security.

C) Operating systems provide both command line as well as graphical user interfaces.

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

True

Scheduling, T/F - Long-term is used much less often since it handles placing jobs in the system and may wait a while for a job to finish before it admits another one.

True

Scheduling, T/F - The primary difference is in the frequency of their execution.

True

Scheduling, T/F - The short term must select a new process quite often.

True

Solid state disks (SSDs) commonly use the FCFS disk scheduling algorithm.

True

Stack algorithms can never exhibit Belady's anomaly

True

T/F - CPU bound process spends more time in computations than generating I/O requests.

True

T/F - Flash memory is slower than DRAM but needs no power to retain its contents.

True

T/F - If an RPC mechanism could not support either the "at most once" or "at least once" semantics, then the RPC server cannot guarantee that a remote procedure will not be invoked multiple occurrences.

True

T/F - Main memory is a volatile storage device that loses its contents when power is turned off or otherwise lost.

True

T/F - Most computer systems provide secondary storage as an extension of main memory. The main requirement for secondary storage is that it be able to hold large quantities of data permanently.

True

T/F - One class of services provided by an operating system is to enforce protection between different processes running concurrently in the system. Processes are allowed to access only those memory locations that are associated with their address spaces. Also, processes are not allowed to corrupt files associated with other users. A process is also not allowed to access devices directly without operating system intervention.

True

T/F - Solid-state disks have several variants but in general are faster than magnetic disks and are nonvolatile.

True

T/F - The command interpreter is usually separated from the kernel. It is usually not part of the kernel since the command interpreter is subject to changes.

True

T/F, symmetric and asymmetric communication - A benefit of symmetric communication is that it allows a rendezvous between the sender and receiver.

True

T/F, symmetric and asymmetric communication - A disadvantage of a blocking send is that a rendezvous may not be required and the message could be delivered asynchronously; received at a point of no interest to the sender.

True

The banker's algorithm is useful in a system with multiple instances of each resource type.

True

The most complex scheduling algorithm is the multilevel feedback-queue algorithm.

True

The preemptive kernel is more suitable for real-time programming than non-preemptive kernel.

True

What does the circular-wait requirement for deadlocks to occur mean?

Two or more processes are all waiting on each other

Which of these is not a function of a mutex lock?

Count

What ISN'T a part of process management?

Creating and deleting user and system programs

Assume the shared buffer is implemented as a circular array with two logical pointers: in and out. The variable in points to the next free position in the buffer; out points to the first full position in the buffer. Which of the following is true?(a)All the elements of the buffer can be used;(b)all of them(c)The buffer is full when in == out; the buffer is empty when ((in + 1) % BUFFER SIZE) == out;(d)The buffer is empty when in == out; the buffer is full when ((in + 1) % BUFFER SIZE) == out;

D

If process P0 is switched to process P1, state for P0 will be saved into ____, and state from ___ will be reloaded?(a)PCB0, PCB0(b)PCB1, PCB1(c)PCB1, PCB0(d)PCB0, PCB1

D

To associate each thread created using an implicit technique such as a thread pool, with its unique transaction identifier, we could use ____?(a)local variable(b)static data(c)global variable(d)thread-local storage

D

Which of the following cases could force a process removed from the CPU?(a)interrupt or time slice expired(b)I/O request(c)fork a child(d)all of them

D

Which of the following contains the executable code?(a)heap section(b)stack section(c)data section(d)text section

D

Which of the following process state will be switched from "running" state when an I/O event occurs?(a)new(b)terminated(c)ready(d)waiting

D

What is "dual mode" operation?

Division of the CPU instruction set into distinct modes for user programs and the OS

(T/F) In RR scheduling, the time quantum should be small with the respect to the context-switch time.

False

A monitor is an abstract data type that is based on semaphore implementation.

False

A relocation register is used to check for invalid memory addresses generated by a CPU.

False

Fragmentation does not occur in a paging system.

False

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

False

In general, SCAN disk head scheduling will involve less movement of the disk heads than C-SCAN disk head scheduling.

False

SCAN disk head scheduling offers no practical benefit over FCFS disk head scheduling.

False

T/F - Assume a system that has 5 layers. When debugging a issue, we have debugged till the second layer. This indicates all the layers from 2 - 5 are working properly and only the first layer must be debugged.

False

T/F - Cache storage is a permanent storage?

False

T/F - Mechanism decides what will be done and Policies determine how it will be done.

False

T/F - Parent process cannot terminate the child process even if the child process has exceeded its usage of resources.

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

ESSAY QUESTION Describe Operating System structure services

common services offered by the O.S for the user and programmers to execute programs.

Name 2 system utilities

File Management and File Modification

Name 3 system calls

File manipulation, Device manipulation, and Information maintenance

Which of these would transition a process from running to terminated?

Finishing its last instruction

Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB (in order)? Rank the algorithms in terms of how efficiently they use memory.

First fit: 115 -> 300 500-> 600 358 -> 750 200 -> 350 375 -> not able to allocate Best fit: 115 -> 125 500 -> 600 358 -> 750 200 -> 200 375 -> not able to allocate Worst fit: 115 -> 750 500 -> 600 358 -> not able to allocate 200 -> 350 375 -> not able to allocate

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

For a set of processes to be deadlocked: at least one resources must remain in a nonsharable mode, a process must hold at least one resource and be waiting to acquire additional resources held by other processes, resources in the system cannot be preempted, and a circular wait has to exist between processes.

The ability to continue providing service proportional to the level of surviving hardware

Graceful degradation

Which of these is a characteristic of processes in the ready queue?

Have all resources required to execute

Multiprogramming vs Timesharing

Have some process running at all times to maximize CPU utilization / switch the CPU among processes so frequently that users can interact with each program while it is running

Which of these is a condition required for a deadlock to occur?

Hold-and-wait

ESSAY QUESTION There are two different ways that commands can be processed by a command interpreter. One way is to allow the command interpreter to contain the code needed to execute the command. The other way is to implement the commands through system programs. Compare and contrast the two approaches.

IN The 1st approach upon the user issuing a command, interpreter jumps to the appropriate section of code, execute the command, and returns control back to user. (ADV: Speed & simplicity; DISADV: New command require rewriting the interpreter program, which can get messy, complicated, & large) in 2nd approach, the interpreter loads the appropriate program into memory along with the appropriate agruement. (adv: new commands can be added w/o altering command interpreter; disadv: reduced speed & passing of parameters from interpreter to system programs.)

Which of these is not a problem with the FIFO scheduler?

Impossible to implement in the general case

Define real time/distributed systems

Often used in a dedicated application - reads information from sensors and must respond within a fixed amount of time to ensure correct performance / This system distributes computation among several physical processors that have their own local memory. They communicate with other through various comm lines

Describe why multi-core processing is more efficient than placing each processor on its own chip.

multi processor increases the number of processors able to run on the chip.( in turn there will also be more CPU/NODES) this increases the throughput (get more work done in less time)

Zombie process vs Orphan process

process that has completed execution but still has an entry in the process table: it is a process in the "Terminated state" / a process who parent process no longer exists i.e. either finished or terminated without waiting for its child process to terminate

What is true about an operating system?

program that manages the computer hardware - acts as an intermediary between the computer user and the computer hardware, and provides a basis for application programs.

For Status information certain systems support __________ which can be used to store and retrieve information about the configuration.

registry

ESSAY QUESTION What kernel data structure can be used for one technique of passing parameters to system calls

stack

Define a clustered system

used to distribute network connections among a pool of similar servers

ESSAY QUESTION What are the two basic goal groups that must be considered when designing an operating system?

user and system goal groups.

Computer systems can be divided into four approximate components. What are they?

user, hardware, operating system, application programs

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

F

When fork() is invoked, it is passed a set of flags that determine how much sharing is to take place between the parent and child tasks.

F

The process runs with effective UID all the time until the process is stopped. (T/F)

FALSE

True/False Questions An initial bootstrap program is in the form of random-access memory (RAM).

FALSE

True/False Questions Applications compiled on one operating system can be directly executable on other operating systems due to common structure.

FALSE

True/False Questions System calls can be run in either user mode or kernel mode.

FALSE

True/False Questions iOS is open source; Android is closed source.

FALSE

"Ans:A Feedback: 3.4 Difficulty: Moderate"

"13. Which of the following statements is true? A) Shared memory is typically faster than message passing. B) Message passing is typically faster than shared memory. C) Message passing is most useful for exchanging large amounts of data. D) Shared memory is far more common in operating systems than message passing."

"Ans:C Feedback: 3.6.1 Difficulty: Moderate"

"14. Imagine that a host with IPaddress 150.55.66.77 wishes to download a file from the web server at IPaddress 202.28.15.123. Select a valid socket pair for a connection between thispair of hosts. A) 150.55.66.77:80 and202.28.15.123:80 B) 150.55.66.77:150 and202.28.15.123:80 C) 150.55.66.77:2000 and202.28.15.123:80 D) 150.55.66.77:80 and202.28.15.123:3500"

"Ans:B Feedback: 3.6.3.1 Difficulty: Moderate"

"15. Child processes inherit UNIX ordinary pipes from their parent process because: A) The pipe is part of the code and children inherit code from their parents. B) A pipe is treated as a file descriptor and child processes inherit open file descriptors from their parents. C) The STARTUPINFO structure establishes this sharing. D) All IPC facilities are shared between the parent and child processes."

"Ans: C Feedback: 3.6.3 Difficulty: Moderate"

"16. Which of the following statements is true? A) Named pipes do not allow bi-directional communication. B) Only the parent and child processes can use named pipes for communication. C) Reading and writing to ordinary pipes on both UNIX and Windows systems can be performed like ordinary file I/O. D) Named pipes can only be used by communicating processes on the same machine."

"Ans: C Feedback: 3.4 Difficulty: Medium"

"17. Which of the following is not a process type in the Chrome browser? A) Plug-in B) Renderer C) Sandbox D) Browser"

"Ans: D Feedback: 3.2.3 Difficulty: Easy"

"18. The ________ application isthe application appearing on the display screen of a mobile device. A) main B) background C) display D) foreground"

,"Ans: A Feedback: 3.3.2 Difficulty: Medium"

"19. A process that has terminated but whose parent has not yet called wait(), is known as a ________process. A) zombie B) orphan C) terminated D) init"

"Ans: B Feedback: Difficulty: Medium Short Answer"

"20. The _______ process is assigned as the parent to orphan processes. A) zombie B) init C) main D) renderer"

"Ans: B Feedback: 3.2.1 Difficulty: Easy"

"3. The list of processes waiting for a particular I/O device is called a(n) ____. A) standby queue B) device queue C) ready queue D) interrupt queue"

"Ans: False Feedback: 3.1.1 Difficulty: Easy"

"36. The difference between a program and a process is that a program is an active entity while a process is a passive entity."

"Ans: False Feedback: 3.3.1 Difficulty: Easy"

"37. The exec()system call creates a new process."

"Ans: False Feedback: 3.5.1 Difficulty: Easy"

"38. All access to POSIX sharedmemory requires a system call."

"Ans: True Feedback: 3.5.3 Difficulty: Easy"

"39. Local Procedure Calls inWindows XP are similar to Remote Procedure Calls."

"Ans: C Feedback: 3.2.2 Difficulty: Easy"

"4. The _____________ refers to the number of processes in memory. A) process count B) long-term scheduler C) degree of multiprogramming D) CPU scheduler"

.","Ans: True Feedback: 3.1.2 Difficulty: Easy"

"40. For a single-processor system there will never be more than one process in the Running state

"Ans: False Feedback: 3.4.2 Difficulty: Easy"

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

"Ans: True Feedback: 3.6.3.1 Difficulty: Easy"

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

"Ans: True Feedback: 3.6.3.1 Difficulty: Easy"

"43.Ordinary pipes in Windows require a parent-child relationship between the communicating processes."

"Ans: True Feedback: 3.5.3 Difficulty: Moderate"

"44. Using a section object to pass messages over a connection port avoids data copying."

"Ans: True Feedback: 3.6.1 Difficulty: Easy"

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

"Ans: False Feedback: 3.6.1 Difficulty: Moderate"

"46. Sockets are considered ahigh-level communications scheme."

"Ans: True Feedback: 3.5.2 Difficulty: Moderate"

"47. The Mach operating system treats system calls with message passing."

"Ans:True Feedback: 3.6.3.2 Difficulty: Easy"

"48. Named pipes continue to exist in the system after the creating process has terminated."

"Ans: False Feedback: 3.4 Difficulty: Medium"

"49. A new browser process is create by the Chrome browser for every new website that is visited."

","Ans: D Feedback: 3.3.1 Difficulty: Easy"

"5. When a child process is created which of the following is a possibility in terms of the execution oraddress space of the child process? A) The child process runsconcurrently with the parent. B) The child process has a newprogram loaded into it. C) The child is a duplicate ofthe parent. D) All of the above

"Ans: True Feedback: 3.2.3 Difficulty: Medium"

"50. The iOS mobile operating system only supports a limited form of multitasking."

"Ans: C Feedback: 3.2.3 Difficulty: Easy"

"6. A _________________ saves the state of the currently running process and restores the state of the next process to run. A) save-and-restore B) state switch C) context switch D) none of the above"

"Ans: D Feedback: 3.1.2 Difficulty: Easy"

"7. A process may transition to the Ready state by which of the following actions? A) Completion of an I/O event B)Awaiting its turn on the CPU C) Newly-admitted process D) All of the above"

,"Ans: A Feedback: 3.4.2 Difficulty:Easy 9. A blocking send"

"8. In a(n) ____ temporary queue the sender must always block until the recipient receives the message. A) zero capacity B) variable capacity C) bounded capacity D) unbounded capacity"

"Ans: B Feedback: 3.4.2.2 Difficulty:Easy"

"9. A blocking send()and blocking receive()is known as a(n) _________________ A) synchronized message B) rendezvous C) blocked message D) asynchronous message"

"Ans: True Feedback: 3.3.2 Difficulty: Hard"

"True/False 35. All processes in UNIX first translate to a zombie process upon termination."

Suppose that the following processes arrive for execution at the times indicated. Each process will run for the amount of time listed. In answering the questions, use non-preemptive scheduling, and base all decisions on the information you have at the time the decision must be made. a.) What is the average turnaround time for these processes with the FCFS scheduling algorithm? b.) What is the average turnaround time for these processes with the SJF scheduling algorithm? c.) The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is left idle for the first 1 unit and then SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase. This algorithm could be called future-knowledge scheduling.

((P1's waiting time + P1's burst time) + (P2's waiting time + P2's burst time) + (P1's waiting time + P1's burst time)) / 3 a. ((0 + 8) + (7.6 + 4) + (11+ 1) ) / 3 = 10.5333 b. ((0 + 8) + (8.6 + 4) + (7+ 1) ) / 3 = 9.5333 c. ((6 + 8) + (1.6 + 4) + (0+ 1) ) / 3 = 6.866

Assuming a 1-KB page size, what are the page numbers and offsets for the following address references (provided as decimal numbers): a.) 3085 b.) 42095 c.) 215201 d.) 650000 e.) 2000001

(Page #, Offset) a.) 3, 13 b.) 41, 111 c.) 210, 161 d.) 634, 784 e.) 1953, 129

A process control block (PCB ) includes

(Partially correct) Process state, list of open files, CPU registers, program counter

The operating system is responsible for..

- Creating and deleting files -Creating and deleting directories to organize files -Mapping files onto secondary storage

Name two differences between a rate-monotonic and an EDF scheduler. What is the primary advantage of an EDF?

- EDF scheduling does not require that processes be periodic, a process doesn't require a constant amount of CPU time per burst, and priorities are dynamic. - The appeal of EDF scheduling is that it is optimal - theoretically, it can schedule processes so that each process can meet its deadline requirements and CPU utilization will be 100%

What happens when a new process is created?

- It waits until some or all of its children have terminated - It continues to execute concurrently with its children

What are the methods for passing parameters to the operating system?

- Parameters can be placed, or pushed, onto the stack by the program, and popped off the stack by the operating system - Pass parameters in registers - Registers pass starting addresses of blocks of parameters.

Scheduling - Short-term / Medium-term / Long-term

- Selects jobs in memory that are ready to execute and allocates CPU to them - typically used in time-sharing systems, swapping scheme is implemented to remove partially run programs from memory and reinstates them later to resume where they left off - determines which jobs are brought into memory for processing

What are the major activities of an operating system in regard to file management?

- The backup of files on stable (nonvolatile) storage media - The creation and deletion of directories - The creation and deletion of files - The mapping of files onto secondary storage

Once the process is allocated the CPU and is executing, which one of the following could occur?

- The process could be removed forcibly from the CPU, as a result of an interrupt,and be put back in the ready queue - The process could issue an I/O request and then be placed in an I/O queue - The process could create a new child process and wait for the child's termination.

As a process executes, it changes state. The state of a process is defined in part by the current activity of that process. Describe the process states - New - Running - Waiting - Ready - Terminated

- The process is being created - Instructions are being executed - The process is waiting for some event to occur - The process is waiting to be assigned a processor - The process has finished execution

T/F, Named pipes - Communication can be bidirectional, and no parent-child relationship is required - Once a named pipe is established, several processes can use it for communication - named pipes continue to exist after communicating processes have finished - Just UNIX (not Windows) system support named pipes

- True - True - True - False

Explain the purpose of an interrupt vector.

- contains the addresses of all the service routines -indexed by a unique number, given with the interrupt request, to provide the address of the interrupt service routine for the interrupting device.

Explain the difference between protection and security.

-Protection measures control the access of processes or users to the resources made available by the computer system. -Security: defense of the system against internal and external attacks

What is true of a timer

-It can be set to interrupt the computer after a specified period -A counter is maintained to decide the time that each program must run -It prevents a user program from getting stuck in an infinite loop -Time period can be fixed or variable

What is the difference between policy and mechanism?

-Mechanisms determine how to do something; -policies determine what will be done.

Describe the differences between physical, virtual, and logical memory.

-Physical memory is RAM; Actual location in physical memory of code or data. -LOGICAL Memory as viewed by the user; usually a large uniform array, not matching physical memory in virtual memory systems. -VirtualT : A technique that allows the execution of a process that is not completely in memory; The logical view of how a process is stored in memory.

Explain the difference between singly, doubly, and circularly linked lists.

-SLL: each item points to its successor, -DLL: a given item can refer either to its predecessor or to its successor -CLL: last element in the list refers to the first element, rather than to null

ESSAY QUESTION What are the advantages of using a higher-level language to implement an operating system?

-code can be written faster more compact easier to understand and debug. -improvements in compiler technology will improve the generated code for the entire O.S by simple recompilation. -O.S will be made easier to move to some other hardware

What role do device controllers and device drivers play in a computer system?

-device controller : responsible for moving the data between the peripheral devices that it controls and its local buffer storage. -device driver: understands controller and provides the rest of the operating system with a uniform interface to the device.

ESSAY QUESTION Describe three general methods used to pass parameters to the operating system during system calls.

-pass parameters in registers -parameters stored in block, table, of memory and address of blocks are stored in registers -placed or pushed onto the stack by the program and popped off the stack by the O.S

What factors are important to the performance of the cache?

-replacement policy -cache size

What is a bootstrap program, and where is it stored?

-stored within the computer hardware in firmware. -locate the operating-system kernel and load it into memory; load the operating system and start executing that program

Explain why an operating system can be viewed as a resource allocator.

-the o.s acts as the manager for the resources. -facing numerous and conflicting requests the o.s must decide how to allocate them to specific programs and users , so it can operate the computer system fairly and efficiently.

Describe why direct memory access (DMA) is considered an efficient mechanism for performing I/O.

-used for bulk data movemenT - enables a device to transfer data without exposing the CPU to a work overload -able to transmit information at close to memory speeds

Describe the operating system's two modes of operation.

-user mode: When the computer system is executing on behalf of a user application, the system is in user mode -kernel mode: when a user application requests a service from the operating system (via a system call); whenever the operating system gains control of the computer

MS-DOS layer structure order

1 - ROM BIOS device drivers / 2 - MS-DOS device drivers / 3 - Resident system program / 4 - Application program

ESSAY QUESTION Of the following 5 forms of storage, rank them from fastest to slowest in terms of access time: (1) main memory, (2) magnetic disk, (3) registers, (4) solid state disk, (5) cache.

1. registers 2. cache 3. main memory 4. solid state disk 5. magnetic disk

What output is unobtainable? #include <stdio.h> #include <unistd.h>int main() { printf("1");fork(); printf("2");fork(); printf("3");return 0; }

132123

"Ans: A

2. A process control block ____. A) includes information on the process's state B) stores the address of the next instruction to be processed by a different process C) determines which process isto be executed next D) is an example of a process queue"

Output? #include <unistd.h>#include <stdio.h>int i=1;int main(void) { fork(); fork(); printf("%d",++i);return 0;}

2222, 22

Consider a logical address space of 256 pages with a 4-KB page size, mapped onto a physical memory of 64 frames. a.) How many bits are required in the logical address? b.) How many bits are required in the physical address?

4KB page size, 2^12 bits. Page Size + Number of (Pages or Frames) a.) 256 Pages = 2^8 pages, 12 + 8 = 20 bits b.) 64 Frames = 2^6 Frames, 12 + 6 = 18 bits

Distinguish mobile computing from traditional desktop computing.

==MOBILE COMPUTING: (smart-phones/tablets) more functionality; uses cellular data networks for connectivity --DESKTOP COMPUTING: interconnect via wireless networks; Portals provide web access to internal systems; Stand-alone general-purpose machines

The _____ model maps each user-level thread to one kernel threa(d)(a)one-to-one model(b)two-level(c)many-to-one model(d)many-to-many model

A

The ________ application is the application appearing on the display screen of a mobile device.(a)foreground(b)main(c)display(d)background

A

The list of processes waiting to execute on a CPU is called a(n) ____.(a)ready queue(b)interrupt queue(c)standby queue(d)device queue

A

Which of the following implicit threading methodology involves dispatch queues? (a)grand central dispatch(b)all of them(c)thread pools(d)OpenMP

A

What are the three reasons that buffering is performed?

A buffer is a memory area that stores data while they are transferred between two devices or between a device an application. One reason for buffering is to handle data when speed mismatches between the producer and consumer of a data stream exist. The second reason is to adapt between devices that have different data-transfer sizes. The third reason is to support copy semantics for application I/O.

How is the effective access time computed for a demand-paged memory system?

A demand-paging system is similar to a paging system with swapping where processes reside in secondary memory. With demand paging, when a process is executed, it is swapped into memory. Rather than swapping the entire process into memory, however, a lazy swapper is used. A lazy swapper never swaps a page into memory unless that page will be needed. Thus, a paging system with swapping manipulates entire processes, whereas a demand pager is concerned with the individual pages of a process.

Collected of related information defined by its creator

A file

Explain the usefulness of a modify bit.

A modify bit is associated with each page frame. If a frame is modified, the modify bit is then set. The modify bit is useful when a page is selected for replacement. If the bit is not set, the page does not need to be written to disk. If the modify bit is set, the page needs to be written to disk when selected for replacement.

In monitor-based synchronization management, what does a condition variable best correspond to?

A mutex

What is a counting semaphore?

A mutex built around an integer rather than a Boolean variable

Explain what race condition is.

A race condition occurs when two or more threads can access shared data and they try to change it at the same time. Because the thread scheduling algorithm can swap between threads at any time, you don't know the order in which the thread will attempt to access the shared data. Therefore, the result of the change in data is dependent on the thread scheduling algorithm.

Explain the difference between a serial-port controller and a SCSI bus controller.

A serial-port controller is a simple device controller with a single chip that controls the signals on the wires of a serial port. By contrast, a SCSI bus controller is not simple. Because the SCSI protocol is complex, the SCSI bus controller is often implemented as a separate circuit board that plugs into the computer

ESSAY QUESTION What is an API?

A set of commands, functions, and other tools that can be used by a programmer in developing a program. application program A program designed for end-user execution, such as a word processor, spreadsheet, compiler, or Web browser.

Assume the shared buffer is implemented as a circular array with two logical pointers: in and out. The variable in points to the next free position in the buffer; out points to the first full position in the buffer. Which of the following is true? A) The buffer is empty when in == out; the buffer is full when ((in + 1) % BUFFER SIZE) == out; B) The buffer is full when in == out; the buffer is empty when ((in + 1) % BUFFER SIZE) == out; C) All the elements of the buffer can be used; D) Both A and C

A) The buffer is empty when in == out; the buffer is full when ((in + 1) % BUFFER SIZE) == out;

Which of the following statements regarding solid state disks (SSDs) is false? A) They generally consume more power than traditional hard disks. B) They have the same characteristics as magnetic hard disks, but can be more reliable. C) They are generally more expensive per megabyte than traditional hard disks. D) They have no seek time or latency.

A) They generally consume more power than traditional hard disks.

Which of the following is not a factor in choosing which process to terminate during recovery from a deadlock? A) Who the parent of the process is. B) How many more resources the process needs in order to complete. C) How many processes will need to be terminated. D) What the priority of the process is

A) Who the parent of the process is.

10. Which of the following defines the view of the operating system seen by most users? A) application and system programs B) system calls C) device drivers D) library calls

A) application and system programs

Which of the following components of a computer system defines the ways to use system resources to solve computing problems? A) application programs B) operating system C) computer hardware D) computer logo

A) application programs

26. The major difficulty in designing a layered operating system approach is ____. A) appropriately defining the various layers B) making sure that each layer hides certain data structures, hardware, and operations from higher-level layers C) debugging a particular layer D) making sure each layer is easily converted to modules

A) appropriately defining the various layers

24. Which of the following is the correct program type for GRUB in Linux and Unix systems? A) bootstrap program B) compiler program C) binder program D) system utility

A) bootstrap program

Compared to USB, NVMe provides A) both higher throughput and lower latency. B) higher throughput, but higher latency. C) lower latency, but lower throughput. D) neither higher throughput and lower latency.

A) both higher throughput and lower latency.

33. A _____ is an example of a systems program. A) command interpreter B) Web browser C) text formatter D) database system

A) command interpreter

25. When a process fails, the operating system takes a ________ which can then be probed by a debugger for failure analysis? A) core dump B) crash dump C) capture of network statistic information D) capture of CPU usage information

A) core dump

Reentrant code is easier to share when paging is used, because A) each process can modify that code its own way. B) the code doesn't change during execution. C) the code changes are identical for each process. D) All of the above.

A) each process can modify that code its own way.

15. A message-passing model is ____. A) easier to implement than a shared memory model for intercomputer communication B) faster than the shared memory model C) a network protocol, and does not apply to operating systems D) only useful for small simple operating systems

A) easier to implement than a shared memory model for intercomputer communication

Which of the following principles is used for adding and removing items from a queue? A) first in first out (FIFO) B) last in first out (LIFO) C) random order D) round robin

A) first in first out (FIFO)

One necessary condition for deadlock is ______, which states that a resource can be released only voluntarily by the process holding the resource. A) hold and wait B) mutual exclusion C) circular wait D) no preemption

A) hold and wait

17. Android runs Java programs _____________ A) in the Android RunTime (ART) virtual machine. B) natively. C) in the Java virtual machine. D) Android does not run Java programs.

A) in the Android RunTime (ART) virtual machine.

Where is the location of L1 cache? A) inside CPU core B) inside processor but outside CPU core C) inside main memory D) inside registers

A) inside CPU core

Which of the following clears the interrupt by servicing the device? A) interrupt request line B) interrupt-controller hardware C) interrupt vector D) interrupt service routine

A) interrupt request line

What is done by command "spy -el" on Unix and Linux systems? A) list complete information for all processes currently active in the system B) list complete information for all processes currently running in background C) list complete information for all files currently open in the system D) list complete information for all folders currently open in the system

A) list complete information for all processes currently active in the system

16. Microkernels use _____ for communication. A) message passing B) shared memory C) system calls D) virtualization

A) message passing

20. Which of the following inter-process communication is used in microkernel? A) message passing B) shared memory C) socket communication D) all of the above

A) message passing

19. Which of the following operating system structure is the one for MS-DOS? A) monolithic structure B) layered structure C) microkernel D) modular approach

A) monolithic structure

Which of the following regarding mutex lock is NOT true? A) mutex lock is a hardware solution to critical-section problem B) mutex lock is a higher-level software solution to critical-section problem C) mutex lock suffers from busy waiting D) the general rule of thumb is to use a mutex lock if the lock will be held for a duration less than two context switches

A) mutex lock is a hardware solution to critical-section problem

9. What category of system call includes the ones for process creation of and termination? A) process control B) file management C) device management D) protection

A) process control

f an instruction modifies several different locations, a page fault can be handled by A) using temporary registers to hold the values of overwritten locations. B) loading multiple pages in advance. C) incorporating special hardware. D) terminating the process.

A) using temporary registers to hold the values of overwritten locations.

The rate of a periodic task in a hard real-time system is ________, where p is a period and t is the processing time. A. 1/p B. p/t C. 1/t D. pt

A. 1/p

________ allows a thread to run on only one professor. A. Processor affinity B. Processor set C. NUMA D. Load balancing

A. Processor affinity

Which of the following is true of earliest-deadline-first (EDF) scheduling algorithm? A. When a process becomes runnable, it must announce its deadline requirements to the system. B. Deadlines are assigned as following: the earlier the deadline, the lower the priority; the later the deadline, the higher the priority C. Priorities are fixed; that is, they cannot be adjusted when a new process starts running. D. It assigns priorities statically accordingly to deadline.

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

With ________ a thread executes on a professor until a long-latency event (i.e. a memory stall) occurs. A. course-grained multithreading B. fine-grained multithreading C. virtualization D. multicore processors

A. course-grained multithreading

What two operating systems currently dominate mobile computing?

APPLE IOS & GOOGLE ANDRIOD

T/F, Ordinary pipes - Ordinary pipes allow two processes to communicate in standard producer- consumer fashion - Ordinary pipes are unidirectional, allowing only one-way communication - An ordinary pipe cannot be accessed from outside the process that created it - Ordinary pipes on Windows systems are termed anonymous pipes, and they behave similarly to their UNIX counterparts - Ordinary pipes employ parent-child relationships between the communicating processes - On both UNIX and Windows systems, once the processes have finished communicating and have terminated, the ordinary pipe ceases to exist

All true

Consider a computer system that runs 5,000 jobs per month and has no deadlock-prevention or deadlock-avoidance scheme. Deadlocks occur about twice per month, and the operator must terminate and rerun about ten jobs per deadlock. Each job is worth about two dollars (in CPU time), and the jobs terminated tend to be about half done when they are aborted. A systems programmer has estimated that a deadlock-avoidance algorithm (like the banker's algorithm) could be installed in the system with an increase of about 10 percent in the average execution time per job. Since the machine currently has 30 percent idle time, all 5,000 jobs per month could still be run, although turnaround time would increase by about 20 percent on average. a. What are the arguments for installing the deadlock-avoidance algorithm? b. What are the arguments against installing the deadlock-avoidance algorithm?

An argument for installing deadlock avoidance in the system is that we could ensure deadlock would never occur. In addition, despite the increase in turnaround time, all 5,000 jobs could still run. An argument against installing deadlock avoidance software is that deadlocks occur infrequently and they cost little when they do occur.

Difference between an interrupt/trap?

An interrupt is a hardware-generated change of flow within the system, while a trap is a software generated interrupt

What effect does the size of the time quantum have on the performance of an RR algorithm?

At one extreme, if the time quantum is extremely large, the RR policy is the same as the FCFS policy. If the time quantum is extremely small, the RR approach is called processor sharing and creates the appearance that each of n processes has its own processor running at 1/n the speed of the real processor.

Which of these is a directly security-related function of an OS?

Authentication

In Pthreads, a parent uses the pthread_join() function to wait for its child thread to complete. What is the equivalent function in Win32? (a)win32_join()(b)WaitForSingleObject()(c)join()(d)wait()

B

Which of the following is true?(a)Both are true(b)An I/O-bound process is one that spends more of its time doing I/O than it spends doing computations(c)An I/O-bound process is one that spends more of its time doing computations than it spends doing I/O(d)None of the above

B

Which of the following items are shared across multiple threads belonging to the same process? (a)stack(b)code, data, files(c)all of the them(d)registers

B

Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page number? A) 0xAE B) 0xF9 C) 0xA D) 0x00F9

B) 0xF9

Given the reference string of page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and a system with three page frames, what is the final configuration of the three frames after the LRU algorithm is applied? A) 1, 3, 4 B) 3, 1, 4 C) 4, 1, 2 D) 1, 2, 3

B) 3, 1, 4

Child processes inherit UNIX ordinary pipes from their parent process because: A) The pipe is part of the code and children inherit code from their parents. B) A pipe is treated as a file descriptor and child processes inherit open file descriptors from their parents. C) The STARTUPINFO structure establishes this sharing. D) All IPC facilities are shared between the parent and child processes.

B) A pipe is treated as a file descriptor and child processes inherit open file descriptors from their parents.

Which of the following scheduling algorithm may suffer from convoy effect? A) SJF B) FCFS C) RR D) Multilevel queue

B) FCFS

Which of the following statement is correct? A) Base register holds the size of a process. B) Limit register holds the size of a process. C) Base and limit registers can be loaded by the standard load instructions in the instruction set. D) Any attempt by a user program to access memory at an address higher than the base register value results in a trap to the operating system.

B) Limit register holds the size of a process.

30. _____ allow operating system services to be loaded dynamically. A) Virtual machines B) Modules C) File systems D) Graphical user interfaces

B) Modules

If process P0 is switched to process P1, state for P0 will be saved into ____, and state from ___ will be reloaded? A) PCB0, PCB0 B) PCB0, PCB1 C) PCB1, PCB0 D) PCB1, PCB1

B) PCB0, PCB1

Which of the following criteria is more important for an interactive system? A) CPU utilization B) Response time C) Turnaround time D) Throughput

B) Response time

Which of the following is NOT true? A) Since semaphore and mutex lock are tools for synchronization, process that have used semaphores or mutex locks should not cause deadlocks B) Semaphores and mutex locks may be shared resources that difference processes contend for, and hence deadlocks may occur C) a set of processes is in a deadlocked state when every process in the set is waiting for an event that can be caused only by another process in the set D) all of the above

B) Semaphores and mutex locks may be shared resources that difference processes contend for, and hence deadlocks may occur

6. _____ provide(s) an interface to the services provided by an operating system. A) Shared memory B) System calls C) Simulators D) Communication

B) System calls

Suppose that there are ten resources available to three processes. At time 0, the following data is collected. The table indicates the process, the maximum number of resources needed by the process, and the number of resources currently owned by each process. ProcessMaximum NeedsCurrently Owned P0104 P131 P254 At time 1, P1 requests a resource. Which of the following is correct? A) The request will be granted, since the current state is safe. B) The request will not be granted, since the current state is not safe. C) The request will be granted, since the state after granting the request will be safe. D) The request will not be granted, since the state after granting the request will be unsafe.

B) The request will not be granted, since the current state is not safe.

Which of the following is the definition of processor? A) the hardware that executes instructions B) a physical chip that contains one or more CPUs C) the basic computation unit of the CPU D) including multiple computing cores on the same CPU

B) a physical chip that contains one or more CPUs

Which of the following computing environments place rigid time requirements on the operation of a processor or the flow of data? A) traditional computing B) real-time embedded system C) client-server computing D) peer-to-peer computing

B) real-time embedded system

Assume process P0 and P1 are the process before and after a context switch, and PCB0 and PCB1 are respectively their process control block. Which of the following time units are included inside the dispatch latency? A) P0 executing B) save state into PCB0, and restore state from PCB1 C) P1 executing D) all of the above

B) save state into PCB0, and restore state from PCB1

Which of the following items does not belong to the function of a dispatcher? A) switching context from one process to another B) selecting a process among the available ones in the ready queue C) switching to user mode D) jumping to the proper location in the user program to resume that program

B) selecting a process among the available ones in the ready queue

The SCAN scheduling algorithm ____. A) services the request with the minimum seek time B) services the request next to the current head position in the direction of the head movement C) chooses to service the request furthest from the current head position D) services the request next to the current head position in the opposite direction of the head movement

B) services the request next to the current head position in the direction of the head movement

Which of the following storage medium is the slowest regarding access speed? A) cache B) solid state drive C) register D) main memory

B) solid state drive

A significant problem with priority scheduling algorithms is _____. A) complexity B) starvation C) determining the length of the next CPU burst D) determining the length of the time quantum

B) starvation

7. Which of the following is the only gateway between user space and kernel space? A) user interface B) system call C) operating system D) hardware drivers

B) system call

A sign of thrashing is A) the CPU utilization increases as the degree of multiprogramming is increased. B) the CPU utilization decreases as the degree of multiprogramming is increased. C) the CPU utilization increases as the number of pages allocated to each process is increased. D) the CPU utilization decreases as the number of pages allocated to each process is increased.

B) the CPU utilization decreases as the degree of multiprogramming is increased.

Which of the following is NOT true regarding conditional variable, e.g. x? A) The only operations that can be invoked on a condition variable are wait() and signal() B) x.wait() means that the process invoking this operation is suspended until another process invokes x.signal() C) The x.signal() operation resumes exactly one suspended process D) If no process is suspended, then the signal() operation still affects the state of the semaphore

B) x.wait() means that the process invoking this operation is suspended until another process invokes x.signal()

Which of the following is true of multilevel queue scheduling? A. Processes can move between queues B. Each queue has its own scheduling algorithm C. A queue cannot have absolute priority over lower-priority queues. D. It is the most general CPU-scheduling algorithm

B. Each queue has its own scheduling algorithm

________ involves the decision of which kernel thread to schedule onto which CPU A. Process-contention scope B. System-contention scope C. Dispatcher D. Round-robin scheduling

B. System-contention scope

A significant problem with priority scheduling algorithms is ________. A. complexity B. starvation C. determining the length of the next CPU burst D. determining the length of the time quantum

B. starvation

Why are clustered systems considered to provide high-availability service?

BECAUSE the service will continue even if one or more systems in the cluster fail

Which of these would transition a process from running to ready?

Being pre-empted by the timer interrupt

ESSAY QUESTION What are the advantages and disadvantages of using a microkernel approach?

Benefits typically include the following: (a) adding a new service does not require modifyingthe kernel, (b) it is more secure, as more operations are done in user mode than in kernel mode, and (c)a simpler kernel design and functionality typically results in a more reliable operating system The primary disadvantages of the microkernel architecture are the overheads associated withinterprocess communication and the need to frequently use the operating system's messaging functionsto enable the user process and the system service to interact with each other.

Suppose that there are two resource types (R1 and R2) with five resources each available to four processes. At time 0, the following data is collected. The table indicates the process, the number of resources of each type currently allocated to the processes, and the current request of each resource type by each process. ProcessAllocationRequest R1 R2R1R2 P02 03 2 P11 11 0 P20 11 1 P31 13 2 Which of the following sentences is correct? A) All four processes are currently deadlocked. B) The system is not deadlocked. C) Processes P0 and P3 are deadlocked. D) Processes P0, P1 and P3 are deadlocked.

C) Processes P0 and P3 are deadlocked.

Which of the following is not a process type in the Chrome browser? A) Plug-in B) Renderer C) Sandbox D) Browser

C) Sandbox

14. The ________ provides a portion of the system call interface for UNIX and Linux. A) POSIX B) Java C) Standard C library D) Standard API

C) Standard C library

Which of the following statements is false? A) Mobile devices must be concerned with power consumption. B) Mobile devices can provide features that are unavailable on desktop or laptop computers. C) The difference in storage capacity between a mobile device and laptop is shrinking. D) Mobile devices usually have fewer processing cores than a standard desktop computer.

C) The difference in storage capacity between a mobile device and laptop is shrinking.

What statement concerning privileged instructions is considered false? A) They may cause harm to the system. B) They can only be executed in kernel mode. C) They cannot be attempted from user mode. D) They are used to manage interrupts.

C) They cannot be attempted from user mode.

In a system that uses deadlock detection algorithm, A) a deadlock is detected as soon as it occurs. B) a deadlock is detected just before it occurs. C) a deadlock is detected sometime after it has occurred but not necessarily immediately. D) a deadlock is detected sometime before it occurs, but not necessarily just before.

C) a deadlock is detected sometime after it has occurred but not necessarily immediately.

Which of the following actions should be performed among cooperating processes? A) process synchronization B) coordination C) both of the above D) none of the above

C) both of the above

The ______ occurs in first-come-first-served scheduling when a process with a long CPU burst occupies the CPU. A) dispatch latency B) waiting time C) convoy effect D) system-contention scope

C) convoy effect

The CPU catches the interrupt and ____ it to the interrupt handler A) raises B) catches C) dispatches D) clears

C) dispatches

11. The Windows CreateProcess() system call creates a new process. What is the equivalent system call in UNIX? A) NTCreateProcess() B) process() C) fork() D) getpid()

C) fork()

Which of the following system calls is used to let the parent process create a child process? A) abort(); B) wait(); C) fork(); D) exec().

C) fork();

Which of the following contains dynamically allocated data during program run time? A) text section B) data section C) heap section D) stack section

C) heap section

Which of the following contains memory allocated by malloc()? A) text section B) data section C) heap section D) stack section

C) heap section

23. Which of the following is a much more restricted, or even closed, system to developers than others? A) Linux B) Mac OS X C) iOS D) Android

C) iOS

Which of the following stage triggers the CPU switch from user program to interrupt processing? A) I/O request B) transfer done C) interrupt signaled D) interrupt handled

C) interrupt signaled

21. Which of the following operating system structure is the one for Mach OS? A) monolithic structure B) layered structure C) microkernel D) modular approach

C) microkernel

The list of processes waiting to execute on a CPU is called a(n) ____. A) standby queue B) device queue C) ready queue D) interrupt queue

C) ready queue

The surface of a magnetic disk platter is divided into ____. A) sectors B) arms C) tracks D) cylinders

C) tracks

Escape (or back door) in application I/O interface A) allows a user to interrupt a device at any time. B) allows access to a few additional devices, such as a time-of-day clock and a timer. C) transparently passes arbitrary commands from an application to a device driver. D) enables managing of devices with widely varying speeds ranging from a few bytes per second to gigabytes per second.

C) transparently passes arbitrary commands from an application to a device driver.

Which of the following process state will be switched from "running" state when an I/O event occurs? A) ready B) terminated C) waiting D) new

C) waiting

Which of the following is true of the rate-monotonic scheduling algorithm? A. The task with the shortest period will have the lowest priority. B. It uses a dynamic priority policy C. CPU utilization is bounded when using this algorithm D. It is non-preemptive

C. CPU utilization is bounded when using this algorithm

Which of the following scheduling algorithms must be non-preemptive? A. SJF B. RR C. FCFS D. priority algorithms

C. FCFS

The ________ scheduling algorithm is designed especially for time-sharing systems. A. SJF B. FCFS C. RR D. Multilevel queue

C. RR

The ________ occurs in the first-come-first-served scheduling when a process with a long CPU burst occupies the CPU. A. dispatch B. waiting time C. convoy effect D. system-contention scope

C. convoy effect

ESSAY QUESTION Describe some requirements, or goals, when designing an operating system.

CAN be divided into user and system goals. users want system that is easy to use/learn, reliable, safe, and fast. system goals are created by ppl who design, create, maintain, and operate system. System should be easy to design implement, and maintain while being flexible, reliable, error-free, & efficient

Name 3 types of User interfaces

CLI, Batch Interface, and GUI

Which of the following is NOT true regarding semaphore implementation? A) It suffers from the busy waiting problem B) Semaphore has a waiting queue associated with the semaphore C) When a process executes the wait() operation and finds that the semaphore value is not positive, it will suspend itself D) A process that is suspended, waiting on the semaphore, should be restarted when some other process executes a signal() operation.

D) A process that is suspended, waiting on the semaphore, should be restarted when some other process executes a signal() operation.

What are some other terms for kernel mode? A) supervisor mode B) system mode C) privileged mode D) All of the above

D) All of the above

Which of the following technique is well suited to support very large address space, e.g. 64-bit address space? A) Inverted page tables B) Hierarchical page tables C) Clustered page tables D) All of the above

D) All of the above

A frame table stores A) which frames are allocated. B) which frames are free. C) total number of frames. D) All of the above.

D) All of the above.

Buffering in I/O is used to A) cope with a speed mismatch between the producer and consumer of a data stream. B) provide adaptations for devices that have different data-transfer sizes. C) support copy semantics for application I/O. D) All of the above.

D) All of the above.

Which of the following is TRUE about a serial port controller and a fibre channel (FC) bus controller? A) Both FC bus controller and serial port controller are often implemented as separate circuit boards. B) A serial-port controller is a simple device controller, while an FC bus controller is complex. C) Both FC bus controller and serial port controller are used in PCs. D) All of the above.

D) All of the above.

An advantage of SSDs over HDDs is A) SSDs are cheaper per megabyte than HDDs. B) SSDs are more reliable than HDDs. C) SSDs are faster than HDDs. D) B and C

D) B and C

3. Which of the following is not an operating system service? A) program execution B) I/O operation C) protection and security D) graphical user interface

D) GUI

5. Which of the following is not a type of command interpreter? A) Bourne shell B) C shell C) Korn shell D) KDE or GNOME

D) KDE or GNOME

Which of the following programs runs all the time on the computer? A) compiler B) assembler C) text editor D) Kernel

D) Kernel

Which of the following is NOT true for Peterson's solution? A) Mutual exclusion is preserved B) The progress requirement is satisfied C) The bounded-waiting requirement is met D) Peterson's solution works for synchronization among more than two processes

D) Peterson's solution works for synchronization among more than two processes

Which of the following is not true about test_and_set instruction? A) It is a hardware instruction B) It is executed atomically C) Returns the original value of passed parameter D) Returns the new value of passed parameter E) Set the new value of passed parameter to "TRUE"

D) Returns the new value of passed parameter

29. _____ is not one of the major categories of system calls. A) Process control B) Communications C) Protection D) Security

D) Security

Which of the following is FALSE about swap space use? A) Swap space may be used to hold an entire process image. B) Swap space may be used to store only pages that have been pushed out of main memory. C) Swap space may be used to store the file system. D) Swap space can be a dedicated swap partition, a swap file, or a combination of swap partitions and swap files.

D) Swap space can be a dedicated swap partition, a swap file, or a combination of swap partitions and swap files.

Which of the following criteria is more important from the point of view of a particular process? A) CPU utilization B) Response time C) Turnaround time D) Throughput

D) Throughput

Which of the following are efforts to towards developing scalable, efficient tools that address the demands of concurrent programming? A) designing compilers that generate more efficient code B) developing languages that provide support for concurrent programming C) improving the performance of existing libraries and APIs D) all of the above

D) all of the above

Which of the following cases could force a process removed from the CPU? A) I/O request B) fork a child C) interrupt or time slice expired D) all of the above

D) all of the above

Which of the following is loosely coupled? A) multiprocessor systems B) single-processor system C) multi-core processor D) clustered system

D) clustered system

The ________ application is the application appearing on the display screen of a mobile device. A) main B) background C) display D) foreground

D) foreground

Which of the following is nonvolatile? A) register B) cache C) main memory D) hard-disk drive

D) hard-disk drive

18. ______ is a mobile operating system designed for the iPhone and iPad. A) Mac OS X B) Android C) UNIX D) iOS

D) iOS

22. Which of the following operating system structure involves using loadable kernel module in design? A) monolithic structure B) layered structure C) microkernel D) modular approach

D) modular approach

8. What is the relationship between library call open() and open() system call? A) open() system call is part of open() B) open() system call in an alternate version of open() C) open() is a predecessor version of open() system call D) open() invokes open() system call to get service from operating system

D) open() invokes open() system call to get service from operating system

Which of the following process state will be switched from "ready" state? A) ready B) terminated C) waiting D) running

D) running

Which of the following memory space dynamically grows from high memory to low memory? A) text section B) data section C) heap section D) stack section

D) stack section

27 A microkernel is a kernel ____. A) containing many components that are optimized to reduce resident memory size B) that is compressed before loading in order to reduce its resident memory size C) that is compiled to produce the smallest size possible when stored to disk D) that is stripped of all nonessential components

D) that is stripped of all nonessential components

For interactive systems, it is more important to minimize ________. A) the average response time B) the average turnaround time C) the variance in response time D) the waiting time

D) the waiting time

A reader-writer lock is useful when A) there are a significantly large number of processes attempting to enter a critical section. B) there are a significantly large number of consumer processes attempting to read data from a bounded buffer. C) there are a significantly small number of reader processes attempting to read in the critical section. D) there are a significantly large number of reader processes attempting to read in the critical section.

D) there are a significantly large number of reader processes attempting to read in the critical section.

The two separate modes of operating in a system are A) supervisor mode and system mode B) kernel mode and privileged mode C) physical mode and logical mode D) user mode and kernel mode

D) user mode and kernel mode

An I/O system call does not include A) memory address. B) storage device address. C) CPU speed. D) whether the operation is input or output.

D) whether the operation is input or output.

Which of the following will trigger an interrupt? A) kernel function B) software execution C) CPU execution D)I/O completion

D)I/O completion

________ scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts A. Multilevel queue B. RR C. FCFS D. SJF

D. SJF

________ is the number of processes that are completed per time unit A. CPU utilization B. Response time C. Turnaround time D. Throughput

D. Throughput

The two general approaches to load balancing are ________ and ________ A. soft affinity, hard affinity B. coarse grained, fine grained C. soft real-time, hard real-time D. push migration, pull migration

D. push migration, pull migration

A facility that dynamically adds probes to a running system

DTrace

In which of these areas do we most commonly, and classically, formally address deadlocks?

Databases

Why do we not typically attempt to formally address deadlocks in general-purpose operating systems?

Deadlocks in general-purpose operating systems are too rare for the resulting complications to be worth it

What is the activity of finding and fixing errors in a system?

Debugging

For a user-space program, which of these requires the use of an interrupt?

Drawing an element on the display

Which of the following are used by Linux kernel as data structures? A) Lists, Stacks, and Queues B) Trees C) Hash Functions and Maps D) Bitmaps E) All of the above

E) All of the above

What are the advantages of a Multiprocessor?

Economy of scale, Increased reliability, and Increased throughput

What is an advantage of the earliest-deadline-first real-time scheduler over rate-monotonic?

Efficiency

Concurrency is inherently equivalent to parallelism.

F

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

F

Parallelism can be achieved on single-processor systems.

F

Sockets are considered a high-level communications scheme.

F

The communication with named pipes requires parent-child relationship

F

The difference between a program and a process is that a program is an active entity while a process is a passive entity.

F

The occurrence of an event is signaled by ( ), by executing a special operation called a ( )

Interrupt, system call

Which of these is the key characteristic of main, or primary, memory?

It is directly addressable by the processor

What is true of a system call?

It is treated by the hardware as a software interrupt, it can be invoked based on the functionality provided by the underlying processor, and it provides means to the program to ask operating system perform tasks.

Define LAN/WAN/MAN

LAN - connects computers within a room, floor, or building WAN - links bulldings, cities, or countries MAN - can link buildings within a city

What is the purpose of the "boot" program?

Load and start the operating system

Bootstrap Loader / Booting / System gen / GRUB

Locates the kernel and loads into main memory / Starting a computer by loading the kernel / configuring system for a specific computer site / Open source bootstrap program

What provides communication facility between the client program and the various services that are running in user space?

Microkernel

Which of these is an advantage of monitors over mutexes?

Monitors are easier and less error-prone than mutexes for most application programmers to use

Distinguish between uniform memory accesses (UMA) and non-uniform memory access (NUMA) systems.

NUMA: provide multiple CPU (or group of CPUs) with its own local memory that is accessed via a small, fast local bus UMA: a single memory controller is used and it is applicable for general purpose applications and time sharing applications

The following processes are being scheduled using a preemptive, round- robin scheduling algorithm. Each process is assigned a numerical priority, with a higher number indicating a higher relative priority. In addition to the processes listed below, the system also has an idle task (which consumes no CPU resources and is identified as Pidle). This task has priority 0 and is scheduled whenever the system has no other available processes to run. The length of a time quantum is 10 units. If a process is preempted by a higher-priority process, the preempted process is placed at the end of the queue. a. Show the scheduling order of the processes using a Gantt chart. b. What is the turnaround time for each process? c. What is the waiting time for each process? d. What is the CPU utilization rate?

Number with thread name is start time. 0-P1 10-P1 20-Pidle 25-P2 35-P3 45-P2 55-P3 60-P4 70-P4 75-P2 80-P3 90-Pidle 100-P5 105-P6 115-P5 120- end b. P1: 20-0 = 20 P2: 80-25 = 55 P3: 90 - 30 = 60 P4: 75-60 = 15 P5: 120-100 = 20 P6: 115-105 = 10 c. P1: 0 P2: 40 P3: 35 P4: 0 P5: 10 P6: 0 d. 105/120 = 87.5 percent

All monitors are objects; which of these is a unique characteristic of a monitor?

Only one method of a monitor may execute at the same time

Output? #include <stdio.h> #include <unistd.h>void forkexample() { int x = 1;if (fork() == 0) printf("Child has x = %d\n", ++x); elseprintf("Parent has x = %d\n", --x); } int main() { forkexample(); return 0; }

Parent has x = 0 Child has x = 2 and Child has x = 2 Parent has x = 0

What is cryptography?

Preventing data and communications from being read by a party that should not be able to

The traditional UNIX scheduler enforces an inverse relationship between priority numbers and priorities: the higher the number, the lower the priority. The scheduler recalculates process priorities once per second using the following function: Priority = (recent CPU usage / 2) + base where base = 60 and recent CPU usage refers to a value indicating how often a process has used the CPU since priorities were last recalculated.Assume that recent CPU usage is 40 for process P1, 18 for process P2, and 10 for process P3. What will be the new priorities for these three processes when priorities are recalculated? Based on this information, does the traditional UNIX scheduler raise or lower the relative priority of a CPU-bound process?

Priority = (recent CPU usage / 2) + base where base = 60 P1 = (40/2) + 60 = 80 P2 = (18/2) + 60 = 69 P3 = (10/2) + 60 = 65 Lowers the relative priority of CPU-bound processes.

CPU-scheduling info / Accounting info / Memory Management info / CPU Registers

Process priority and scheduling parameters / real time used, time limits, and process numbers / value of limit registers and page tables / accumulators, index registers, and stack pointers

What is the advantage of C-SCAN over SCAN disk head scheduling?

Provides more uniform wait time

How do we avoid most spin waits for ordinary mutex locks?

Queueing

What is virtualization?

Running an image of a computer on another computer

ESSAY QUESTION Describe the relationship between an API, the system-call interface, and the operating system.

SYSTEM CALL: serves as link to system calls made available by O.S, the interface intercepts function calls in the API and invokes the necessary system call within the O.S. most of the details of the O.S Interface are hidden from the programmer by the API and managed by the run-time support library

What is the difference between semaphore and mutex lock?

Semaphore: Signaling mechanism Integer variable Allows multiple program threads to access a finite instance of resources Value can be changed by any process acquiring or releasing the resource Can be categorized into counting semaphore and binary semaphore Modified using wait() and signal() operation If all resources are being used the process requesting for resource performs wait() operation and block itself till semaphore count become greater than one Mutex lock: Locking mechanism Object Allow multiple program thread to access a single resource by not simultaneously Object lock is released only by the process that has acquired the lock on it. Object is locked or unlocked by the process requesting or releasing the resource If a mutex object is already locked, the process requesting for resources waits and queued by the system till lock is released.

When a process creates a new process using the fork() operation, what is shared between the parent process and the child process?

Shared memory segments

What is a key difference between soft and hard real-time?

Soft real-time is focused on priorities, hard real-time is focused on deadlines

ESSAY QUESTION What is a system call?

Software-triggered interrupt allow- ing a process to request a kernel service.

Define swapping/virtual memory

Swapping - processes are exchanged in and out of main memory to the disk / Virtual memory - enables users to run programs that are larger than actual physical memory

What serves as the link to system calls made available by the operating system?

System-call interface

Amdahl's Law describes performance gains for applications with both a serial and parallel component.

T

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

T

One-to-one model provides more concurrency than the many-to-one model by allowing another thread to run when a thread makes a blocking system call.

T

Ordinary pipes are unidirectional, allowing only one-way communication.

T

The trend in developing parallel applications is to use implicit threading.

T

Using a section object to pass messages over a connection port avoids data copying.

T

T or F Mac OS X is a hybrid system consisting of both the Mach microkernel and BSD UNIX.

TRUE

True/False Questions Application programmers typically use an API rather than directory invoking system calls.

TRUE

True/False Questions In general, Windows system calls have longer, more descriptive names and UNIX system calls use shorter, less descriptive names.

TRUE

True/False Questions Many operating system merge I/O devices and files into a combined file because of the similarity of system calls for each.

TRUE

True/False Questions One important principle is the separation of policy from mechanism.

TRUE

True/False Questions iOS and Android combine different structures, resulting in hybrid systems that address performance, security, and usability issues

TRUE

The operating system takes care of what processes related to Memory management?

Taking decision on which process and data to move in and out of memory, allocating and de-allocating memory space as needed, and tracking which part of memory is being used and by whom

Explain the concept of a CPU-I/O burst cycle.

The lifecycle of a process can be considered to consist of a number of bursts belonging to two different states. All processes consist of CPU cycles and I/O operations. Therefore, a process can be modeled as switching between bursts of CPU execution and I/O wait.

Which of these is maintained per thread

The program counter

How do we avoid disabling interrupts for ordinary mutex locks?

The test-and-set instruction

What is wait time in the context of process scheduling?

The time a process is ready while not running

What is turnaround time in the context of process scheduling?

The time between a process arriving and completing

If the sum of all needs for a resource type exceeds the available number of instances of that resource type, the system state is unsafe

True

A variation of the round-robin scheduler is the regressive round-robin scheduler. This scheduler assigns each process a time quantum and a priority. The initial value of a time quantum is 50 milliseconds.However, every time a process has been allocated the CPU and uses its entire time quantum (does not block for I/O), 10 milliseconds is added to its time quantum, and its priority level is boosted. (The time quantum for a process can be increased to a maximum of 100 milliseconds.) When a process blocks before using its entire time quantum, it's time quantum is reduced by 5 milliseconds, but its priority remains the same. What type of process (CPU-bound or I/O-bound) does the regressive round-robin scheduler favor?

This scheduler would favor CPU bound processes as they are rewarded with a longer time quantum as well as priority boost whenever they consume an entire time quantum. This scheduler does not penalize I/O bound processes as they are likely to block for I/O before consuming their entire time quantum, but their priority remains the same

How are device controllers connected

Through a common bus that provides access to shared memory

What is the memory hierarchy?

Tiers of larger, slower, less expensive memory and faster, smaller, cheaper memory

What functionalities need to be supported by the operating system for the following two settings real-time systems

Time sharing and virtual memory

(T/F) A multicore system allows two (or more) threads that are in compute cycles to execute all the same time

True

(T/F) In preemptive scheduling, the sections of code affected by interrupts must be guarded from simultaneous use.

True

(T/F) SMP systems that use multicore processors typically run faster than SMP systems that place each processor on separate cores.

True

A dedicated device cannot be used concurrently by several processes or threads.

True

Hashed page tables are commonly used when handling addresses larger than 32 bits.

True

Explain the sequence of events that happens when a page-fault occurs.

When the OS cannot load the desired page into memory, a page fault occurs. First, the memory reference is checked for validity, the program will be terminated when the request is invalid. If the request was valid, a free frame is located. A disk operation is then scheduled to read the page into the frame just found, update the page, restart the instruction that was interrupted because of the page fault, and use the page accordingly.

Why is DMA used for devices that execute large transfers?

Without DMA, programmed I/O must be used. This involves using the CPU to watch status bits and feed data into a controller register one byte at a time. Therefore, DMA was developed to lessen the burden on the CPU. DMA uses a special purpose processor called a DMA controller and copies data in chunks.

What is a distributed system

a collection of physically separate computer systems that are networked to provide access

Consider the following page reference string: 7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6, 2, 3, 0 , 1.

a. 17 b. 14 c. 11

Emulators are..

are programs that duplicate the functionality of one system with another system

Consider two processes, P1 and P2, where p1 = 50, t1 = 25, p2 = 75, and t2 = 30. a.) Can these two processes be scheduled using rate-monotonic scheduling? Illustrate your answer using a Gantt chart such as the ones in Figure 6.16-Figure 6.19. b.) Illustrate the scheduling of these two processes using earliest- deadline-first (EDF) scheduling.

a.) Let consider that process P1 with a higher priority than process P2 with the rate monotonic scheduler. Initially, P1 is scheduled at time t = 0, P2 is scheduled at time t = 25. Later, P1 is scheduled at time t = 50, P2 is scheduled at time t = 75. P2 is not scheduled before to meet the deadline.Let consider that process P1 is assigned a lower priority than process P2, where P1 does not meet its deadline since it is not scheduled in time. b.) Consider two processes P1 and P2 where p1 = 50, t1 = 25 and p2 = 75, t2 = 30. If process P1 is assigned with a higher priority than process P2, then the following scheduling events happen under rate-monotonic scheduling: P1 is scheduled at time t = 0, P2 is scheduled at time t = 25. P1 is scheduled at t = 50, and P2 is scheduled at t = 75. P2 is not scheduled early enough to meet its deadline. The earliest deadline schedule performs the following scheduling events: P1 is scheduled at t = 0, P2 is scheduled at t = 25, P1 is scheduled at t = 55, and so on. This schedule meets the deadlines and earliest-deadline-first scheduling is more effective than the rate-monotonic scheduler. (2)...

Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently serving a request at cylinder 2,150, and the previous request was at cylinder 1,805. The queue of pending requests, in FIFO order, is: 2,069, 1,212, 2,296, 2,800, 544, 1,618, 356, 1,523, 4,965, 3681 Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests for each of the following disk-scheduling algorithms? a.) FCFS b.) SSTF c.) SCAN d.) LOOK e.) C-SCAN f.) C-LOOK

a.) 13011 b.) 7586 c.) 7492 d.) 7424 e.) 9917 f.) 9137

Consider a logical address space of 64 pages of 1,024 words each, mapped onto a physical memory of 32 frames. a.) How many bits are there in the logical address? b.) How many bits are there in the physical address?

a.) 16 b.) 15

Consider the following segment table: ... What are the physical addresses for the following logical addresses? a.) 0,430 b.) 1,10 c.) 2,500 d.) 3,400 e.) 4,112

a.) 649 b.) 2310 c.) Segmentation Error d.) 1727 e.) Segmentation Error

Consider the following snapshot of a system: ... Answer the following questions using the banker's algorithm: a. Illustrate that the system is in a safe state by demonstrating an order in which the processes may complete. b. If a request from process P1 arrives for (1, 1, 0, 0), can the request be granted immediately? c. If a request from process P4 arrives for (0, 0, 2, 0), can the request be granted immediately?

a.) Safe sequence is P0 , P3, P4, P1, P2 b.) Request from P1 is (1 1 0 0) and Available is (3 3 2 1) As request(P1) < Available, we can grant request c.) Request from P4 is (0 0 2 0) and Available is (3 3 2 1) As request(P4) < Available, we can grant request

Answer the following questions using the banker's algorithm: a. What is the content of the matrix Need? b. Is the system in a safe state? c. If a request from process P1 arrives for (0,4,2,0), can the request be granted immediately?

a.) The matrix's need values are - P0 (0, 0, 0, 0) / P1 (0, 7, 5, 0) / P2 (1, 0, 0, 2) / P3 (0, 0, 2, 0) / P4 (0, 6, 4, 2) b.) The system is safe, both P0 and P3 can run since available = (1, 5, 2, 0). Once process P3 is completed it frees up resources, enabling the other processes to run. c.) The request can be granted immediately since available = (1, 1, 0, 0)

Consider the following snapshot of a system: ... Using the banker's algorithm, determine whether or not each of the following states is unsafe. If the state is safe, illustrate the order in which the processes may complete. Otherwise, illustrate why the state is unsafe. a. Available = (0, 3, 0, 1) b. Available = (1, 0, 0, 2)

a.) Unsafe b.) So, the given state (1, 0, 0, 2) is safe state as the requirement of the resources are met. The safe sequence of the states is <P2, P3, P1, P4, P5>

Assume that you have a page-reference string for a process with m frames (initially all empty). The page-reference string has length p, and n distinct page numbers occur in it. Answer these questions for any page-replacement algorithms: a. What is a lower bound on the number of page faults? b. What is an upper bound on the number of page faults?

a.) n b.) p

ESSAY QUESTION Describe how Android uses a unique virtual machine for running Java programs.

android runtime (ART) virtual machine is designed specifically for androids and has been optimized for mobile devices w/ limited memory and CPU processing capabilities.

Consider the following set of processes, with the length of the CPU burst given in milliseconds b.) What is the turnaround time of each process for each of the scheduling algorithms? c.) What is the waiting time of each process for each of these scheduling algorithms? d.) Which of the algorithms results in the minimum average waiting time (over all processes)?

b.) First Come First Serve, turnaround times: P1(2), P2(3), P3(11), P4(15), P5(20) SJF, turnaround times: P1(3), P2(1), P3(20), P4(7), P5(12) Non-preemptive, turnaround times: P1(15), P2(20), P3(8), P4(19), P5(13) RR, turnaround times: P1(2), P2(3), P3(20), P4(13), P5(18) c.) First Come First Serve, waiting times: P1(0), P2(2), P3(3), P4(11), P5(15) SJF, waiting times: P1(1), P2(0), P3(12), P4(3), P5(7) Non-preemptive, waiting times: P1(13), P2(19), P3(0), P4(15), P5(18) RR, waiting times: P1(0), P2(2), P3(12), P4(9), P5(13) d.) Shortest Job First results in the lowest average waiting time, with a time of 4.6 milliseconds,

ESSAY QUESTION Describe how Mac OS X is considered a hybrid system.

bc kernel environment is blend of MACH microkernel and BSD unix

A new process is initially put into the ready queue. It waits there until it is selected for ...

dispatch or execution

In asymmetric processing..

each processor is assigned a specific task (in symmetric multiprocessing, each processor performs all tasks)

A system call is triggered by hardware. (T/F)

false

All computer systems have some sort of user interaction. (T/F)

false

On UNIX, the setuid attribute on a program causes that program to run with the user ID of the current user's ID. (T/F)

false

Solid state disks are considered volatile storage. (T/F)

false

A system call runs in kernel mode only.(T/F)

false (user mode also)

In a layered operating system, the bottom layer is ___ and the highest layer is ___.

hardware, User Interface

ESSAY QUESTION Explain why a modular kernel may be the best of the current operating system design techniques.

it combines the benefits of both the layered and microkernel design techniques. in this design the kernel needs only to have the capability to perform the required functions and know how to communicate between modulars.. if more functionality is required in the kernel the user can dynamically load modules into the kernel. the kernel can have sections w/ web-defined, protected interfaces a desirable property found in layered systems. more flexibility can be achieved by allowing the modules to communicate w/ one another

Jobs are kept initially on the disk in the..

job pool

The error information of most operating systems are written to a file called a ____ file

log

What are two models of inter-process communication?

message-passing model and shared-memory model

Map Reduce is a system, which allows for parallel processing of data across nodes in the cluster. (T/F)

true

Processors for most mobile devices run at a slower speed than a processor in a desktop PC. (T/F)

true

Skype uses a hybrid peer-to-peer approach. (T/F)

true

Solid state disks are generally faster than magnetic disks. (T/F)

true

There is no universally accepted definition of an operating system. (T/F)

true

VMware is a virtual machine manager when it manages guest operating systems. (T/F)

true

Virtually all modern operating systems provide support for SMP (symmetric multiprocessing) (T/F)

true

Consider the page table shown in Figure 9.30 for a system with 12-bit virtual and physical addresses and with 256-byte pages. The list of free page frames is D, E, F (that is, D is at the head of the list, E is second, and F is last). Convert the following virtual addresses to their equivalent physical addresses in hexadecimal. All numbers are given in hexadecimal. • 9EF • 111 • 700 • 0FF

• 9E F - 0E F • 111 - 211 • 700 - D00 • 0F F - EFF


Conjuntos de estudio relacionados

Sociology: October 16th - December 1st

View Set

Advanced PLCs Test 1: Module 1-3

View Set

Set Theory Symbols & Definitions

View Set

321 final - ch42: mngt of pts w musculoskeletal trauma

View Set

Econ Chapter 1-7 In-Class Problems

View Set

Western Civilization II Chapter 14 - Dr. Puckett

View Set