CSC 389 Final Exam

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

The current allocation and maximum needs of a system having four processes and five allocated resources are shown as follows. What is the smallest value of x for which this is a safe state?

1

Consider the following state of a system with four processes, P1, P2, P3, and P4, and five types of resources, RS1, RS2, RS3, RS4, and RS5. Use the deadlock detection algorithm to identify the processes that are deadlocked.

A = {0, 1, 0, 2, 1} P2 = {0, 1, 0, 2, 1} Allocate A= {0, 2, 0, 3, 1} P3 = {0, 2, 0, 3, 1} Allocate A = {0, 2, 0, 3, 2} P4 = {0, 2, 1, 1, 0} Not allocated, DEADLOCK P1 = {1, 1, 0, 2, 1} Not allocated, DEADLOCK

List all states that a process may be in and all possible transitions among these states.

A process may be in three states: Running, Ready, and Blocked. Four transitions are possible among these three states: (1) The transition from Running to Blocked; (2) The transition from Running to Ready; (3) The transition from Ready to Running; (4) The transition from Blocked to Ready.

Which one of the following operating systems is not for personal computers?

Apple's iOS

Which one of the following components is the brain of a computer?

CPU

Consider a multiprogrammed system with degree of 5 (i.e., five programs in memory at the same time). Assume that each process spends 40% of its time waiting for I/O. What will be the CPU utilization?

CPU utilization = 1 - p^n = 1 - 0.4^5 = 0.98976 or 99%

Including the initial parent process, how may processes are created by the following code section? for (i = 0; i < 3; i++) fork ();

Eight

List three common ways of establishing a relationship between user threads and kernel threads.

Establishing a relationship between user threads and kernel threads would be: many to one one to one many to many

For the following program, what's the output will be in Line A and Line B, respectively? #include <sys/types.h> #include <stdio.h> #include <unistd.h> int value = 10; int main() { pid_t pid; pid = fork(); //The child process if (pid == 0) { value += 15; printf ("CHILD: value = %d\n", value); //Line A return 0; } //The parent process if (pid > 0) { wait (NULL); printf ("PARENT: value = %d\n", value); //Line B return 0; } }

Line A: CHILD: value = 25 Line B: PARENT: value = 10

What's the critical region (section)? In order to avoid race conditions, how many processes is allowed to access the critical region (section) at the same time?

The critical section is part of a program where the shared memory is accessed. No two processes may be simultaneously inside their critical regions, so only one process is allowed.

Six batch jobs, A through F, arrive at a computer center at almost the same time. They have estimated running times of 10, 5, 12, 2, 4, and 8 minutes. For the shortest job first scheduling algorithm, what's the mean process turnaround time. Ignore process switching overhead.

The mean process turnaround time is 18.

What are the two models of interprocess communication? Which one is useful for exchanging smaller amount of data?

The two models are shared memory and message passing. Message passing is more useful for exchanging smaller amounts of data.

Personal Computer Operating Systems

Their job is to provide good support to a single user.

Server Operating Systems

They allow the users to share hardware and software resources.

Embedded Operating Systems

They do not accept user-installed software.

Mainframe Operating Systems

They typically offer three kinds of services.

______________ is the number of jobs per hour that the system completes.

Throughput

All threads within a process share a common address space.

True

An unsafe state is not a deadlocked state.

True

Each bus in a computer system has a different transfer rate and function.

True

In general, deadlocks involve nonpreemptable resources.

True

Modern operating systems allow multiple programs to run at the same time.

True

Only one process can be active in a monitor at any instant.

True

Operating systems can be viewed from two viewpoints: extended machines and resource managers.

True

How many types of semaphores are distinguished by operating systems?

Two

GUI allows users to interface with operating systems through a user-friendly ___________ user interface.

graphical

In layered systems, the bottom layer is the _________, the highest layer is the user interface.

hardware

The memory system is constructed as a _____________ of layers.

hierarchy

The basic idea of priority scheduling: each process is assigned a priority, and the runnable process with the __________ priority is allowed to run.

highest

System calls provide an __________ to the services made available by an operating system.

interface

Compute-bound processes typically have __________ CPU bursts and infrequent I/O waits.

long

The basic idea behind the _________ design is to achieve high reliability by splitting the operating system up into small, well-defined modules.

microkernel

Complete the following command to create a new directory 'CSC389' under the current working directory on the UIS Unix Server. _________ CSC389

mkdir

A ____________ is a shared variable that can be in one of two states: unlocked or locked.

mutex

A _______________ resource is one that cannot be taken away from its current owner without potentially causing failure.

nonpreemptable

Complete the following command to remove a file 'Pipe.c' under the current working directory on the UIS Unix Server. __________ -f Pipe.c

rm

If only one CPU is available, a choice has to be made which process to run next. The part of the operating system that makes the choice is called the _____________.

scheduler

A real-time system is one in which ___________ plays an essential role.

time

Multiprogramming, spooling, and ________ are major breakthroughs presented in the third-generation operating systems.

timesharing

The system must _________ from user to kernel mode to fulfill the request when a service from the operating system is requested by a user application.

transition

Which of the following statement is FALSE?

Tablets, MP3 players, and smartphones are the best-known examples of PDA devices.

All multiprogramming systems are timesharing systems, but not all timesharing systems are multiprogramming systems.

False

Condition variables and mutexes are always used separately in Pthreads.

False

Hardware may trigger an interrupt by executing a special operation called a system call.

False

It is possible to have a deadlock involving only a single process.

False

Ordinary pipes are bidirectional, allowing two-way communication.

False

Race condition is a fundamental problem in distributed-memory programming.

False

Resources management includes multiplexing (sharing) resources in two different ways: in time and in cost.

False

The names of system calls used in each operating system are the same.

False

There is no any structure in monolithic systems.

False

Which of the following algorithm can be used in batch systems?

Shortest Job First

How many different operating system structures are discussed in our textbook?

Six

Which of the following item is private to each thread?

Stack

The aging algorithm with a = 1/2 is being used to predict run times. The previous three runs, from oldest to most recent, are 40, 20, and 40 msec. What's the sequence of predictions?

With a = 1/2, we get successive estimates of T0, T0/2 + T1/2, T0/4 + T1/4 + T2/2. Since T0 = 40 msec, T1 = 20 msec, and T2 = 40 msec, the sequence of predictions is 40, 30, 35.

Four conditions must hold for a (resource) deadlock: mutual exclusion condition, hold-and-wait condition, no-preemption condition, and ______________ condition.

circular wait

I/O devices generally consist of a _______ and device itself.

controller

If a resource graph contains one or more cycles, a ___________ exists.

deadlock


संबंधित स्टडी सेट्स

Pharm (Chapter 3-Toxic Effects of Drugs)

View Set

Soci 220 w/ Dr. Linneman (Exam 3) TAMU

View Set

Chapter 4 - Intellectual Property

View Set

chapter 11 quizzes (Spring 2015, Fall 2018, Spring 2016, Fall 2015, this years quiz)

View Set

BIOL 1030 - Chapter 12 MasteringBiology

View Set

MedSurg Ch 27- Assessment and Management of Patients with Hypertension

View Set

Real Estate Test 3, Real Estate Study Questions, Real Estate Test 2, Real Estate Test 1

View Set

International Chapter 8 questions

View Set