final exam operating systems

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

1/199

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.

200 Terms

1
New cards
What characterizes an Operating System the most?

a) System calls

b) Command interpreter c) The shell \n d) Commands
a
2
New cards
What information about a file is NOT returned in the struct stat by the STAT call?

a) The file size

b) The name of the file

c) The type of file \n d) The date of the last access to the file.
b
3
New cards
What service ends the execution of a process?

a) return b) end \n c) finish d) exit
d
4
New cards
Which service duplicates the process that invokes the call

a) exec b) clone c) fork d) creat
c
5
New cards
What descriptor predefines standard output?

a) 0

b) 1

c) 2 d) 3
b
6
New cards
\- What service allows to create a file

a) mkfile b) read c) touch d) creat
d
7
New cards
Which service allows to modify the attributes for an open file

a) fnclt

b) chmod c) attribute d) fstat
a
8
New cards
How does a microkernel tell a handler that an interrupt has occurred?

a) Using a shared variable.

b) A message.

c) A semaphore \n d) A condition variable
b
9
New cards
The UNIX operating system has a structure

a) Layered \n b) virtual machines 

c) Monolithic

d) Client-Server
c
10
New cards
What system call can be invoked with a variable number of arguments?

a) fork

b) write

c) creat

d) None of them
d
11
New cards
What is false about the EXEC system call?

a) Change the memory image of a process \n b) Allows passing arguments to the called program 

c) Change the identifier of the process

d) Keeps descriptors open.
c
12
New cards
What feature is not a requirement of an OS's memory management system?

a) relocation

b) sharing \n c) memory allocation \n d) Virtual to physical address translation.
d
13
New cards
Choose the correct statement related to the bootstrap program: \n a) Typically stored in the RAM, generally known as firmware. \n b) It is loaded only in the reboot. \n c) Loads the operaTng system the kernel and the user applicaTons d) None of the above.
d
14
New cards
Where does the OS load a program before execuTng it?

a) EPROM

b) ROM

c) RAM

d) Any Storage Device.
c
15
New cards
\n What do we understand as a trap when referring to operaTng system operaTions?

a) An infinite loop from which you cannot exit. \n b) A secTon of code which is not performing as intended.

c) A request from the user program.

d) None of the above
d
16
New cards
Which are the main advantages of the usage of mulTprocessor systems?

a) Less throughput, more reliability, less cost.

b) Greater throughput

c) Greater throughput, easier to implement, less cost.

d) None of the above. \n
b
17
New cards
17 - Which one of the following can be considered part of the operaTng system?

a) kernel and file manager

b) kernel and web browser \n c) file manager without kernel

d) none of the above
a
18
New cards
Which of the following tasks is performed by the kernel? a) Memory management. \n b) Scheduling tasks for the CPU to run. \n c) File management.

d) All previous answers are correct.
d
19
New cards
Select the correct statement about the bootstrap:

a)  It is the program loaded at the startup of the computer that ini&alizes the opera&ng

system.

b)  It is located in a random address in the main memory of the computer.

c)  It is a program that determines the type of interrupt in the interrupt handling proccess.

d)  It is always saved in a SRAM
a
20
New cards
20 - Which one of the following definition describes a program correctly:

a) a program is the same as a process \n b) a program is an acTve enTty being executed in the cpu

c) a program is a passive en&ty stored in files

d) a program contains only one process
c
21
New cards
Which kind of processes are stored in the ready queue? \n 1. Ready queues do not store any processes, it is a reserved space of the system \n 2. Those processes that reside in main memory and are ready and waiting to be executed

3\. The processes that are wai>ng for I/O device \n 4. All the answers are correct
2
22
New cards
What is a zombie process? \n 1. A process which has terminated, but whose parent has not called the wait system call yet 2. The resulting process of executing wait before the parents process execution \n 3. A process which is removed out of memory because it is no longer required \n 4. All the answers are wrong
1
23
New cards
If you had to save private data, why should you never use threads? \n 1. It takes a lot of time accessing to a thread \n 2. Its response time is very short, but it requires the consumption of many hardware resources

