Test Bank 3

advertisement
Operating Systems (for IT Students)
Lecture 3 Test Bank
Multiple Choice Questions
1. System calls can be grouped roughly into six major categories, these include
A. user interface, program execution, I/O operations, file –system manipulation, communication & error detection.
B. process control, file manipulation, device management, information maintenance, communication & protection.
C. process control, file manipulation, device management, I/O operations, communication & user interface.
D. user interface, program execution, I/O operations, information maintenance, communication & protection.
2.
OS services provide helpful functions to the user, these include
A. user interface, program execution, I/O operations, file –system manipulation, communication & error detection.
B. process control, file manipulation, device management, information maintenance, communication & protection.
C. process control, file manipulation, device management, I/O operations, communication & user interface.
D. user interface, program execution, I/O operations, information maintenance, communication & protection.
3.
The system calls (end) and (abort) are used to halt a running program execution either normally or abnormally. This
kind of system call is considered to part of the category for
A. User Interface.
B. Information Maintenance.
C. Process Control.
D. Communication.
4.
When a program runs into problems it will cause __________________
A. a memory dump.
B. an error trap.
C. a debug operation.
D. a bug.
5.
When a program runs into problems the OS provides _________________ and generate an error message to aid
the programmers in finding and correcting bugs.
A. a memory dump.
B. an error trap.
C. a debug operation.
D. a bug.
6.
The OS will aid the programmers in debugging program errors by providing a memory dump. The dump is written to
A. memory.
B. CPU.
C. disk.
D. debugger.
7.
When a program is terminated abnormally, it may also define ________________ to determine the next action
automatically.
A. an error trap.
B. an error level.
C. a memory dump.
D. a bug.
8.
When a program terminates with error level 0 (zero), then this indicates that the program
A. was terminated abnormally and the OS will generate a memory dump.
B. terminated without errors by calling the OS function (end).
C. terminated abnormally by calling the OS function (abort).
D. has a bug that must be fixed by the OS automatically using the debugger.
9.
The question of where to return control when the loaded program terminates is related to whether
A. the existing program is lost.
B. the existing program is saved.
C. the existing program is allowed to continue execution concurrently with a new program.
D. All the above.
10. If control returns to the existing program when a new program terminates, the OS would usually
A. save a memory image of the existing program to be able to continue its execution.
B. save a memory image of the new program to be able to continue its execution.
C. save a memory dump of the existing program to be able to continue its execution.
D. terminate the existing program and restart it again once .
1
Operating Systems (for IT Students)
Lecture 3 Test Bank
Multiple Choice Questions
11. The system calls (create process) or (submit job) are used create a new process or job to be multiprogrammed.
This means that
A. one program will run while the other must be saved in a memory image.
B. both programs are submitted to be run later.
C. the two programs will be running simultaneously at the same time.
D. many programmers must write the code for the two programs.
12. When we create a new job or process, we should be able to control its execution. This control requires the
A. ability to determine and reset the attributes of a job or process.
B. OS to terminate each job or process.
C. programmers to debug the programs.
D. ability to create a memory dump.
13. Controlling the execution of a job or a process use the system calls (get process attributes) and (set process
attributes). Such attributes include:
A. job/process priority and maximum allowable execution time.
B. job/process file name, date and time.
C. job/process device manager.
D. All the above.
14. System calls like (wait time), (wait event) and (signal event) are used to
A. create new processes or jobs.
B. terminate processes or jobs.
C. control processes or jobs execution during the course of its execution.
D. All the above.
15. As system programmers, if we find that a process or a job is incorrect and longer needed, we have to issue the
system call
A. wait event.
B. wait time.
C. signal event.
D. terminate process.
16. As system programmers, if a process needs to wait for a certain amount of time to pass we have to issue the system
call
A. wait event.
B. wait time.
C. signal event.
D. terminate process.
17. As system programmers, if a process or a job wants to wait for a specific event to occur, we have to issue the
system call
A. wait event.
B. wait time.
C. signal event.
D. terminate process.
18. As system programmers, a process or a job should signal when an event has occurred by issuing the system call
A. wait event.
B. wait time.
C. signal event.
D. terminate process.
19. When processes share data, the OS must provide system calls to allow the process to _______ shared data to
prevent another process from accessing the data until the _______ is removed.
A. calculate, data.
B. stop, lock.
C. close, share.
D. lock, lock.
20. OS system calls for file management may include
A. create & delete files.
B. open and use files.
C. read, write or reposition open or created files.
D. All the above.
2
Operating Systems (for IT Students)
Lecture 3 Test Bank
Multiple Choice Questions
21. Re-setting or reading file or folder attributes may include
A. file name, type, protection codes & accounting information.
B. create file, read file, terminate file and reposition.
C. wait event, terminate event, signal event and terminate process.
D. All the above.
22. A process may need several resources to execute, such as
A. wait event, terminate event, signal event and terminate process.
B. file name, type, protection codes & accounting information.
C. main memory, disk drives, access to files.
D. ability to determine and reset the attributes of a job or process.
23. In OS terminology, when the OS gives a resource to a process that request it, we say that
A. the resource is given to the process.
B. the resource is granted to the process.
C. the process is granted to the resource.
D. the process is accessed by the resource.
24. The various resources controlled by the OS can be thought of as devices, which may be
A. keyboard, mouse, disk drive and printer.
B. main memory, CPU time, internet access.
C. either physical devices or virtual devices.
D. None of the above.
25. In an OS with multiple users, users must first request the device to ensure
A. exclusive use of it then it can be allocated.
B. shared use of it as this is a shared system.
C. direct access to the device that is not through the kernel.
D. None of the above.
26. In many operating systems including UNIX, there is a similarity between _______________ and ___________ such
as they have merged and combined structure with the same set of __________________.
A. hardware, software, operations.
B. I/O devices, files, system calls.
C. folder, directory, files.
D. I/O devices, files, user programs.
27. In many operating systems, the user interface can make _________ and _________ appear to be similar, even
though the underlying system calls are dissimilar.
A. hardware, software.
B. devices, files.
C. folders, files.
D. I/O devices, user programs.
28. System calls like those returning current date and time, number of current users, version number of OS, amount of
free memory or disk space, are all examples of
A. communication.
B. process control.
C. file management.
D. information maintenance.
29. Many operating systems provide a ____________________ of a program to indicate the amount of time that the
program executes at a particular location or set of locations.
A. time profile.
B. memory dump.
C. debugging.
D. user interface.
30. Having system calls that deals with programs’ time profile is considered to be in the category of
A. communication.
B. process control.
C. file management.
D. information maintenance.
3
Operating Systems (for IT Students)
Lecture 3 Test Bank
Multiple Choice Questions
31. Providing time profile system calls would require either ____________________ or ___________________.
A. memory dump, error level.
B. tracing facility, timer interrupt.
C. debugging program, memory dump.
D. (wait time) system call, (wait/signal event) system call.
32. Modern computer hardware supports “interrupts” and system calls of the “timer interrupt”. When such a call occurs
the value of the _________________ must be saved.
A. program counter.
B. memory dump.
C. process file.
D. debugger.
33. With sufficiently frequent timer interrupts, a statistical picture of the time spent ___________________ can be
obtained.
A. running many programs.
B. various parts of a program.
C. various parts of a process.
D. using the kernel.
34. __________________ communication refers to two processes communicating with each other.
A. enter-process.
B. intra-process.
C. inter-process.
D. ultra-process.
35. There are two common models for inter-process communication, these are
A. message-processing model and shared-processing model.
B. inter-process messaging and intra-processing model.
C. internet communication network communication.
D. message-passing model and shared-memory model.
36. In the _______________________ the communicating processes exchange messages with one another to transfer
information.
A. message-passing model.
B. message-processing model.
C. inter-process model.
D. Internet.
37. In the ______________________ the communicating processes can exchange messages either directly or
indirectly.
A. message-passing model.
B. message-processing model.
C. inter-process model.
D. shared-memory model.
38. In the message-passing model, the name of the communicator must be known. This could be
A. a process on the same system.
B. a process on another computer.
C. a process on the same or on another computer connected by a network.
D. the name of the user and his password as entered by the user him/herself.
39. In the ________________________ processes can gain access to regions of memory owned by other processes.
A. message-passing model.
B. message-processing model.
C. inter-process model.
D. shared-memory model.
40. The OS would usually prevent one process from accessing another process’s memory. In the shared-memory model
such restriction is ____________________
A. maintained (kept).
B. removed.
C. similar to that used in the message-passing model.
D. dependent on the user.
4
Operating Systems (for IT Students)
Lecture 3 Test Bank
Multiple Choice Questions
41. When two processes exchange information using the shared-memory model, such exchanged is
A. not under the OS’s control.
B. controlled by the kernel.
C. controlled by the users.
D. occurs by sending messages from one process to the other.
42. The responsibility of exchanging information between two processes in the shared-memory model is under the
responsibility of the _______________________ to ensure that they are not writing to the same location
simultaneously.
A. kernel.
B. users.
C. processes themselves.
D. CPU.
43. _______________ model is useful for exchanging smaller amounts of data.
A. message-passing model.
B. message-processing model.
C. inter-process model.
D. shared-memory model.
44. _______________ model is easier to implement than _____________ model for intercomputer communication.
A. message-passing, shared-memory.
B. message-processing, memory-shared.
C. inter-process, enter-process.
D. network, Internet.
45. Shared-memory model allows for
A. maximum speed and convenience of communication as it takes place at memory message-passing model.
B. easier implementation of protection and synchronization among the processes.
C. intercomputer communication.
D. All the above.
Keys:
1: B
2: A
3: C
4: B
5: A
6: C
7: B
8: B
9: D
10: A
11: C
12: A
13: A
14: C
15: D
16: B
17: A
18: C
19: D
20: D
21: A
22: C
23: B
24: C
25: A
26: B
27: B
28: D
29: A
30: D
31: B
32: A
33: B
34: C
35: D
36: A
37: A
38: C
39: D
40: B
41: A
42: C
43: A
44: A
45: A
5
Download