Operating System

User Generated

orafbajvmml

Other

CS340 OPerating Systems

Description


QUESTION 1

  • What does the spin() function in our program do?

Path: p

Words:0

2 points

QUESTION 2

  • How can the operating system regain control of the CPU so that it can switch between processes?

uses application and non-cooperative

uses comment and content

uses cooperative and non-cooperative

uses application and non priviledge

2 points

QUESTION 3

  • In a situation where a number of relatively-short potential consumers of a resource get queued behind a heavyweight resource consumer is known as

a convoy effect

a content effect

a comment effect

a context effect

2 points

QUESTION 4

  • There are two processes: Process A and Process B. What are the situations of Process B when it is moved from Ready to Running and Process A when it has been moved from Running to Ready

Process B has descheduled and Process A has been blocked.

Process B has been scheduled and Process A has been Descheduled

Process A has been scheduled and Process B has been blocked

Process A has been scheduled and process B has been descheduled.

2 points

QUESTION 5

  • What C programming command can we use to check if it is installed on Kali Linx?

wherewas gcc make

wheremake gcc was

whereis gcc make

whereis make gcc

2 points

QUESTION 6

  • After a program compiled the cpu program what command was used to run the four processes?

./cpu "a", ./cpu "b", ./cpu "c",; ./cpu "d";

./cpu a;, ./cpu b,; ./cpu c; ./cpu d &

;/cpu a, ./cpu b &, ./cpu c,; ./cpu d

./cpu a & ./cpu b & ./cpu c & ./cpu d &

2 points

QUESTION 7

  • If time sharing allows a resource to be used for a little while by one entity, and then a little while by another. What is its natural counterpart and how does it uses its resources?

CPU, and the resource will process data until the running program is done then the OS will sit idle or forcefully take the process away



Mechanisms, where it shares low-level methods or protocols to implement a needed piece of programs using a context switch.

Space sharing , where a resource is divided into blocks among those who wish to use it. once a block is assigned to a file, it is not likely to be assigned to another file until the user deletes it.

All of the Above

2 points

QUESTION 8

  • Three jobs A, B, C, with run times of 5, 10, and 15 time units all arriving at the same time (0). What is the average turnaround time for jobs A, B, and C? Assumming FIFO is used

250/3

250/3

150/3

50/3

2 points

QUESTION 9

  • What switch is used between user program and the kernel when a priviledge access is requested?

a convoy switch

a content switch

a comment switch

a context switch

2 points

QUESTION 10

  • The OS uses low-level machinery called ------------ and high-level ------------- to implement virtualization well

mechanism and process identifier

concurrently and perfomance

mechanism and intelligence

process identifier and concurrently

2 points

QUESTION 11

  • What scheduler ia used with the introduction of time-shared machines?

Shortest Time First

Response Time

Round Robin

Shortest Time to Completion

2 points

QUESTION 12

  • There are two processes: Process A and Process B. What are the situations of Process B when it is moved from Ready to Running and Process A when it has been from Running to Ready

Process B has descheduled and Process A has been blocked.

Process B has been scheduled and Process A has been Descheduled

Process A has been scheduled and Process B has been blocked

Process A has been scheduled and process B has been descheduled.

2 points

QUESTION 13

  • There are two processes: Process A and Process B. What are the situations of Process B when it is moved from Ready to Running and Process A when it has been from Running to Ready

Process B has descheduled and Process A has been blocked.

Process B has been scheduled and Process A has been Descheduled

Process A has been scheduled and Process B has been blocked

Process A has been scheduled and process B has been descheduled.

2 points

QUESTION 14

  • When user mode wants to access kernel mode it invokes a system call, or -------

algorithm

fetch

trap

high-level

2 points

QUESTION 15

  • A systrm call is made to keep running (create) the same copies of program, what procedure will be best used?

fork()

wait()

exec()

kill()

2 points

QUESTION 16

  • What C program command did we use to compile cpu.c

