Chapter 1 Introduction To Computer Architecture: Multiple-Choice

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Chapter 1 Introduction to computer architecture

Multiple-choice
1. Which of the following cannot be considered as a major structural element of a modern
computer?
a) Memory
b) Processor
c) Secondary memory
d) System buses
2. A type of system bus which is used for the transfer of data between processor, memory and I/O
devices is known as?
a) Control bus
b) Address bus
c) Data Buffer Register
d) Data bus
3. Program Counter (PC) is a processor register and its main function is to?
a) Store results of computation within the processor
b) Store instructions within the processor
c) Store the next instruction within the processor
d) Store the address of the next instruction within the processor
4. A processor instruction is made of two parts which include.
a) Opcode and data
b) Opcode and address
c) Address and data
d) Opcode and register
5. What is the primary reason for using interrupts?
a) To improve processor utilization
b) To increase the speed of the processor
c) To make more memory available to the processor
d) To reduce processor cost
6. An interrupt will likely be sent to the processor by IO device through which of the following
bus?
a) Data Bus
b) Control Register
c) Adress Bus
d) Control Bus
7. Which of the following statement is not correct about the SRAM and DRAM memory?
a) DRAM is made with the capacitors and need to be refreshed periodically
b) DRAM is faster and more expensive than SRAM
c) SRAM is made with the transistors and need not be refreshed
d) Registers and Cache memories are mostly made with SRAM
8. Which of the following memory cannot be considered as a primary system memory?
a) RAM
b) Processor registers
c) ROM
d) Cache memory
9. Which of the following memory type is likely going to have the fastest access/response time?
a) System memory
b) Cache memory
c) SSD memory
d) Processor registers memory
10. Which of the following is not true about the cache memory?
a) It is invisible to the operating system
b) Cache has much faster access time than the main system memory
c) Cache is the fastest memory available
d) Cache holds a copy of the portion of main memory frequently used by the processor
11. An I/O communication technique where processor waits and periodically check for the I/O
module until it finishes a task is known as?
a) Direct Memory Access (DMA)
b) Programmed I/O
c) Interrupt-driven I/O
d) Wait I/O
12. Which of the following is not an approach that can lead to providing parallelism in computer
systems?
a) Cluster
b) SMP
c) Multicores
d) multiprogramming
13. A system which has multiple units of processor compacted together on a single silicon chip is
known as?
a) Multiprocessing system
b) SMP system
c) Multicore system
d) Multithreading system

Essay
1. a) List the four main structural elements in modern computer architecture
b) Briefly describe the function of each element listed in 1 (a) above
2. a) What are system buses?
b) list and explain the functions of the three types of the system buses
3. a) Mention any five Processor registers that you know.
(b) explain the function of any two registers out of the five registers mentioned in 3 (a)
4. a) What is an interrupt?
(b) list four classes of interrupt
5. a) what is the difference between primary and secondary memory
b) what are the differences between RAM and ROM
6. a) List three means for I/O communication techniques
b) explain one of the techniques listed in 6 (a)
7. A) what is a SMP?
b) with the help of a diagram show the structural organization of an SMP system

Chapter 2 Operating Systems Overview


Multiple Choice
1. -------------, efficiency and ability to evolve are the three major objectives of an operating
system.
a) Efficiency
b) Ability to evolve
c) Program execution
d) Conveniency
2. Which of the following is not true features about the computers between 1940s and 1950s?
a) They use fixed timeslot which is pre-set before each program/job runs
b) They have no real operating system
c) More than one program can be run serially on the same input device at the same time
d) A program in running is aborted if its timeslot is exceeded
3. Which of the following is not true about the simple batch operating system?
a) They use fixed timeslot to run each program/job
b) They are uniprogramming in nature
c) The monitor performs scheduling task and a batch of jobs is queued up
d) Monitor is the program which act as the operating system
4. The major difference between multiprogramming batch system and time-sharing system is?
a) Time-sharing system are multiprogramming with multiprogramming batch system are not
b) Time-sharing system allows user to interact with the computer while program/job is being
executed
c) multiprogramming batch system are more complicated
d) Time-sharing system allows
5. All of the following are key design issues for Operating systems in SMP and multicore systems
except?
a) Program execution
b) Scheduling
c) Simultaneous concurrent processes or threads
d) Memory management
6. Which of the following operating system is not a family of UNIX operating system?
a) Solaris
b) Mac OS
c) Windows
d) Android
7. One of the following is not a function of an operating systems
a) Instruction execution
b) System resource management
c) Process scheduling.
d) Error detection and response
8. One of the objectives of operating system is to
a) increase system efficiency
b) introduce GUI
c) increase system resolution
d) replace processor
9. Part of an operating system responsible for implementing the core functionalities of an operating
system is known as:
a) Kernel
b) Shell
c) Windows
d) Unix
10. Multiprogramming feature of an operating system in uniprocessor enables
a) multiple process execution
b) multiple processor cores
c) multiple data transfer
d) parallel process execution.