3\. None of these answers is correct. Threads can be used to save private data safely. \n 4. Threads share the same data space, thus one thread can steal private data from the other.
3
24
New cards
Select the incorrect answer: Process Control Blocks... \n 1. Are stored in a global process table \n 2. Store information related with the program counter

3\. Store information related with the CPU registers \n 4. Are deleted when the process related to it is stopped
4
25
New cards
Select the correct answer: \n 1. POSIX Pthreads are implemented in user level and kernel level \n 2. Win32 library is implemented only in user level \n 3. Java library relies on the configuration of the Java API, which varies from one OS to another 4. None of the answers are correct
1
26
New cards
What is the heap of a process? \n 1. The name and identification code of the process. \n 2. The code of the process. \n 3. Dynamically allocated memory. \n 4. A piece of previously allocated memory containing global variables.
3
27
New cards
What is a zombie process? \n 1. A process with completed execution which still has an entry in the process table. \n 2. A process that was stopped in the middle of its execution and has not been completely

terminated. \n 3. A process without father. \n 4. A process that has exceeded allocated resources.
1
28
New cards
Which one of these sentences describes the many-to-one multithreading model? \n 1. Allows multiple threads to run in parallel on multiprocessors. \n 2. Several kernel threads are mapped to a single user thread. \n 3. If a thread makes a blocking system call the kernel manages another thread for execution. 4. The entire process is blocked if a thread makes a blocking system call.
4
29
New cards
When a parent process create a child process by means of a fork():


1. Both parent and child process share the pid.
2. The return code for the fork() is zero for the parent process, whereas the parent process

identifier (nonzero) is returned to the child.
3. If the parent process is killed, its children processes will become orphans and will have no

parent to collect their status.
4. The return code for the fork() is the child’s pid for the parent process, whereas a zero value is

returned to the child.
4
30
New cards
Processes migrate during its lifetime through the different queues, therefore, for scheduling purposes:


1. A long-term scheduler is needed to select the next active process to be executed and allocate

CPU for it.
2. A short-term scheduler is needed to select process to be brought into the ready queue from

disk.
3. A medium-term scheduler can be used to improve the process mix by swapping processes in

and out the CPU.
4. All the previous are correct.
3
31
New cards
If we want to terminate a thread before it has competed its execution: \n 1. It is not possible to terminate a thread before it completes. \n 2. The target thread is terminated immediately. \n 3. The target thread can be configured to periodically check whether it should terminate. If so, it terminates itself.

4\. Both b) and c)
4
32
New cards
Select the correct statement:


1. There are two different schedulers: CPU scheduler, in charge of selecting the process from the

ready queue and I/O scheduler selecting the process in the I/O queue
2. The Short-term scheduler is much slower than the Long-term scheduler.
3. The Short-term scheduler selects which process should be executed next in the CPU.
4. The Long-term scheduler selects which processes should abandon the CPU and terminates

them.
3
33
New cards
In thread cancellation:


1. There are three approaches: Synchronous cancella>on, Asynchronous cancellation and

Deferred cancellation.
2. Synchronous cancellation allows the target thread to periodically check if it should be

cancelled.
3. Asynchronous cancellation terminates the target thread immediately.
4. The cancellation points are those from where the OS can recover the threads terminated since that moment, they are assigned periodically by the kernel.
3
34
New cards
The process memory space does not include...:

1\. Stack

2\. Code section

3\. State \n 4. Data section
3
35
New cards
The Many-to-Many model...: \n 1. Is a many user-level threads mapped to single kernel thread \n 2. Allows many user level threads to be mapped to many kernel threads

3\. Allows a user thread to be bound to kernel thread \n 4. Has a expensive crea>on of kernel threads
3
36
New cards
What happens when a parent exits and its child processes still runs? 1. Only the child PCB is destroyed. \n 2. The child process becomes an zombie process \n 3. The child process becomes an orphan process

4\. None of the above.
3
37
New cards
What is a process?

1\. A program.

2\. An executable file. \n 3. An active entity with a set of associated resources.