gcc cpu cpu.c -pthread

gcc-o cpu cpu.c

gcc -o cpu cpu.c -pthread

gcc cpu cpu.c

2 points

QUESTION 17

  • A new process has been created which leads to the creation of another process. What are the characteristics of this new process?

The creating process is called a parent, it has a process identifier, and it will execute after the created process called a child has executed.

The created process uses create routine called a parent, the process identifier is not needed, and it will execute first. The mechanic process is called a child.

The created process is called a parent, it has a process identifier, and it will execute first. The creating process is called a child, it has a process identifier but cannot execute.

The creating process is called a parent, it has a process identifier, and it will execute first. The created process is called a child, it has a process identifier but cannot execute.

2 points

QUESTION 18

  • Where does a program stores its data structures?

Path: p

Words:0

2 points

QUESTION 19

  • What is Virtualization of the CPU

Path: p

Words:0

2 points

QUESTION 20

  • What scheduler is considered the most basic of all the algorithms?

FIFO

SJF

STCF

RR

2 points

QUESTION 21

  • After a switch has been made, the results are returned back to the calling user application and this is called

return-from-trap

return-from-algorithm

return-from-fetch

return-from-low-level

2 points

QUESTION 22

  • A new process has been created which leads to the creation of another process. What are the characteristics of this new process?

The creating process is called a parent, it has a process identifier, and it will execute after the created process called a child has executed.

The created process uses create routine called a parent, the process identifier is not needed, and it will execute first. The mechanic process is called a child.

The created process is called a parent, it has a process identifier, and it will execute first. The creating process is called a child, it has a process identifier but cannot execute.

The creating process is called a parent, it has a process identifier, and it will execute first. The created process is called a child, it has a process identifier but cannot execute.

2 points

QUESTION 23

  • What function will repeatedly checks the time and returns once it has run for a second?

Fetch()

Spin()

wait()

exec()

2 points

QUESTION 24

  • Tresponse =

Tcompletion - Tfirstrun

Tfirstrun - Tarrival

Tfirstrun - Tturnaround

Tturnaround - Tcompletion

2 points

QUESTION 25

  • What are the two challenges faced by an OS in building such virtualization machinery. .

performance and convoy effects

mid-level and low-level

time sharing and space sharing

performance and control

2 points

QUESTION 26

  • An operating system must include some methods to ---------, --------, ---------, new APIs

create. edit, and delete

create, destroy, and wait

fetch, decode, and run

fetch, create, and destroy

2 points

QUESTION 27

  • When does a trap table initializes?

after the OS closes

during an application use

after using an application

during the OS boot

2 points

QUESTION 28

  • If time sharing allows a resource to be used for a little while by one entity, and then a little while by another. What is its natural counterpart and how does it uses its resources?

CPU, and the resource will process data until the running program is done then the OS will sit idle or forcefully take the process away



Mechanisms, where it shares low-level methods or protocols to implement a needed piece of programs using a context switch.

Space sharing , where a resource is divided into blocks among those who wish to use it. once a block is assigned to a file, it is not likely to be assigned to another file until the user deletes it.

All of the Above

2 points

QUESTION 29

  • Tturnaround =

Tarrival - Tperformance

Tcompletion - Tcontrol

Tperformance - Tcontrol

Tcompletion - Tarrival

2 points

QUESTION 30

  • When the machine boots up, it does so in what mode?

application mode

privileged

least privileged

spacing mode

2 points

QUESTION 31

  • The three system calls used to create a process in Unix are -------------

fork(), wait(), and exec()

create(), destroy(), and exec()

fork(), wait() and create()

create(), exec(), and destroy()

2 points

QUESTION 32

  • Draw a valid conclusion on the following codes:

prompt> ./mem 1 & ./mem 2

[1] 24113

[2] 24114

(24113) memory, address of p: 00200000

(24114) memory address of p: 00200000

OS is virtualizing memory