Essay
1. List five functions of Operating system when considered as a user/computer interface.
2. Define an Operating system
a) List three objectives of OS and explain one of them
3. a) What are the differences between uniprogramming and multiprogramming operating
systems.
b) Give one example each for uniprogramming and multiprogramming operating systems.
4. A time slicing Operating system is to executes 4 different jobs. If the jobs are scheduled for
execution in the flowing sequence: JOB 1 - JOB 2- JOB 4 - JOB 3- JOB 1. Draw the five
stages of the jobs execution in the system memory, if the sizes of jobs, monitor and system
memory are provided in the table below.
JOB 1 JOB 2 JOB 3 JOB 4 MONITOR MEMORY

14000 20000 6000 10000 7000 32000

Chapter 3 Process Description and Control


Multiple Choice
1. ----------------------- is a program in execution.
a) Processor
b) Process
c) Application
d) System memory
2. Which among the following is not an element of a process?
a) Priority
b) Dispatcher
c) Accounting information
d) Context data
3. The list of the sequence of instructions that execute within a process is known as ---------?
a) Program counter (PC)
b) Dispatcher
c) Trace
d) Program Control Block (PCB)
4. A small program that switches the processor from one process to another is known as -------?
a) Program counter (PC)
b) Dispatcher
c) Trace
d) Program Control Block (PCB)
5. In Two-state model of a process, the two states are --------------- and ---------------?
a) Running & not-running
b) Running and Ready
c) Ready and Not-running
d) New and Ready
6. A process can be created due to one of the following reasons except?
a) User starting an application
b) Operating system actions
c) Processor actions
d) One process starting another
7. In which of the following locations are likely to find the content of a suspended process?
a) System memory (RAM)
b) Cache memory
c) Virtual memory
d) Random Access Memory (ROM)
8. All useful information about a process used by the operating system are found in……….?
a) Process control block
b) Program control Block
c) Program counter
d) Trace
9. In which of the following mode are user programs likely to be executed by the processor?
a) Kernel-mode
b) User-mode
c) OS-mode
d) General mode
10. Is the operating system a process?
a) Yes
b) No
c) All of the above
d) None of the above

Essay
1. a) What is a process?
b) List any five essential elements within a process

2. a) Draw the five-state model of a process with labels clearly shown

b) List the five states in 2 (a)

3. a) What is the difference between a blocked process and a suspended process

b) Draw the five-state with suspension model of a process

4. List four (4) reasons for process suspension

5. List four (4) reasons for the termination of process

6. list five activities performed by Operating System during the creation of a New Process

Chapter 4 Threads
Chapter 5 Concurrency 1: Mutual exclusion and synchronization
Multiple Choice
1. A situation where multiple computations are happening at the same time by processes or
threads is termed
a) Mutual exclusion
b) Concurrency
c) Parallel processing
d) Inter-leaving
2. Concurrency will most likely occur in all of the following contexts except
a) Operating system structure
b) Multiprogramming
c) Multiprocessing
d) Uniprogramming
3. A section of code within a process that required access to shared resources is called?
a) Critical section
b) Trace of a process
c) Shared section
d) Non-critical section
4. Some of the challenges faced by operating system in handling concurrency include the
following except
a) Sharing resources
b) Communication among processes
c) Synchronization of multiple processes
d) generalization
5. which of the following is an example of mutual exclusion implementation using hardware?
a) Interrupt disabling
b) Semaphores
c) Messaging
d) Monitors

