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
Set of processes waiting for an I/O device.
Device Queue
26
________ causes the OS to change a CPU from its current task and to run a _________.
Interrupts, kernel routine
27
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 ____________.
Suspending the process and then resuming it
28
It is represented in the PCB (Process Control Block) of the process.
Context
29
Switching the CPU to another process requires performing a state save of the current process and a state restore of a different process.
Context Switch
30
_____________ is pure overhead, because the system does no useful work while switching.
Context-Switch Time
31
Speed varies from machine to machine depending on:
- Memory Speed - Number of registers that must be copied. - Existence of special instructions.
32
A process may create several new processes, via a _____________, during the course of execution.
create-process system call
33
The creating process is called a _________.
Parent Process
34
The new processes are called the ___________.
Children of that process
35
Each of these new processes may in turn create other processes, forming a ___________.
Tree of Processes
36
Most OS identity process according to a unique __________ which is typically an integer number.
Process identifier (PID)
37
When a process creates a new process, two (2) possibilities exist for execution:
1. The parent continues to execute concurrently with its children. 2. The parent waits until some of all its children have terminated.
38
There are two (2) possibilities for the address space of the new process:
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.
39
A process terminates when it finishes executing its final statement and asks the OS to delete it by using the _____________.
exit() system call
40
The process may return a _________ to its parent process (via the _____________)
status value, wait() system call
41
All the resources of the process including physical and virtual memory, open files, and I/O buffers are _____________.
deallocated by the OS
42
A process can cause the termination of another process via an _____________.
Appropriate System Call
43
A parent may terminate the execution of one of its children for variety of reasons, such as these:
- 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
Cannot affect or be affected by other processes executing in the system.
Independent Process
45
Can affect or be affected by other processes executing in the system.
Cooperating Process
46
Several reasons for providing an environment that allows process cooperation:
- Information Sharing - Computation Speedup - Modularity - Convenience
47
Cooperating processes require an ____________ mechanism that will allow them to exchange data and information.
Interprocess Communication (IPC)
48
Two (2) Fundamentals Models of Interprocess Communication
- Shared Memory - Message Passing
49
A region of memory that is shared by cooperating processes is established.
Shared Memory
50
Communication takes place by means of messages exchanged between the cooperating processes.
Message Passing
51
Interprocess communication using shared memory requires _________________ to establish a region of shared memory.
communicating process
52
Other processes that wish to communicate using this shared-memory segment must ____________.
attach it to their address space.
53
Tries to prevent one process from accessing another process's memory
Operating System
54
Shared Memory requires that _____________________.
two or more processes agree to remove this restriction
55
A ___________ produces information that is consumed by a ______________.
Producer process, Consumer Process
56
One solution to the producer-consumer problem uses ______________.
Shared Memory
57
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.
concurrently, buffer
58
The producer and consumer must be __________, so that the consumer does not try to consume an item that has not yet been produced.
synchronized
59
Two (2) Kinds Of Buffer
- Unbounded Buffer - Bounded Buffer
60
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.
Unbounded Buffer
61
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.
Bounded Buffer
62
Provides a mechanism to allow processes to communicate and to synchronize their actions without sharing the same address space.
Message Passing
63
Message passing is particularly useful in a ___________, where the communicating process may reside on different computers connected by a network.
Distributed environment
64
A message-passing facility provides at least two (2) operations:
- Send (message) - Receive (message)
65
Messages sent by a process can be either:
- Fixed Size - Variable Size
66
If processes P and Q wish to communicate, they need to:
- Exchange messages via send/receive. - Establish a communication link between them.
67
Logical Implementation of communication link:
- Direct or Indirect - Synchronous or Asynchronous - Automatic or Explicit Buffering
68
Each process that wants to communicate _____________ .
must explicitly name the recipient or sender of the communication
69
Send a message to process P.
Send (P, message)
70
Receive a message from process Q.
Receive (Q, message)
71
A ________ is established automatically between every pair of processes that want to communicate.
Link
72
The process needs to know only each other's _________ to communicate.
Identity
73
A link associated with exactly _____________ .
Two Processes
74
Between each pair of processes, there exists ___________.
exactly one link
75
The messages are sent to and receive from mailboxes, or ports.
Indirect Communication
76
Each mailbox has a __________.
unique id
77
Processes can communicate only if _____________________.
they share a mailbox
78
The operating system then must provide a mechanism that allows a process to do the following:
- Create new mailbox - Send and receive messages through the mailbox - Delete mailbox
79
Message passing may be either ________________ - also known as ______________.
blocking or nonblocking, synchronous or asynchronous
80
The sending process is blocked until the message is received by receiving process or by the mailbox.
Blocking Send
81
The sending process sends the message and resumes operation.
Nonblocking Send
82
The receiver block until a message is available.
Blocking Receive
83
The receiver retrieves either a valid message or null.
Nonblocking Receive
84
Messages exchanged by communicating process resides in a temporary queue which can be implemented in 3 ways:
- Zero Capacity - Bounded Capacity - Unbounded Capacity
85
No messages are queued on a link.
Zero Capacity (No buffering System)
86
Finite length of n messages. Sender must wait if the link is full.
Bounded Capacity (Automatic Buffering)
87
Infinite length and sender never waits.
Unbounded Capacity (Automatic Buffering)
88
Is defined as an endpoint of communication.
Socket
89
A pair of processes communicating over a network employ ____________________.
a pair of sockets - one for each process
90
A socket is identified by an ____________________.
IP address concatenated with a port number.
91
The server waits for incoming client request by _____________.
Listening to a specified port
92
Examples of Server implementing specific services.
- telnet - FTP - HTTP
93
Servers implementing specific services listen to ____________.
well-known ports
94
___________________ are considered well known; we can use them to implement standard services.
All ports below 1024
95
If another process also on host X wished to establish another connection with the same Web server, it would be assigned a ______________________.
port number greater than 1024 and not equal to 1625
96
All connection should consist of a ______________.
Unique pair of sockets
97
Two (2) Types of Sockets
- Stream Sockets (TCP) - Datagram Sockets (UDP)
98
These provide reliable, connection-oriented, and stream-oriented communication.
Stream Sockets (TCP)
99
These are connectionless and provide unreliable, message-oriented communication.
Datagram Sockets (UDP)
100
The IP address ______________ is a special IP address known as the loopback.
127.0.0.1