CPU is executing memory

Memory is virtualing CPU

No valid conclusion can be drwan from above

2 points

QUESTION 33

  • Define the following terms

a. Fetch

b. Decode

c. Execute

d. PID

e. distributed operating system

f. virtualization

Path: p

Words:0

2 points

QUESTION 34

  • What information is found in the trap table?

codes used by hardware to know which particular trap to use

codes used by software to know which particular trap to use

codes used by hardware to trace which particular fetch()

codes used by software to trace which particular fetch()

2 points

QUESTION 35

  • A systrm call is made to keep running (create) the same copies of program, what procedure will be best used?

fork()

wait()

exec()

kill()

2 points

QUESTION 36

  • What scheduler uses preemptive?

FIFO

SJF

STCF

RR

2 points

QUESTION 37

  • There are currently two programs: Program A is running and program B is blocked. What is the name of the running program?

algorithms

virtualization

convoy effects

process

2 points

QUESTION 38

  • A new process has been created which leads to the creation of another process. What are the characteristics of this new process?

The creating process is called a parent, it has a process identifier, and it will execute after the created process called a child has executed.

The created process uses create routine called a parent, the process identifier is not needed, and it will execute first. The mechanic process is called a child.

The created process is called a parent, it has a process identifier, and it will execute first. The creating process is called a child, it has a process identifier but cannot execute.

The creating process is called a parent, it has a process identifier, and it will execute first. The created process is called a child, it has a process identifier but cannot execute.

2 points

QUESTION 39

  • There are currently two programs: Program A is running and program B is blocked. What is the name of the running program?

process

virtualization

convoy effects

algorithms

2 points

QUESTION 40

  • What are the three open ?le descriptors in each process by default in Unix Systems

standard input, output, and error;

fetch, wait, and exec

create, edit, and delete

standard fetch, output, and input

2 points

QUESTION 41

  • The hardware assists the OS by providing different modes of execution, which one uses the application mode?

user mode

kernel mode

fetch mode

process mode

2 points

QUESTION 42

  • The setback of virtualization is "---------------" as each will run more slowly if the CPU(s) must be shared.

create

destroy

performance

decoding

2 points

QUESTION 43

  • If time sharing allows a resource to be used for a little while by one entity, and then a little while by another. What is its natural counterpart and how does it uses its resources?

CPU, and the resource will process data until the running program is done then the OS will sit idle or forcefully take the process away

Mechanisms, where it shares low-level methods or protocols to implement a needed piece of programs using a context switch.

Space sharing , where a resource is divided into blocks among those who wish to use it. once a block is assigned to a ?le, it is not likely to be assigned to another file until the user deletes it.

All of the Above

2 points

QUESTION 44

  • Discuss how the operating system virtualize memory in Figure 2.3

Path: p

Words:0

2 points

QUESTION 45

  • What scheduler will not run jobs to completion, but runs a job for a time slice?

FIFO

SJF

STCF

RR

2 points

QUESTION 46

  • Using sjf calculate the average turnaround time for the following processes A,B,C, 50, 5, 5 all arriving at the same time

25

35

45

55

2 points

QUESTION 47

  • There are currently two programs: Program A is running and program B is blocked. What is the name of the running program?

process

virtualization

convoy effects

algorithms

2 points

QUESTION 48

  • Timer interrupts are a useful mechanisms for the OS why?

used to hand control to the OS

used to execute the OS

makes mechanisms work well for the OS

makes response time effective

2 points

QUESTION 49

  • A systrm call is made to keep running (create) the same copies of program, what procedure will be best used?

fork()

wait()

exec()

kill()

2 points

QUESTION 50

  • A Unix programmer started a process, what three commands are needed?

fetches an instruction from memory, executes it and encode it

fetches an instruction from memory, decodes it and jumps to a function

executes an instruction from memory, decodes it and fetches it

executes an instruction from memory, decodes it and fetches it

+

Unformatted Attachment Preview

