Thẻ ghi nhớ: Operating Systems Midterm | Quizlet

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/65

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

66 Terms

1
New cards

The cost-per-bit increases as you traverse down (registers-to-tape) the memory hierarchy. (T or F)

False

2
New cards

If in 2025 there is a technology that allows main memory to be just as fast as the CPU, then continuing to use a cache would be just as valid as it is now. (T or F)

False

3
New cards

Processes must be able to have read access permissions to regions in memory that belong to other processes to maximize performance and ensure high throughput. (T or F)

False

4
New cards

The code for the kernel is a small fraction of the codebase for the Operating System and provides core functionality for the OS processes to use. (T or F)

True

5
New cards

Main memory is managed by the ___________.

OS

6
New cards

The access times decrease as you traverse up the memory (tapes-to-registers) hierarchy. (T or F)

True

7
New cards

To ensure efficiency and uninterrupted execution, processes executing in the user mode are allowed to disable timer interrupts. (T or F)

False

8
New cards

Operating Systems act as a "glue" by making sure that users understand every mechanism of every device on a given computer system before using it. (T or F)

False

9
New cards

The ISA (Instruction Set Architecture) for most processors include instructions that operate on disk addresses in addition to those that operate on registers and memory locations. (T or F)

False

10
New cards

Caches are important because of the difference in speed between the CPU and main memory. (T or F)

True

11
New cards

END CHAPTER ONE

End of Chapter One

12
New cards

Temporary variables of a function/method are allocated on the stack. (T or F)

True

13
New cards

A single processor may be shared among several processes. (T or F)

True

14
New cards

Consider the code snippet:

childPID = fork()

The parent has a process-ID of 31425 and the newly created child has a process-ID of 27182.

The value of the variable childPID in the parent is ____________.

27182

15
New cards

The process control block (PCB) contains information about a process and is used during context-switching between processes. The PCB for every process is maintained in the cache. (T or F)

False - its stored in main memory

16
New cards

All processes in UNIX are created using the fork() system call. (T or F)

True

17
New cards

Allocation of memory is enough to make a program a process. (T or F)

False

18
New cards

To run the program, the kernel copies the instructions and data from the executable image into physical memory. (T or F)

True

19
New cards

When a child process is created with fork() it inherits its parent's group ID. (T or F)

True

20
New cards

ISA tracks IDs and process states. (T or F)

False

21
New cards

When fork() fails, it is possible that a child may still be created. (T or F)

False

22
New cards

END OF CHAPTER 2

END OF CHAPTER 2

23
New cards

An advantage of the Microkernel architecture is that since most functionality is provided as user processes, even if one of these user processes crashes, it does not result in a crash of the operating system.

True

24
New cards

A FIFO pipe's lifespan is no longer than the process that created it.

False

25
New cards

When performing IPC between processes using shared memory, it is the kernel's responsibility to ensure safety among processes by avoiding race conditions.

False

26
New cards

Processes D, E, and F all send a message to a mailbox owned by process A. Who can receive the messages that arrive in the mailbox owned by A?

- Only A

- Only the original sender and A

- D, E, F, and A

Only A

27
New cards

Consider a process A that has created a shared memory segment. If process B knows the memory address of this segment, process B does not need to attach itself to this segment and can directly access the shared memory. (T or F)

False

28
New cards

RPC allows a process to invoke a function in another process over the network.

True

29
New cards

Inter-process communications using message passing is significantly faster than using shared memory communications.

False

30
New cards

In UNIX a child process inherits any pipes that belong to its parent.

True

31
New cards

After launching a process in the shell with a trailing '&' character, you can terminate it with CTRL + C.

False

32
New cards

Ordinary pipes in Unix and Windows require a parent-child relationship.

True

33
New cards

END CHAPTER 3

END OF CHAPTER 3

34
New cards

Consider a Thread T1 that invoked method x, which resulted in the invocation of method y, which resulted in the invocation of method z.