Essay
1. a) Define the term Concurrency
(b) list three situation where concurrency can be found
(c) List the four concerns of OS in concurrent systems
2. Define the following terms
a) Deadlock
b) Starvation
c) Critical section
3. a) What is mutual exclusion
(b) state four (4) requirement of mutual exclusion
4. (a) List the two (2) hardware approaches for implementing mutual exclusion
(b) Explain each one of the approaches listed above.
5. a) List the three (2) software approaches for implementing mutual exclusion
(b) With the aid of diagram explain how a Semaphores will enforce mutual exclusion on
the three processes A, B, and C competing for same shared resources. Assuming the initial
value of semaphore s=1 and information about processes as provided in table 1
Process Name Arrival Time Service Time

A 0 3

B 1 1

C 2 1

Table 1

Chapter 6 Concurrency II: Deadlock and starvation


Multiple choice
1. A resource which can be used by a process at a time without being depleted by that use is known as
a) nondepleted resource
b) Reusable resource
c) Consumable resource
d) Unconsumable resource
2. Which of the following is not an example of consumable resources?
a) Interrupt
b) Signals
c) Memory
d) messages
3. A deadlock prevention technique is concerned about
a) Preventing the possibility of deadlock
b) Preventing the existence of deadlock
c) Aborting the deadlocked processes
d) Denying resources to processes if that will lead to deadlock
4. Which of the following is not one of techniques used to solving deadlock?
a) Deadlock avoidance
b) Deadlock suspension
c) Deadlock detection
d) Deadlock prevention
5. Which of the following best describe deadlock avoidance approach?
a) Abort the deadlock processes
b) Deny start or resource increment to process if that will lead to deadlock
c) Prevent possibility of deadlock
d) Roll-back process to pre-deadlock time
6. A situation where multiple computations are happening at same time by processes or threads
is termed
e) Mutual exclusion
f) Concurrency
g) Parallel processing
h) Inter-leaving
7. Concurrency will most likely occur in all of the following contexts except
e) Operating system structure
f) Multiprogramming
g) Multiprocessing
h) Uniprogramming
8. A section of code within a process that required access to shared resources is called?
e) Critical section
f) Trace of a process
g) Shared section
h) Non-critical section
9. Some of the challenges faced by operating system in handling concurrency include the
following except
e) Sharing resources
f) Communication among processes
g) Synchronization of multiple processes
h) generalization
10. which of the following is an example of mutual exclusion implementation using hardware?
e) Interrupt disabling
f) Semaphores
g) Messaging
h) Monitors
11. A resource which can be used by a process at a time without being depleted by that use is known as
e) nondepleted resource
f) Reusable resource
g) Consumable resource
h) Unconsumable resource
12. Which of the following is not an example of consumable resources?
e) Interrupt
f) Signals
g) Memory
h) messages
13. A deadlock prevention technique is concerned about
e) Preventing the possibility of deadlock
f) Preventing the existence of deadlock
g) Aborting the deadlocked processes
h) Denying resources to processes if that will lead to deadlock
14. Which of the following is not one of techniques used to solving deadlock?
e) Deadlock avoidance
f) Deadlock suspension
g) Deadlock detection
h) Deadlock prevention
15. Which of the following best describe deadlock avoidance approach?
e) Abort the deadlock processes
f) Deny start or resource increment to process if that will lead to deadlock
g) Prevent possibility of deadlock
h) Roll-back process to pre-deadlock time

Essay
1. Define the terms deadlock and starvation
2. What are the differences between reusable and consumable resources?
3. Give 3 examples each for reusable and consumable resource
4. Using resource allocation graph explain the process of deadlock for two process P1 and P2
competing over resources Ra and Rb.
5. List and explain four conditions for the existence of deadlock
6. What is the difference between deadlock prevention and deadlock avoidance?
7. List and explain the two approaches to deadlock avoidance
8. Using banker’s algorithm show in 4 steps on how the operating system will chose and allocate
resources to processes P1, P2, P3 and P4 to avoid deadlock. If the claim matrix C, Allocation
matrix A and Resource vector R are provided below, compute the new Available resource vector
V and C-A at each step

9. What do you understand by deadlock detection?