4\. A file containing a list of instructions stored in a disk.
3
38
New cards
Thread pools: \n 1. Are a possible solution for multi-threading problems. \n 2. Contain the maximum threads available depending on the amount of memory.

3\. Are usually faster and efficient. \n 4. All previous answers are correct.
4
39
New cards
Which of the following statements is correct? \n 1. The short-term scheduler can temporarily remove a process from main memory (swap out).

2\. The mid-term scheduler can temporarily remove a process from main memory (swap out).

3\. The short-term scheduler decides what jobs will be admi\`ed to the ready queue. \n 4. The mid-term scheduler decides what jobs will be admi\`ed to the ready queue.
2
40
New cards
Select the false statement. When cancelling a thread in asynchronous mode: \n 1. The cancel request will be delivered immediately. \n 2. The cancel request will wait until the thread reaches a cancellation point 3. You have a risk of causing memory leaks. \n 4. You have a risk of blocking other threads forever.
2
41
New cards
Which one is the frequency of a short-term scheduler?

1\. Seconds.

2\. Milliseconds.

3\. Minutes. \n 4. Hours.
2
42
New cards
Which of the following is NOT shared by threads of one process?

1\. Code.

2\. Open files.

3\. Signals. \n 4. Registers
4
43
New cards
When a process is in the state running and changes to ready, what has happened?

1\. It has been interrupted \n 2. It is waiting for and event \n 3. It is ready to exit

4\. None of the above
1
44
New cards
In UNIX systems, what is the function of fork? \n 1. Exit a program \n 2. Fork system call interrupts a process for waiting an I/O device \n 3. Fork system call creates new process \n 4. Fork system replace the process memory space with a new program
3
45
New cards
The Many-To-Many model allows to: \n 1. Allows many user level threads to be mapped to many kernel threads

2\. Allows many kernel level threads to be used as user threads \n 3. Have only one kernel thread \n 4. Rewrite the scheduler and the dispatcher
1
46
New cards
What does it mean that a process terminates in a Zombie termination? \n 1. That a process has completed execution but still has an entry in the process table. 2. That a process has no father, so it has not a entry in the process table. \n 3. That a process is unable to create child processes, because it is corrupted. \n 4. That a process has no father.
1
47
New cards
Choose the incorrect answer. \n 1. Threads are created slower than processes \n 2. Threads share resources inside each process \n 3. Several tasks can be performed concurrently \n 4. Threads can run on a multiprocessor system in parallel
1
48
New cards
What is the incorrect answer. What is a zombie process?

1\. A process with no process control block (PCB)

2\. A PCB with no process \n 3. A process that terminates other processes

4\. None of the above
2
49
New cards
Which of the following is a model of interprocess communication (IPC)?

1\. Interrupts

2\. Create a process that acts as a messenger \n 3. Message passing \n 4. Process don’t communicate with each other
3
50
New cards
What is the difference between preemptive and nonpreemptive scheduling? \n 1. Non-preemptive scheduling is more efficient than preemptive \n 2. In preemptive scheduling there are no interruptions \n 3. In preemptive scheduling there are interruptions while in nonpreemptive there are not. 4. A process runs all the time in CPU with non-preemptive scheduling.
3
51
New cards
What is the difference if any between parallelism and concurrency \n 1. Parallelism refers to allowing more than one task to make progress and concurrency refers to

running more than one task simultaneously. \n 2. Parallelism refers to running more than one task simultaneously and concurrency refers to

allowing more than one task to make progress. \n 3. Both are the same. \n 4. With concurrency only one task is executed, with parallelism there are executed several tasks.
2
52
New cards
Which of the following options occur when we cancel a thread using deferred cancellation?

1\. Resources remain unallocated \n 2. Terminate immediately the thread without checking \n 3. Cancellation will occur ader being processed by the cancelled thread

4\. None of the above can happen
3
53
New cards
Which of these sentences is correct?


1. If a parent process does not collect the exit code of a child process with wait, the child process

becomes an orphan adopted by init process, with pid = 1.
2. The ready queue selects which process should be executed next
3. A process may include the text section, data section, program counter, stack and heap
4. If a process is waiting for some event to occur, such as reception of a signal, it is in the ready

queue.
3
54
New cards
Which of these process components are not shared across threads in a multithread process?

1\. The code of the program \n 2. The global variables \n 3. The stack

4\. The files
3
55
New cards
Which of these characteristics is not a benefit of multithread processes?

1\. Easiness of debugging

2\. Responsiveness \n 3. Economy \n 4. Scalability
1
56
New cards
Which of the following sentences about interprocess communication is True? \n 1. Message passing is faster than shared memory but it may create conlicts \n 2. Message passing is useful for small amounts of data but it takes more time than shared

memory. \n 3. Shared memory use way more system calls than message passing

4\. All of the previous sentences are false
2
57
New cards
Which of the following is NOT a valid Multithreading model? (User to Kernel)

1\. One to Many \n 2. Many to one \n 3. Many to many

4\. One to one
1
58
New cards
Choose the correct statement related with the interprocess communication: \n 1. An independent process never needs to perform interprocess communication. \n 2. A cooperating process can affect or be affected by the execution of another process, without

including sharing data. \n 3. Cooperating processes need interprocess communication(IPC), which are message passing and

shared memory. \n 4. None of the above.
3
59
New cards
Choose the correct statement related to the many-to-many model:


1. The advantage of this model is that when one user thread blocks, the rest can execute if they

are assigned to a different kernel thread.
2. It allows the operating system to create a sufficient number of kernel threads.
3. An example of this model is IRIX.
4. The context switch is in user lever, which makes it fast.
1
60
New cards
What is a job scheduler?: \n 1. It is a scheduler that selects processes from the pool of jobs pending to execute and loads them

into memory. \n 2. It is a scheduler that selects processes with more frequency than the CPU scheduler \n 3. It is a scheduler that selects from among the processes that are ready to execute and allocates

them on the CPU. \n 4. It is a scheduler not in charge of the degree of multiprogramming.
1
61
New cards
What happens when a child process is terminated?: \n 1. The parent of the process terminates also, always. \n 2. All the resources of the process are deallocated by the CPU. \n 3. No resources are deallocated so they can be used by other process and therefore maximize CPU usage.

4\. All the resources of the process are deallocated by the Operating System.
4
62
New cards
In a multithreaded program, a signal is usually delivered to: \n 1. Every thread in the process. \n 2. Certain threads in the process. \n 3. A specific thread that receives all the signals for the process.

4\. All the options can be correct.
4
63
New cards
What is the difference between the process state of ‘Ready’ and ‘Waiting’? \n 1. During the ‘Ready’ state the process is waiting until a certain event occurs, whereas ‘Waiting’

indicates the process is wai>ng on itself to finish \n 2. During the ‘Ready’ state the process is wai>ng to be assigned to a processor, whereas ‘Waiting’

indicates the process is waiting for an event to occur \n 3. During the ‘Ready’ state the process is ready to receive the next instruction, whereas ‘Waiting’

indicates the process is busy and can’t receive the next instruction \n 4. During the ‘Ready’ state the process is waiting to be assigned to a processor, whereas ‘Waiting’ 2indicates the process’s instructions are being executed
2
64
New cards
Which of the following is false. \n 1. A running process could make an I/O request and then be placed in an I/O queue \n 2. All of them are false. \n 3. A running process could be removed forcibly by the CPU and terminated \n 4. A running process could be removed forcibly the CPU and be put back in the ready queue
2
65
New cards
Where the processes ready to execute can be found? \n 1. In hard disk. \n 2. In ready queue. \n 3. It is always only one process ready to execute. \n 4. All processes which are ready are immediately executed.
2
66
New cards
What is a device queue? \n 1. The list of processes waiting for particular I/O device.

2\. The list of devices waiting for access to the processor.

3\. It is other name of ready queue. \n 4. It is mechanism which can be found only in Linux.
1
67
New cards
What part of the OS design can be affected by using or not using preemption?

1\. The scheduler \n 2. The file system manager \n 3. Both a and b are correct

4\. Neither a nor b are correct
1
68
New cards
What are drawbacks of process-based servers? \n 1. It is necessary to fork for each new request, and it has a high resource use


2. It is necessary to destroy a process for each processed request and it consumes auxiliary graphic card processor
3. It is necessary to destroy a process for each processed request and it can destroy threads
4. It can destroy threads and it has a high resource use.
1
69
New cards
In which scheduling algorithm can we find a ‘convoy effect’?

1\. Priority scheduling algorithm \n 2. Shortest-job-first scheduling (SJF) \n 3. Round-Robin scheduling (RR)

4\. First-come, first-served scheduling algorithm (FCFS)
4
70
New cards
The time quantum in the Round-Robin scheduling algorithm… \n 1. It should be small compared with the context switch. \n 2. If it is too large, RR degenerates to FCFS. \n 3. If it is too small, RR creates the appearance that each process has its own processor (processor sharing). \n 4. Both b) and c) are correct.
4
71
New cards
Select the correct statement concerning the process schedulers:


1. A scheduler with a First Come First Served policy is always preemptive since each process that

arrives to the waiting queue goes directly to the processor.
2. Using a round robin scheduler with a very big time quantum is the same than using a shortest job first (SJF) scheduling since those processes with shortest burn time will be executed first.
3. The round robin scheduler preempts the running process when the time quantum has been consumed and adds this process to the end of the waiting queue.
4. The main advantage of using Priority Scheduling is the avoidance of the problem of starvation, as this policy is a non-preemptive one.
3
72
New cards
For optimizing scheduling criteria, which of the next actions would be appropriate?

1\. Maximize throughput, minimize turnaround time. \n 2. Maximize throughput, maximize turnaround time. \n 3. Minimize throughput, maximize turnaround tome.

4\. Minimize throughput, minimize turnaround time.
1
73
New cards
Which of this schedulers cannot be used with a not preemptive scheduler?

1\. First-Come, First-Serve (FCFS). \n 2. Shortest-Job-First (SJC). \n 3. Round-Robin (RR).

4\. All of them can be used non preemp>vely.
3
74
New cards
Aging is:


1. A problem that is produced when a process with low priority is never executed
2. A problem that is produced when a process with high priority never stops executing
3. A solution that consists of increasing the priority as time passes by of a process which is not executed
4. None of them are correct
3
75
New cards
Which of the following statements is true \n 1. The FCFS algorithm ensures the shortest waiting times. \n 2. Round Robin is the same as Priority Scheduling but with limited time quantum.

3\. It’s always best to have a very short quantum for the Round Robin \n 4. It’s always best to have a very long quantum for the Round Robin
1
76
New cards
The dispatcher is... \n 1. The program that decides the kind of scheduler is going to be used \n 2. The program that switches from a process selected by the short-term scheduler to another one

3\. A kind of scheduling similar to First-Come, First-Served \n 4. None of the answers are correct
2
77
New cards
What is the main characteristic of preemptive scheduling? \n 1. It interrupts the actual process if another may be executed \n 2. It does not interrupt the actual process if needed \n 3. It is the same as Round Robin scheduling \n 4. It uses a special memory address for scheduling the processes
1
78
New cards
The convoy effect happens...


1. When a process with low CPU burst arrives to the CPU before the processes with high CPU in a FCFS scheduling
2. When a process with high CPU burst arrives to the CPU before the processes with low CPU in a Round Robin scheduling
3. When a process with high CPU burst arrives to the CPU before the processes with low CPU in a FCFS scheduling
4. When two processes arrives to the CPU with the same priority at the same time in a Priority Scheduling
3
79
New cards
The real difficulty of the SJF scheduling algorithm is: \n 1. Knowing the length of the next CPU request for long-term scheduling.

2\. Knowing the length of the next CPU request for short-term scheduling.

3\. Solving the problem of starvation. \n 4. Both a) and b) are correct.
2
80
New cards
The SJF scheduling takes into account: \n 1. The turnaround time of the processes

2\. The length of its CPU burst. \n 3. The length of its I/O burst \n 4. The overall number of processes
2
81
New cards
Which of these scheduling algorithms allows processes to move between queues?

1\. Multilevel queue scheduling algorithm \n 2. Multilevel feedback queue scheduling algorithm \n 3. Both algorithms allow processes to move between queues

4\. None of the previous answers is correct
2
82
New cards
When we say that a scheduler follows a preemptive algorithm we say that...

1\. It follows the Round Robin algorithm \n 2. It does not interrupt a process until its task has been finished \n 3. It can interrupt the process before it has finished

4\. It can manage all the queues at the same time
3
83
New cards
In the context of a process termination, the value pased to exit(n) function, upon failure is

1\. 1

2\. 0 \n 3. Any non-zero \n 4. Answers a) and b) are correct
3
84
New cards
Select the correct answer, when a process is duplicated (fork):

1\. It duplicates open files table \n 2. Shares intermediate table with i-nodes and positions

3\. A and B are correct

4\. A and B are incorrect
3
85
New cards
Which one has the less access time?

1\. Cache

2\. Main memory 3. Registers \n 4. Disk storage
3
86
New cards
What scheduling method is used by most of the current Operating systems?

1\. First to come first to serve \n 2. Shortest Job First \n 3. Round Robin

4\. Shortest Job First with priority
3
87
New cards
Select the correct answer: \n 1. First to Come First to Serve is a preemptive algorithm.

2\. Shortest Job First is always a preemptive algorithm. \n 3. Round-Robin is a preemptive algorithm. \n 4. All the previous answers are incorrect.
3
88
New cards
Can the Shortest Job First Scheduling algorithm affected by starvation?

1\. It can

2\. No it can never happen \n 3. It can only happen if the system has a lot of I/O usage

4\. None of these answers
1
89
New cards
The scheduling algorithm called shortest job first has a limitation, and that is:

1\. When a process takes too long, it is physically impossible to be used

2\. You have to know beforehand the duration of the processes \n 3. It is very inefficient

4\. None of the above
2
90
New cards
What is SWAP used for in the lifecycle of a process? \n 1. To make process I/O \n 2. To increase multiprogramming by sending some processes to swap area

3\. To make the threads of a process easily configurable by means of an STD

4\. To make the system boot faster
2
91
New cards
Select the correct answer about PCB: \n 1. All information referred to a process is stored in its PCB.

2\. When a process execution is finalized, the PCB is released.

3\. Data can be shared in the PCB. \n 4. All the previous answers are incorrect.
4
92
New cards
Which of the following actions is performed by the wait( ) system call?

Returns the PID of the parent process. \n 2. Blocks process until a child terminates. \n 3. Returns the PID of the currently executed child.

4\. A, B and C are performed.
2
93
New cards
What is the environment of a process? \n 1. Set of process communications. \n 2. Conditions at the beginning of a process. \n 3. Mechanism to allow the execution of a process.

4\. Mechanism to pass information to a process.
4
94
New cards
SIGILL, SIGALRM and SIGKILL are examples of a basic element in inter-process communication, which one?

1\. Exceptions

2\. Timers \n 3. Signals \n 4. Pipes
3
95
New cards
For the fork() system call in Linux, which of the following is true? \n 1. The fork() process takes in an argument and returns a process ID. \n 2. The process ID of the parent process is 0. \n 3. A child process is created but it does not execute the fork() function. \n 4. When fork() is executed, an identical copy of its address space is created as well as its PCB.
4
96
New cards
Which is correct basic lifecycle of process ?

1\. Ready-running-blocked

2\. Start-finish-running \n 3. Ready-block-running

4\. Running- start-blocked
1
97
New cards
Select the incorrect process mode

1. User

2\. Privileged

3\. Register

4\. Kernel
3
98
New cards
PCB contains: \n 1. processor state \n 2. scheduling information

3\. process priority \n 4. All of the above
4
99
New cards
What is the currently most used thread model for computers?

1\. Many to one \n 2. Many to many \n 3. One to one

4\. None of the above
3
100
New cards
Which is the main function of the Process Control Block (PCB) ?

1\. To duplicate processes \n 2. Each entry in table keeps information about one process

3. To assign the memory space that a process can use

4\. To assign a processor to a new process.
2