All stack frames on the thread T1's stack must be of the same size.

False

35
New cards

The POSIX threading library includes routines to create multiple processes within a thread.

False

36
New cards

In the case of user-level threads, it is the programmer's responsibility to avoid lock-out situations by forcing CPU-bound threads within that process to yield control.

True

37
New cards

Though threads simplify sharing within a process, context-switching between threads within a process is just as expensive as context-switching between processes.

False

38
New cards

User-level threads within a process can only compete for processor resources allocated to the process.

True

39
New cards

The many-to-one thread model mapping multiple user-level threads to a kernel-level thread results in true concurrency.

False

40
New cards

When a process crashes, some threads within that process can continue to operate.

False

41
New cards

Temporary variables of a function/method are allocated on the stack.

True

42
New cards

Context-switching between threads is more time-consuming than context-switching between processes.

False

43
New cards

A single threaded process can only execute on one core, regardless of how many cores are available.

True

44
New cards

END OF CHAPTER 4

END OF CHAPTER 4

45
New cards

In Peterson's solution, bounded wait is possible because the algorithm allows processes to take turns entering the critical section.

True

46
New cards

Consider a system of n processes, each with a different critical section where common variables are being modified. At most 2 processes can execute in their critical section at the same time.

False

47
New cards

In the priority inheritance protocol, a process accessing a resource needed by higher priority process forces the higher priority process to lower its priority while it finishes resource usage.

False

48
New cards

For a set of processes involved in a race condition, the outcome depends on the order in which data accesses take place.

True

49
New cards

A process executing an atomic hardware instruction cannot be context-switched regardless of how many clock cycles it takes to complete that instruction.

True

50
New cards

The critical section is a segment of code where changes are made to resources (files, memory, etc.) shared by multiple processes.

True

51
New cards

Consider the code snippet below which someone claims is the entry section to the critical section for process Pi in Peterson's solution.

flag[i] = TRUE;

turn = i;

while (flag[i] && turn==i) {;}

Is this a valid entry section?

- No; processes will never enter the critical section because they are busy waiting.

- Yes; processes will take turns entering the critical section.

- Yes; processes are assured progress.

- No; processes don't have to wait to enter the critical section

No; processes will never enter the critical section because they are busy waiting.

52
New cards

In solutions to the critical section problem, processes that are executing in their remainder section make decisions about who gets to enter the critical section next.

False

53
New cards

Solutions to the critical section problem must target mutual exclusion but not necessarily bounded-wait.

False

54
New cards

Peterson's solution is a software solution to the critical section problem involving an arbitrary number of processes.

False

55
New cards

END OF CHAPTER 5

END OF CHAPTER 5

56
New cards

Spinlocks are suited for cases where critical section segments have thousands of lines of code.

False

57
New cards

In the FIRST readers-writers problem, no reader should wait for other readers to finish simply because a writer is waiting. In this case the readers may starve.

False

58
New cards

In the producer-consumer problem with a bounded-buffer, if the buffer is full and the producer is ready to add content, the size of the buffer is automatically extended to reduce producer wait times.

False

59
New cards

Assume a system crashes and is brought back up with the following checkpoint-based log.

/ begin of log //

// end of log //

Which transactions must be redone?

T3 and T5

60
New cards

Mutual exclusion is provided within a monitor.

True

61
New cards

Threads can be blocked on more than one object at a time.

False

62
New cards

The binary semaphore can be used in settings involving more than two processes trying to coordinate accesses to the critical section.

True

63
New cards

Every instruction must execute within the confines of a thread, but that statement may be executed by multiple threads.

True

64
New cards

Turnstiles are queue structures containing threads blocked on a lock. Turnstiles are associated with threads not objects.

True

65
New cards

The signal() operation on a monitor is not persistent. If a signal() is performed, and no process is waiting that signal is ignored.

True

66
New cards

END OF CHAPTER 6

END OF CHAPTER 6