10. Mention four strategies of deadlock detection
Chapter 07 Memory Management
Multiple-choice
1. In fixed Partitioning, if the program size is bigger than the memory partition size then the
programmer has to divide the program into modules some of which will be loaded later on
when some modules free up space, the name of this technique is?
a) Fragmentation
b) Overlays
c) Compaction
d) Compression
2. Which of the following is not a concern of the operating system in memory management?
a) Relocation
b) Protection
c) Sharing
d) deadlock
3. A problem with fixed partitioning where a process is smaller than the partition assigned to it
and leave behind an empty memory space (hole) is known as?
a) Wasted space
b) vacuum
c) internal fragmentation
d) external fragmentation
4. Which of the following is most accurate about virtual memory paging?
a) All pages of a process must be loaded in the memory
b) Some pages can be in system memory while other can be in virtual memory
c) All pages of a process must be in the virtual memory
d) All pages must be in the cache memory
5. A technique used in Dynamic partitioning to shift processes so that the gap (created due to
external fragmentation) between the processes is closed is known as?
a) External fragmentation
b) Squeezing
c) Compaction
d) None of the above
6. What is the difference between a page and a frame?
(a) Page and frame have different sizes
(b) Page is a partition in Process while Frame is a partition in memory which holds page
(c) There are more pages than frames
(d) None of the above
7. What is the difference between a page and a Segment?
a) All pages have same size while segment can have variable sizes
b) Segments are bigger in size than pages
c) Segments are faster to be loaded the pages
d) None of the above
8. In side process P, a byte B has a physical address of 500, if the value of base register of
process P is 215, what is the relative address of the byte B?
(a) 500
(b) 215
(c) 285
(d) 715
9. What is the use of a base register?
(a) It holds information about the process execution
(b) Buffer for storing starting address of a process in memory
(c) Buffer for storing ending address of a process in memory
(d) Buffer for storing the current address to be fetched from the process by the processor
(e) None of the above
10. A process which is newly loaded into the system memory has the base register value of 786
and the bound register value of 3858, what is the size of the process in kB.
a) 4kB
b) 1kB
c) 3kB
d) 2kB
11. Logical address in paging consists of a
(a) Page number and offset
(b) Page number only
(c) Offset only
(d) Page number and frame number
12. What is a virtual memory?
(a) Location in secondary memory where content of a suspended process is temporarily
stored
(b) Location in cache memory where content of a suspended process is temporarily stored
(c) Location in main memory where content of a suspended process is temporarily stored
(d) Not a real memory

13. What is the use of page table?


a) It’s used by operating system to update the most recent location of a page in the memory
b) Its use to store process data
c) It is use for updating virtual memory
d) It is use to swap process to virtual memory
14. In virtual paging, a special high-speed cache memory used for storing page table is known
as?
a) Virtual page table buffer
b) Base buffer
c) Bounds buffer
d) Translation lookaside buffer (TLB)

Essay
1. Mention 5 requirements in memory management
2. List 6 different types of partitioning schemes use in memory management
3. What is the difference between simple paging and simple segmentation?
4. An 8-bit instruction (B) has a relative address of 1502 within a process P of size 9.6KB. If the
system uses IkB simple paging scheme with 16-bit for addressing space.
a) Find the logical address of the instruction B, both in binary and decimal numbers.
b) Find the addresses that will be stored in Base and Bound registers of the process P assume
that the pages are contiguous and B has an absolute address of 20000.

Chapter 08 Virtual Memory Management


1. What is the difference between simple paging and virtual memory paging?
2. List two advantages any two virtual memory paging
3. What is thrashing in virtual memory management?
4. List the three principles of locality that make virtual memory paging efficient.
5. What is the function of a Modify bit (M) in virtual memory page table entry?
6. A VAX system architecture using 16-bit addressing uses virtual memory paging with
512M page size. If a process can use a maximum of 2GB virtual memory, what is the
maximum size of the page table.
7. Assume byte-level addressing and 4-kB pages, 4-GB virtual space for a process and a 32-
bit addressing space. Using multi-level hierarchical page table
(a) How many page tables are required for logical addressing?
(b) Compute the size of each page table
(c) Which of the page table stays in the system memory and which one is stored in the
virtual memory?
8. What is the use of Translation Lookaside Buffer?

Chapter 09_10 Scheduling: Uniprocessor, Multiprocessor