QUESTION 1 1. What does the spin() function in our program do? Path: p Words:0 2 points QUESTION 2 1. How can the operating system regain control of the CPU so that it can switch between processes? uses application and non-cooperative uses comment and content uses cooperative and non-cooperative uses application and non priviledge 2 points QUESTION 3 1. In a situation where a number of relatively-short potential consumers of a resource get queued behind a heavyweight resource consumer is known as a convoy effect a content effect a comment effect a context effect 2 points QUESTION 4 1. There are two processes: Process A and Process B. What are the situations of Process B when it is moved from Ready to Running and Process A when it has been moved from Running to Ready Process B has descheduled and Process A has been blocked. Process B has been scheduled and Process A has been Descheduled Process A has been scheduled and Process B has been blocked Process A has been scheduled and process B has been descheduled. 2 points QUESTION 5 1. What C programming command can we use to check if it is installed on Kali Linx? wherewas gcc make wheremake gcc was whereis gcc make whereis make gcc 2 points QUESTION 6 1. After a program compiled the cpu program what command was used to run the four processes? ./cpu "a", ./cpu "b", ./cpu "c",; ./cpu "d"; ./cpu a;, ./cpu b,; ./cpu c; ./cpu d & ;/cpu a, ./cpu b &, ./cpu c,; ./cpu d ./cpu a & ./cpu b & ./cpu c & ./cpu d & 2 points QUESTION 7 1. If time sharing allows a resource to be used for a little while by one entity, and then a little while by another. What is its natural counterpart and how does it uses its resources? CPU, and the resource will process data until the running program is done then the OS will sit idle or forcefully take the process away Mechanisms, where it shares low-level methods or protocols to implement a needed piece of programs using a context switch. Space sharing , where a resource is divided into blocks among those who wish to use it. once a block is assigned to a file, it is not likely to be assigned to another file until the user deletes it. All of the Above 2 points QUESTION 8 1. Three jobs A, B, C, with run times of 5, 10, and 15 time units all arriving at the same time (0). What is the average turnaround time for jobs A, B, and C? Assumming FIFO is used 250/3 250/3 150/3 50/3 2 points QUESTION 9 1. What switch is used between user program and the kernel when a priviledge access is requested? a convoy switch a content switch a comment switch a context switch 2 points QUESTION 10 1. The OS uses low-level machinery called ------------ and high-level ------------- to implement virtualization well mechanism and process identifier concurrently and perfomance mechanism and intelligence process identifier and concurrently 2 points QUESTION 11 1. What scheduler ia used with the introduction of time-shared machines? Shortest Time First Response Time Round Robin Shortest Time to Completion 2 points QUESTION 12 1. There are two processes: Process A and Process B. What are the situations of Process B when it is moved from Ready to Running and Process A when it has been from Running to Ready Process B has descheduled and Process A has been blocked. Process B has been scheduled and Process A has been Descheduled Process A has been scheduled and Process B has been blocked Process A has been scheduled and process B has been descheduled. 2 points QUESTION 13 1. There are two processes: Process A and Process B. What are the situations of Process B when it is moved from Ready to Running and Process A when it has been from Running to Ready Process B has descheduled and Process A has been blocked. Process B has been scheduled and Process A has been Descheduled Process A has been scheduled and Process B has been blocked Process A has been scheduled and process B has been descheduled. 2 points QUESTION 14 1. When user mode wants to access kernel mode it invokes a system call, or ------algorithm fetch trap high-level 2 points QUESTION 15 1. A systrm call is made to keep running (create) the same copies of program, what procedure will be best used? fork() wait() exec() kill() 2 points QUESTION 16 1. What C program command did we use to compile cpu.c gcc cpu cpu.c -pthread gcc-o cpu cpu.c gcc -o cpu cpu.c -pthread gcc cpu cpu.c 2 points QUESTION 17 1. A new process has been created which leads to the creation of another process. What are the characteristics of this new process? The creating process is called a parent, it has a process identifier, and it will execute after the created process called a child has executed. The created process uses create routine called a parent, the process identifier is not needed, and it will execute first. The mechanic process is called a child. The created process is called a parent, it has a process identifier, and it will execute first. The creating process is called a child, it has a process identifier but cannot execute. The creating process is called a parent, it has a process identifier, and it will execute first. The created process is called a child, it has a process identifier but cannot execute. 2 points QUESTION 18 1. Where does a program stores its data structures? Path: p Words:0 2 points QUESTION 19 1. What is Virtualization of the CPU Path: p Words:0 2 points QUESTION 20 1. What scheduler is considered the most basic of all the algorithms? FIFO SJF STCF RR 2 points QUESTION 21 1. After a switch has been made, the results are returned back to the calling user application and this is called return-from-trap return-from-algorithm return-from-fetch return-from-low-level 2 points QUESTION 22 1. A new process has been created which leads to the creation of another process. What are the characteristics of this new process? The creating process is called a parent, it has a process identifier, and it will execute after the created process called a child has executed. The created process uses create routine called a parent, the process identifier is not needed, and it will execute first. The mechanic process is called a child. The created process is called a parent, it has a process identifier, and it will execute first. The creating process is called a child, it has a process identifier but cannot execute. The creating process is called a parent, it has a process identifier, and it will execute first. The created process is called a child, it has a process identifier but cannot execute. 2 points QUESTION 23 1. What function will repeatedly checks the time and returns once it has run for a second? Fetch() Spin() wait() exec() 2 points QUESTION 24 1. Tresponse = Tcompletion - Tfirstrun Tfirstrun - Tarrival Tfirstrun - Tturnaround Tturnaround - Tcompletion 2 points QUESTION 25 1. What are the two challenges faced by an OS in building such virtualization machinery. . performance and convoy effects mid-level and low-level time sharing and space sharing performance and control 2 points QUESTION 26 1. An operating system must include some methods to ---------, --------, ---------, new APIs create. edit, and delete create, destroy, and wait fetch, decode, and run fetch, create, and destroy 2 points QUESTION 27 1. When does a trap table initializes? after the OS closes during an application use after using an application during the OS boot 2 points QUESTION 28 1. If time sharing allows a resource to be used for a little while by one entity, and then a little while by another. What is its natural counterpart and how does it uses its resources? CPU, and the resource will process data until the running program is done then the OS will sit idle or forcefully take the process away Mechanisms, where it shares low-level methods or protocols to implement a needed piece of programs using a context switch. Space sharing , where a resource is divided into blocks among those who wish to use it. once a block is assigned to a file, it is not likely to be assigned to another file until the user deletes it. All of the Above 2 points QUESTION 29 1. Tturnaround = Tarrival - Tperformance Tcompletion - Tcontrol Tperformance - Tcontrol Tcompletion - Tarrival 2 points QUESTION 30 1. When the machine boots up, it does so in what mode? application mode privileged least privileged spacing mode 2 points QUESTION 31 1. The three system calls used to create a process in Unix are ------------fork(), wait(), and exec() create(), destroy(), and exec() fork(), wait() and create() create(), exec(), and destroy() 2 points QUESTION 32 1. Draw a valid conclusion on the following codes: prompt> ./mem 1 & ./mem 2 [1] 24113 [2] 24114 (24113) memory, address of p: 00200000 (24114) memory address of p: 00200000 OS is virtualizing memory CPU is executing memory Memory is virtualing CPU No valid conclusion can be drwan from above 2 points QUESTION 33 1. Define the following terms a. Fetch b. Decode c. Execute d. PID e. distributed operating system f. virtualization Path: p Words:0 2 points QUESTION 34 1. What information is found in the trap table? codes used by hardware to know which particular trap to use codes used by software to know which particular trap to use codes used by hardware to trace which particular fetch() codes used by software to trace which particular fetch() 2 points QUESTION 35 1. A systrm call is made to keep running (create) the same copies of program, what procedure will be best used? fork() wait() exec() kill() 2 points QUESTION 36 1. What scheduler uses preemptive? FIFO SJF STCF RR 2 points QUESTION 37 1. There are currently two programs: Program A is running and program B is blocked. What is the name of the running program? algorithms virtualization convoy effects process 2 points QUESTION 38 1. A new process has been created which leads to the creation of another process. What are the characteristics of this new process? The creating process is called a parent, it has a process identifier, and it will execute after the created process called a child has executed. The created process uses create routine called a parent, the process identifier is not needed, and it will execute first. The mechanic process is called a child. The created process is called a parent, it has a process identifier, and it will execute first. The creating process is called a child, it has a process identifier but cannot execute. The creating process is called a parent, it has a process identifier, and it will execute first. The created process is called a child, it has a process identifier but cannot execute. 2 points QUESTION 39 1. There are currently two programs: Program A is running and program B is blocked. What is the name of the running program? process virtualization convoy effects algorithms 2 points QUESTION 40 1. What are the three open ?le descriptors in each process by default in Unix Systems standard input, output, and error; fetch, wait, and exec create, edit, and delete standard fetch, output, and input 2 points QUESTION 41 1. The hardware assists the OS by providing different modes of execution, which one uses the application mode? user mode kernel mode fetch mode process mode 2 points QUESTION 42 1. The setback of virtualization is "---------------" as each will run more slowly if the CPU(s) must be shared. create destroy performance decoding 2 points QUESTION 43 1. If time sharing allows a resource to be used for a little while by one entity, and then a little while by another. What is its natural counterpart and how does it uses its resources? CPU, and the resource will process data until the running program is done then the OS will sit idle or forcefully take the process away Mechanisms, where it shares low-level methods or protocols to implement a needed piece of programs using a context switch. Space sharing , where a resource is divided into blocks among those who wish to use it. once a block is assigned to a ?le, it is not likely to be assigned to another file until the user deletes it. All of the Above 2 points QUESTION 44 1. Discuss how the operating system virtualize memory in Figure 2.3 Path: p Words:0 2 points QUESTION 45 1. What scheduler will not run jobs to completion, but runs a job for a time slice? FIFO SJF STCF RR 2 points QUESTION 46 1. Using sjf calculate the average turnaround time for the following processes A,B,C, 50, 5, 5 all arriving at the same time 25 35 45 55 2 points QUESTION 47 1. There are currently two programs: Program A is running and program B is blocked. What is the name of the running program? process virtualization convoy effects algorithms 2 points QUESTION 48 1. Timer interrupts are a useful mechanisms for the OS why? used to hand control to the OS used to execute the OS makes mechanisms work well for the OS makes response time effective 2 points QUESTION 49 1. A systrm call is made to keep running (create) the same copies of program, what procedure will be best used? fork() wait() exec() kill() 2 points QUESTION 50 1. A Unix programmer started a process, what three commands are needed? fetches an instruction from memory, executes it and encode it fetches an instruction from memory, decodes it and jumps to a function executes an instruction from memory, decodes it and fetches it executes an instruction from memory, decodes it and fetches it +
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Find the attached answer😄

Running head: THE OPERATING SYSTEM

1

The Operating System

Institutional Affiliation
Student’s name
Course
Date

THE OPERATING SYSTEM

2

The Operating System
Answers
1. It provides extensibility, safety, and good performance
2.
3.
4.
5.

uses application and non priviledge
a convoy effect
Process B has descheduled and Process A has been blocked.
wheremake gcc was

6. ./cpu a & ./cpu b & ./cpu c & ./cpu d &
7. Space sharing, where a resource is divided into blocks among those who wish to use it.
Once a block is assigned to a file, it is not likely to be assigned to another ...


Anonymous
Great study resource, helped me a lot.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Similar Content

Related Tags