Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 16 pages
Exam (elaborations)

Top-Rated RBC 2 Practice Test – 2026 Version with Verified & Accurate Answers!

Document preview thumbnail
Preview 3 out of 16 pages

Top-Rated RBC 2 Practice Test – 2026 Version with Verified & Accurate Answers! Two men argued over the results of the football game. The first man didn't think his friend knew what he was talking about and spit at him; the spittle landed on his friend's shirt. What crime, if any, occurred? - The first man has committed the crime of battery because he made contact even though he caused no harm. - Misd. A woman walked into the local bar and saw her boyfriend with another woman. She went to the table and hit him on the head. He fell off his barstool, struck his head on the floor and was knocked unconscious. What crime, if any, occurred? - battery causing/inflicting serious bodily injury. - Felony Two men were arguing during a baseball game. One man picked up a baseball bat and swung at the other man. The second man ducked to avoid being hit on the head. The first man only committed assault because he did not actually hit the second man. True/False - False - assault with a deadly weapon because he attempted to cause harm by using the bat as a weapon. (BGI only needs to be likely) During a bar fight, a man stabbed another man in the arm with a knife. The first man has committed the crime of assault with a deadly weapon.

Content preview

Top-Rated ASVAB MEPS Exam Guide – 2026
Edition with Verified Questions & Solutions!
What are the two main functions of an operating system? - An operating system must provide the
users with an extended machine, and it must manage the I/O devices and other system resources.



What is the difference between kernel and user mode? - In Kernel mode, the executing code has
complete and unrestricted access to the underlying hardware. In User mode, the executing code has
no ability to directly access hardware. Code running in user mode must delegate to system APIs to
access hardware.



What is a trap instruction? Explain its use in operating systems? - A trap instruction switches the
execution mode of a CPU from the user mode to the kernel mode. This instruction allows a user
program to invoke functions in the operating system kernel.



What is multiprogramming? Give 2 reasons for having it. - Having multiple programs resident at once
and having them all active at the same time. Only one runs at any instant, but they may each run in
turn. This increases CPU utilization, decreases response and turnaround time. While one program is
waiting for I/O, another can be using the CPU.



Which of the following instructions should be allowed only in kernel mode?

A. disable all interrupts

B. read the time of day clock

C. set the time of day clock

D. change the memory map - (O)A. Kernel mode only. Obvious

(X)B. Doesn't need to be done only in kernel mode

(O)C. Needs to be done only in kernel mode otherwise, a job could set the clock back to increase its
processor time slice (among other things)

(O)D. Kernel mode only. Obvious



Please name two advantages to decouple a process address space from the machine's physical
memory in modern operating system design. - This allows an executable program to be loaded in
different parts of the machine's memory in different runs. Also, it enables program size to exceed the
size of the machine's memory.

,What's different between the concepts: process and program? - A process is basically a program in
execution.



What is the purpose of the cache? - Improving performance by storing frequently-read data in a
small portion of memory rather than waiting for the application to access the same data from the
main memory.



How many times does the following program print hello?

#include <stdio.h>

#include <unistd.h>

main()

{

int i;

for (i=0; i<3; i++)

fork();

printf("hello\n");

} - 8 Times



fork (); // Line 1

fork (); // Line 2

fork (); // Line 3

L1 // There will be 1 child process

/ \ // created by line 1.

L2 L2 // There will be 2 child processes

/ \ / \ // created by line 2

L3 L3 L3 L3 // There will be 4 child processes // created by line 3



To implement a user-level threads package, it helps if the operating system provides: - Non-blocking
system calls.



Starvation is the case when a thread: - Is never scheduled to run.

, A thread that is blocked on a semaphore is awakened when another thread: - Tries to increment the
semaphore.



The POSIX execve system call creates a new process. - False.



The exec() family of functions replaces the current process image with a new process image. It loads
the program into the current process space and runs it from the entry point.



Switching among threads in the same process is more efficient than switching among processes. -
True.



1. Thread Switching :Thread switching is a type of context switching from one thread to another
thread in the same process. Thread switching is very efficient and much cheaper because it involves
switching out only identities and resources such as the program counter, registers and stack pointers.
The cost of thread-to-thread switching is about the same as the cost of entering and exiting the
kernel.



2. Process Switching :Process switching is a type of context switching where we switch one process
with another process. It involves switching of all the process resources with those needed by a new
process. This means switching the memory address space. This includes memory addresses, page
tables, and kernel resources, caches in the processor.



Using mutual exclusion can ensure that a system avoids deadlock. - False.



Process P1 holds resource R1 and waits for resource R2 which is held by process P2.

Process P2 holds resource R2 and waits for resource R1 which is held by process P1.

None of the two processes can complete and release their resource.

Thus, both the processes keep waiting infinitely.



The value of a semaphore can never be negative. - True



A race condition is - When the outcome of processes is dependent on the exact order of execution
among them.



The wait system call on UNIX systems puts a process to sleep until: - A child process terminates.

Document information

Uploaded on
February 6, 2025
Number of pages
16
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
ScoreSphere
4.0
(1)
Sold
2
Followers
0
Items
861
Last sold
6 months ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions