COE128 Exam - 2 Flashcards

1
Q

A program in execution

A

Process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Is the unit of execution within a process

A

Thread

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

As a process executes, _________.

A

it changes state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Defined in part by the current activity of that process.

A

The state of process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The process is being created

A

New

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Instructions are being executed

A

Running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The process is waiting for some even to occur ( such as an I/O completion or reception of a signal).

A

Waiting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The process is waiting to be assigned to a processor

A

Ready

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The process has finished execution

A

Terminated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Each process is represented in the OS by a _________________ - also called a _______________.

A

Process Control Block, Task Control Block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The state may be new, ready, running, waiting, halted, and so on.

A

Process State

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Indicated the address of the next instruction to be executed for this process.

A

Program Counter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Tells us the registers that are being used by a particular process.

A

CPU Registers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

This information includes a process priority, pointers, to scheduling queues, and any other scheduling parameters.

A

CPU-Scheduling Information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

This information may include such information as the value of the base and limit registered, the page tables, or the segment table, depending on the memory system used by the operating system.

A

Memory-Management Information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

This information includes the amount of CPU and real time used, time limits, account numbers, job or process numbers, and so on.

A

Accounting Information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

This information includes the list of I/O devices allocated to the process, a list of open files, and so on.

A

I/O Status Information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

The objective of _____________ is to have some process running at all times, to maximize CPU utlization.

A

Multiprogramming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

The objective of ____________ is to switch the CPU among processes so frequently that users can interact users can interact with each program while it is running.

A

Time Sharing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Selects an available process (possibly from a set of several available processes) for program execution on the CPU.

A

Process Scheduler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

For a ____________, there will never be more than one running process.

A

Single-Processor System

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

If there are ___________, the rest will have to wait until the CPU is free and can be rescheduled.

A

more processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Set of all the processes in the system.

A

Job Queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Set of all processes residing in main memory, ready and waiting to execute.

A

Ready Queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Set of processes waiting for an I/O device.

A

Device Queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

________ causes the OS to change a CPU from its current task and to run a _________.

A

Interrupts, kernel routine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

When a interrupt occurs, the system needs to save the current context of the process running on the CPU. So that it can restore that context when its process is done, essentially ____________.

A

Suspending the process and then resuming it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

It is represented in the PCB (Process Control Block) of the process.

A

Context

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Switching the CPU to another process requires performing a state save of the current process and a state restore of a different process.

A

Context Switch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

_____________ is pure overhead, because the system does no useful work while switching.

A

Context-Switch Time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Speed varies from machine to machine depending on:

A
  • Memory Speed
  • Number of registers that must be copied.
  • Existence of special instructions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

A process may create several new processes, via a _____________, during the course of execution.

A

create-process system call

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

The creating process is called a _________.

A

Parent Process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

The new processes are called the ___________.

A

Children of that process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Each of these new processes may in turn create other processes, forming a ___________.

A

Tree of Processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

Most OS identity process according to a unique __________ which is typically an integer number.

A

Process identifier (PID)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

When a process creates a new process, two (2) possibilities exist for execution:

A
  1. The parent continues to execute concurrently with its children.
  2. The parent waits until some of all its children have terminated.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

There are two (2) possibilities for the address space of the new process:

A
  1. The child process is a duplicate of the parent process(it has the same program and data as the parent).
  2. The child process has a new program loaded into it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

A process terminates when it finishes executing its final statement and asks the OS to delete it by using the _____________.

A

exit() system call

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

The process may return a _________ to its parent process (via the _____________)

A

status value, wait() system call

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

All the resources of the process including physical and virtual memory, open files, and I/O buffers are _____________.

A

deallocated by the OS

42
Q

A process can cause the termination of another process via an _____________.

A

Appropriate System Call

43
Q

A parent may terminate the execution of one of its children for variety of reasons, such as these:

A
  • The child has exceeded its usage of some of the resources that it has been allocated.
  • The task assigned to the
    child is no longer required.
  • The parent is exiting, and the OS does not allow a child to continue if its parent terminates.
44
Q

Cannot affect or be affected by other processes executing in the system.

A

Independent Process

45
Q

Can affect or be affected by other processes executing in the system.

A

Cooperating Process

46
Q

Several reasons for providing an environment that allows process cooperation:

A
  • Information Sharing
  • Computation Speedup
  • Modularity
  • Convenience
47
Q

Cooperating processes require an ____________ mechanism that will allow them to exchange data and information.

A

Interprocess Communication (IPC)

48
Q

Two (2) Fundamentals Models of Interprocess Communication

A
  • Shared Memory
  • Message Passing
49
Q

A region of memory that is shared by cooperating processes is established.

A

Shared Memory

50
Q

Communication takes place by means of messages exchanged between the cooperating processes.

A

Message Passing

51
Q

Interprocess communication using shared memory requires _________________ to establish a region of shared memory.

A

communicating process

52
Q

Other processes that wish to communicate using this shared-memory segment must ____________.

A

