Quiz
Programming Languages Ch12 & Ch13
Este quiz tem tipos de pergunta que abrem no player de sempre.
Perguntas do quiz (28)
1– [blank_start]explicit[blank_end] (Programmer control)
• [blank_start]Dangling pointer[blank_end] problem
- [blank_start]Implicit[blank_end] through garbage collection
• Various Garbage collection techniques- Aexplicit
- BDangling pointer
- CImplicit
2Should all binding of messages to methods be
dynamic?- AVerdadeiro
- BFalso
3The initialization issue is [blank_start]whether[blank_end] and [blank_start]how[blank_end] objects are [blank_start]initialized[blank_end] when they are created.
- Awhether
- Bhow
- Cinitialized
4Smalltalk is a pure [blank_start]OOP[blank_end] language
– Everything is an [blank_start]object[blank_end]
– All computation is through [blank_start]objects[blank_end] sending messages to
[blank_start]objects[blank_end]
– None of the appearances of imperative languages
– All objected are allocated from the [blank_start]heap[blank_end] and referenced
through [blank_start]reference variables[blank_end]
– All de-allocation is [blank_start]implicit[blank_end]
– Constructors must be [blank_start]explicitly[blank_end] called when an object is
created
• A class can have multiple [blank_start]constructors[blank_end], but each must have a
[blank_start]unique name[blank_end]- AOOP
- Bobject
- Cobjects
- Dobjects
- Eheap
- Freference variables
- Gimplicit
- Hexplicitly
- Iconstructors
- Junique name
5Support for OOP in Smalltalk
Type Checking and Polymorphism
– All binding of messages to methods is [blank_start]dynamic[blank_end]- Adynamic
6The only type checking in Smalltalk is static
- AVerdadeiro
- BFalso
7All variables are typeless in Smalltalk
- AVerdadeiro
- BFalso
8in Smalltalk, all [blank_start]subclasses[blank_end] are [blank_start]subtypes[blank_end] (nothing can be hidden
- Asubclasses
- Bsubtypes
9Smalltalk is fast compared with conventional compiled imperative languages
- AVerdadeiro
- BFalso
10Dynamic binding allows [blank_start]type errors[blank_end] to go [blank_start]undetected[blank_end] until run time
- Atype errors
- Bundetected
11Access controls for members are
1. [blank_start]Private[blank_end] (visible only in the class and friends) (disallows subclasses from being subtypes)
2. [blank_start]Public[blank_end] (visible in subclasses and clients)
3. [blank_start]Protected[blank_end] (visible in the class and in subclasses, but not clients)- APrivate
- BPublic
- CProtected
12a) [blank_start]Private[blank_end] derivation - inherited public and protected members
are private in the subclasses
b) [blank_start]Public[blank_end] derivation - public and protected members are also
public and protected in subclasses- APrivate
- BPublic
13A method can be defined to be [blank_start]virtual[blank_end], which means that they can be called through [blank_start]polymorphic[blank_end] variables and [blank_start]dynamically[blank_end] bound to messages
- Avirtual
- Bpolymorphic
- Cdynamically
14Single-Instruction Multiple-Data (SIMD) machines
– Multiple [blank_start]processors[blank_end] that execute the same instruction [blank_start]simultaneously[blank_end], each on [blank_start]different[blank_end] data.- Asimultaneously
- Bdifferent
- Cprocessors
15Multiple-Instruction Multiple-Data (MIMD) machines
– [blank_start]Independent[blank_end] processors that can be [blank_start]synchronized[blank_end] (unit-level concurrency)- Asynchronized
- BIndependent
16A [blank_start]thread of control[blank_end] in a program is the sequence of program points reached as [blank_start]control flows[blank_end] through the program
- Athread of control
- Bcontrol flows
17Physical concurrency - single independent processors (single thread of control)
- AVerdadeiro
- BFalso
18[blank_start]Logical concurrency[blank_end] - The appearance of [blank_start]physical[blank_end] concurrency is presented by [blank_start]time[blank_end]-sharing one processor (software can be designed as if there were [blank_start]multiple[blank_end] threads of control)
- ALogical concurrency
- Bphysical
- Ctime
- Dmultiple
19[blank_start]Coroutines[blank_end] provide only [blank_start]quasi[blank_end]-concurrency
- ACoroutines
- Bquasi
20A task or process is a program unit that can be in concurrent execution with other program units
- AVerdadeiro
- BFalso
21A task may be [blank_start]implicitly[blank_end] started, whereas a subprogram must be [blank_start]explicitly[blank_end] called
- Aimplicitly
- Bexplicitly
22Lightweight tasks execute at their own address space and have their own run-time stacks
- AVerdadeiro
- BFalso
23Lightweight tasks all run in the same address space and use the same run-time stack
- AVerdadeiro
- BFalso
24A task is [blank_start]disjoint[blank_end] if it does not communicate with or affect the [blank_start]execution[blank_end] of any other task in the program in any way
- Adisjoint
- Bexecution
25Task Synchronization is
- AA typo in Amr's tests
- BA student in Operating systems
- CA question in this quiz
- DA mechanism that controls the order in which
tasks execute (obviously)
26Two kinds of synchronization
– Coo[blank_start]peration[blank_end] synchronization
– Com[blank_start]petition[blank_end] synchronization- Aperation
- Bpetition
27the mechanism for delaying task execution
- ATimer
- BScheduler
- CPassi
- Dalarm
28[blank_start]Liveness[blank_end] is a characteristic that a program unit
may or may not have- ALiveness
Informações
- Descrição
- Computer Science Quiz sobre Programming Languages Ch12 & Ch13, criado por Miguel Lopez em 13-04-2022.
- Autor
- Miguel Lopez
- Idioma
- English
- Visualizações
- 1
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz