CS261 Module 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

an address

A pointer is a variable that stores what type of information? an address an integer a parameter a data structure

kernel

Applications are forbidden from reading from and writing to what part of virtual memory? rodata kernel heap shared libraries

The value stored at the address that is stored at address 1234

Assume that a pointer, ptr, has the value 1234. What would you get by accessing **ptr?

printf ("%d", ptr);

Consider a pointer, ptr, initialized to NULL. Which of the following lines is guaranteed NOT to produce a segmentation fault?

double*

Consider the following line of code (assume it is in main()): double *n = (double*)malloc(sizeof(double)); What is the type of n?

double**

Consider the following line of code (assume it is in main()): double* n = (double*)malloc(sizeof(double)); What is the type of &n?

char**

Given the declaration char **argv, what is the type of &argv[0]?

kernel

The transition from one process to another is managed by what piece of system software? shell application software kernel driver software

global data, code

There are often multiple "threads" or execution units running in the context of a single process. What kind of data do they typically share? Check all that apply. register values CPU status flags global data code stack

register file

What CPU component consists of word-size storage units that have unique names? ALU register file PC bus interface

context

What distinguishes the meaning of bits used to represent data objects? ASCII context binary source code

virtual memory

What is the abstraction that provides each process with the illusion that it has exclusive use of the main memory?

2

What is the output of the following code? Assume that the address of the variable x is 8 and the address of the variable y is 6. int x = 5;int *y = &x;*y = 1;printf ("%d", x + *y);

kernel

What is the part of the operating system that is always present in memory? context switch kernel thread process

concurrency

What is the term for the general concept of a system with multiple, simultaneous activities?

parallelism

What is the term used to refer to the use of concurrency to make a system run faster?

context switch

When the operating system decides to change which process is running by saving the state of the current process, restoring the state of another process, and transferring control to the other process it is called a state transition an interrupt a context switch a threading

buses

Which component is used to carry word-size chunks of information? I/O controllers program counter registers buses

linker

Which component of the compilation process combines object files into one executable object program? assembler pre-processor compiler linker

memory

Which computer organization component serves as a temporary storage device that holds data while a program is executing? bus I/O device CPU memory

You can quickly debug run-time exceptions

Which of the following is NOT a reason to understand how compilation works? You can quickly debug run-time exceptions You can avoid buffer overflows and other security vulnerabilities You can optimize your program's performance You can resolve link-time errors

run-time heap, user stack

Which of the following parts of the virtual address space change in size as the program executes? Check all that apply. read/write data read-only code and data run-time heap user stack kernel virtual memory

instruction set architecture

Which of the following provides an abstraction of the actual processor hardware? application program interface instruction set architecture application binary interface virtual memory

seg fault

Which of the following statements is TRUE about the following code? int *x = 0;printf ("x = %d", *x);

assembling

Which stage of compilation produces relocatable object files as output? preprocessing linking compiling assembling

compiling, assembling, preprocessing

Which stage(s) of compilation will occur by executing gcc -c code.c? (More than one may be correct.) linking compiling assembling preprocessing

DMA

Which technique allows data to travel directly between disks and memory without passing through the CPU? parallelism SIMD DMA compilation


Set pelajaran terkait

Ch. 70 Test Q's: degenerative disc dz and herniation of cervical and lumbar spine

View Set

Chapter VII Insurance Regulations (22 Exam Questions)

View Set

WileyPLUS. Chapter 22. The Lymphatic System and Immunity.

View Set

BIO 202, Unit 1, Adrenal Medulla Hormones

View Set

Pediatric Medication Administration and Calculations

View Set