attach it to their address space.

53
Q

Tries to prevent one process from accessing another process’s memory

A

Operating System

54
Q

Shared Memory requires that _____________________.

A

two or more processes agree to remove this restriction

55
Q

A ___________ produces information that is consumed by a ______________.

A

Producer process, Consumer Process

56
Q

One solution to the producer-consumer problem uses ______________.

A

Shared Memory

57
Q

To allow producer and consumer processes to run _______________, we must have available a _________ of items that can be filled by the producer and emptied by the consumer.

A

concurrently, buffer

58
Q

The producer and consumer must be __________, so that the consumer does not try to consume an item that has not yet been produced.

A

synchronized

59
Q

Two (2) Kinds Of Buffer

A
  • Unbounded Buffer
  • Bounded Buffer
60
Q

Places no practical limit on the size of the buffer. The consumer may have to wait for new items, but the producer can always produce new items.

A

Unbounded Buffer

61
Q

Assumes a fixed buffer size. In this case, the consumer must wait if the buffer is empty, and the producer must wait if the buffer is full.

A

Bounded Buffer

62
Q

Provides a mechanism to allow processes to communicate and to synchronize their actions without sharing the same address space.

A

Message Passing

63
Q

Message passing is particularly useful in a ___________, where the communicating process may reside on different computers connected by a network.

A

Distributed environment

64
Q

A message-passing facility provides at least two (2) operations:

A
  • Send (message)
  • Receive (message)
65
Q

Messages sent by a process can be either:

A
  • Fixed Size
  • Variable Size
66
Q

If processes P and Q wish to communicate, they need to:

A
  • Exchange messages via send/receive.
  • Establish a communication link between them.
67
Q

Logical Implementation of communication link:

A
  • Direct or Indirect
  • Synchronous or Asynchronous
  • Automatic or Explicit Buffering
68
Q

Each process that wants to communicate _____________ .

A

must explicitly name the recipient or sender of the communication

69
Q

Send a message to process P.

A

Send (P, message)

70
Q

Receive a message from process Q.

A

Receive (Q, message)

71
Q

A ________ is established automatically between every pair of processes that want to communicate.

A

Link

72
Q

The process needs to know only each other’s _________ to communicate.

A

Identity

73
Q

A link associated with exactly _____________ .

A

Two Processes

74
Q

Between each pair of processes, there exists ___________.

A

exactly one link

75
Q

The messages are sent to and receive from mailboxes, or ports.

A

Indirect Communication

76
Q

Each mailbox has a __________.

A

unique id

77
Q

Processes can communicate only if _____________________.

A

they share a mailbox

78
Q

The operating system then must provide a mechanism that allows a process to do the following:

A
  • Create new mailbox
  • Send and receive messages through the mailbox
  • Delete mailbox
79
Q

Message passing may be either ________________ - also known as ______________.

A

blocking or nonblocking, synchronous or asynchronous

80
Q

The sending process is blocked until the message is received by receiving process or by the mailbox.

A

Blocking Send

81
Q

The sending process sends the message and resumes operation.

A

Nonblocking Send

82
Q

The receiver block until a message is available.

A

Blocking Receive

83
Q

The receiver retrieves either a valid message or null.

A

Nonblocking Receive

84
Q

Messages exchanged by communicating process resides in a temporary queue which can be implemented in 3 ways:

A
  • Zero Capacity
  • Bounded Capacity
  • Unbounded Capacity
85
Q

No messages are queued on a link.

A

Zero Capacity (No buffering System)

86
Q

Finite length of n messages. Sender must wait if the link is full.

A

Bounded Capacity (Automatic Buffering)

87
Q

Infinite length and sender never waits.

A

Unbounded Capacity (Automatic Buffering)

88
Q

Is defined as an endpoint of communication.

A

Socket

89
Q

A pair of processes communicating over a network employ ____________________.

A

a pair of sockets - one for each process

90
Q

A socket is identified by an ____________________.

A

IP address concatenated with a port number.

91
Q

The server waits for incoming client request by _____________.

A

Listening to a specified port

92
Q

Examples of Server implementing specific services.

A
  • telnet
  • FTP
  • HTTP
93
Q

Servers implementing specific services listen to ____________.

A

well-known ports

94
Q

___________________ are considered well known; we can use them to implement standard services.

A

All ports below 1024

95
Q

If another process also on host X wished to establish another connection with the same Web server, it would be assigned a ______________________.

A

port number greater than 1024 and not equal to 1625

96
Q

All connection should consist of a ______________.

A

Unique pair of sockets

97
Q

Two (2) Types of Sockets

A
  • Stream Sockets (TCP)
  • Datagram Sockets (UDP)
98
Q

These provide reliable, connection-oriented, and stream-oriented communication.

A

Stream Sockets (TCP)

99
Q

These are connectionless and provide unreliable, message-oriented communication.

A

Datagram Sockets (UDP)

100
Q

The IP address ______________ is a special IP address known as the loopback.

A

127.0.0.1