Multiple-choice
1. The decision to choose a process to be admitted for processing from the list of processes on a
ready-state queue is called?
e) Very long scheduling
f) Long term scheduling
g) Medium term scheduling
h) Short term scheduling
2. Which of the following is correct about the medium-term scheduling?
e) Scheduler is concern about selection process from ready-state queue into running-state
f) Scheduler is concern about selection of process from blocked/suspended-state queue into
running-state
g) Scheduler is concern about selection process from blocked/suspended-state queue
into ready-state queue
h) Scheduler is concern about selection new process to admit into the system
3. Scheduling algorithms goals will be to optimize system performance by improving the
followings except?
e) Response time
f) Throughput
g) Efficiency
h) overheads
4. The time taking for a process from the submission of a request until the first response is received
is called?
e) Turnaround time
f) Response time
g) Throughput
h) Deadlines
5. Which of the following best describes Turnaround time?
e) Time between submission of a process and its completion
f) Time spent by a process waiting on the ready-state queue
g) Time between blocked-state of a process and its completion
h) None of the above
6. The situation whereby a currently running process is removed from the running state and moved
back to ready-state due to interrupt by clock-timeout or another process of high priority is
termed?
a) Non-Preemptive
b) Preemptive
c) Interrupt
d) Decision Mode
7. Which of the following scheduling algorithm uses Pre-emptive approach based on clock time
quantum?
a) FCFS
b) Round-Robin
c) SPN
d) STR
8. One of the shortcomings of First-come-First-Serve scheduling algorithm is?
a) Long processes are interrupted
b) Short processes stay longer on the queue unnecessarily
c) Short processes are admitted first
d) Long processes can be pre-empted
9. What is the Turnaround time of a process A, if the process waits for 5 seconds on the ready-state
queue and spends another 10 seconds for execution?
a) 10 seconds
b) 5 seconds
c) 15 seconds
d) 2 seconds
10. Find the turnaround ratio of a process whose service time is 15 seconds and has a total
turnaround time of 30 seconds
a) 2
b) 0.5
c) 45
d) 15
11. Estimate the response ratio of a process whose expected service time is 10 seconds and spent 20
seconds waiting for the processor.
a) 3
b) 1.5
c) 30
d) 10
12. The feedback scheduling algorithm is best used?
a) Where we have no prior information about the service time of the process
b) Where we cannot use First-come-First-Serve
c) Where there is multiple user
d) In a uniprocesing scheduling

Essay
1. Briefly describe the three types of processor scheduling
2. What is the difference between turnaround and response time?
3. What is the difference between preemptive and non-preemptive scheduling?
4. List six types of scheduling algorithms used in short-term scheduling
5. Use Round-robin algorithm with time quantum of 3 seconds to implement scheduling of the
processes in Fig 1 on a timeline graph.
6. Use SPN algorithm to implement scheduling of the processes in Fig 1 on a timeline graph.
7. Use SRT algorithm to implement scheduling of the processes in Fig 1 on a timeline graph.
8. Use HRRN algorithm to implement scheduling of the processes in Fig 1 on a timeline graph.

Process Name Arrival Time Service Time


A 0 3

B 1 5

C 3 2

D 9 5

E 12 5
Figure 1

Chapter 11 I/O Management and Disk Scheduling


Multiple-choice
1. Which of the following I/O devices belongs to the category of machine readable I/O devices?
a) Printer
b) Keyboard
c) Hard disk
d) Digital line drivers
2. I/O devices may differ from one another in terms of operations except
a) Data rates
b) Application
c) Complexity of Control
d) None of the above

3. Which of the following is not a common configuration of DMA?


a) Single-bus, detached DMA
b) Single bus, Integrated DMA-I/O
c) Multiple bus, detached DMA
d) I/O bus
4. The two major concern of operating system in handling I/O devices are
a) Data rate and Error handling
b) Generality and Efficiency
c) Applications and complex control
d) Efficiency and error handling
5. I/O devices that store information in fixed size blocks and only transfer one block at time is
known as
a) Block I/O
b) Block-oriented I/O
c) Stream I/O
d) Stream-oriented I/O
6. The main difference between the I/O Single buffer and I/O Circular Buffer in system memory is
a) Double buffer can store both streamed and blocked oriented I/O
b) Double buffer has two blocks of buffer while circular buffer has only four blocks
c) Double buffer has two blocks of buffer while circular buffer has more than two blocks of
buffer
d) Circular buffer operates in circle while double buffer does not

Essay
1. List and explain the three categories of I/O devices
2. Briefly describe the following techniques for performing I/O functions:
a) Programmed I/O
b) Interrupt driven I/O
c) Direct Memory Access
3. With the help of diagram describe the three different configurations of DMA
4. a) List three types of I/O buffering
b) Give two reasons why I/O buffering is required

5. a) Describe Block-oriented I/O and give two examples

b) described Stream-oriented I/O and give two examples

You might also like