Professional Documents
Culture Documents
1.An operating system does not perform useful function by itself, but it provides an
environment within which other programs can do useful work. ( T )
2. Multiprocessor systems have two or more processors in close communication,
sharing the computer bus with separate clock, memory, and peripheral devices. ( F )
3. The dual mode of operation provides us with the means for protecting the operating
system from errant users and errant users from one another. ( T )
4. After synchronous I/O starts, control returns to user program without waiting for I/O
completion. ( F )
5. The program stack can be used to pass a system call parameters to the operating
system. ( T )
6. Short-term scheduler controls the degree of multiprogramming. ( F)
7. In a hierarchical storage structure, each data item appears at least in two levels of the
storage system. ( F )
8. In case of direct communication, a link is established only if processes share a
common mailbox. ( F )
9. Some of system programs are simply user interfaces to system calls; others are
considerably more complex. ( T )
10. The objective of multiprogramming is to have some process running at all times, to
minimize CPU utilization. ( F )
11.Round robin scheduling is a non-preemptive scheduling algorithm. (F)
13. The operating system decides between conflicting requests for efficient and fair
resource use. (T)
14. A device controller informs CPU that it has finished its operation by causing a trap.
(F)
15. Incoming interrupts are enabled while another interrupt is being processed. ( F )
16. The registers can be used to pass a system call parameters to the operating
system. ( T )
17. Resource allocation is a one of operating-system services provides functions that
are helpful to the user. ( F )
18. Many operating systems now include both CLI & GUI interfaces. (T)
19. The job scheduler selects which processes should be brought into the ready queue.
(T)
20. An independent process can affect the execution of another process. (F)
21. Scheduling criteria can be computed for most scheduling algorithms using the
distribution formulas of system processes CPU burst and arrival time. ( T )
22. SJF is a priority scheduling where priority is the predicted next CPU burst time. ( T )
23. The operating system controls execution of programs to prevent errors and
improper use of the computer. ( T )
24. Caching is copying information into inexpensive storage system. (F)
25. Long-term scheduler controls the degree of multiprogramming. ( T )
26. The waiting queue is a set of all processes residing in main memory and waiting to
execute. (F)
27. The main target of CPU scheduling is to maximize response time.(F)
28.The Process address space refers to the binary form of the program code. ( F )
29.In asymmetric multiprocessor system, the kernel can execute on any processor, and
typically each processor does self-scheduling from the set of available processes ( F )
30.A process that cannot execute until some event occurs is said to be in the ready
state. ( F )
31.Unlike process, thread doesn’t transit among a series of states (F)
32.First-come-first-served (FCFS) is a simple scheduling policy that tends to favor I/O-
bound processes over CPU bound process ( T )
33.The DMA operation does not require generation of interrupts ( F )
34.When a process enters the system, it is kept in the ready queue. (F)
35.Multilevel Queue Scheduling requires scheduling to be done between queues. ( T )
36.The average turnaround time of a process always improve as the time quantum
Increase ( F )
37.Usage of DMA is the only method that enables the OS to effectively applying the
multiprogramming feature . ( F )
38.First-come-first-served (FCFS) is a simple scheduling policy that tends to favor I/O-
bound processes over processor bound processes.(F)
39.A short-term scheduling algorithm favors I/O bound process ( T )
40.The DMA operation requires to get only the address of I/O device (F)
41.PCB is a program that control exe of process ( F )
42.Concureny pbs not effect on uni-processors ( F )
43.The Kernel process is referred as less-privileged process ( F )
44.User thread are fast to create and manage than Kernel thread.(T)
45. Logical and physical addresses differ in execution time address binding.( T )
46. First-fit and best-fit better than worst-fit in terms of speed and storage utilization (T)
47. Concurrent access to shared data may result in data inconsistency. (T)
48. A process may never be removed from the semaphore queue in which it is
suspended. (T)
49. Counting semaphore can be implemented using binary semaphore. (T)
50. Main memory and registers are only storage CPU can access directly. (T)
51. Cache sits between main memory and CPU registers. (T)
52. Register access in one CPU clock (or less). (T)
53. Main memory can take many cycles. (T)
54. The user program deals with logical addresses. (T)
Answer the Questions
OS is a resource allocator:
Q3: The services and functions provided by an operating system can be divided
into two main categories. Briefly describe the two categories and discuss how
they differ.
One set of operating system services is to provide functions that are helpful to user:
- GUI
- I/O management
- Program execution
- Communication
- File-system manipulation
- Error detection
Another set of operating system services is to ensure efficiency of system itself by
resources sharing:
- Resource allocation
- Accounting
- Security and protection
Q4: What is the purpose of interrupts? How does an interrupt differ from a trap?
Can traps be generated intentionally by a user program? If so, for what is the
purpose?
Interrupts are calls to the CPU that inform the system about other system programs.
The CPU will be in a specific state and an interrupt changes that state.
Interrupts come from hardware and the handling is asynchronous, Traps are software
generated and the handling is synchronous.
Interrupt transfers control to the interrupt service routine generally which contains the
addresses of all the service routines.
Trap is a software generated interrupts caused either by an error or a user request.
Q6: Explain the difference between Design policy & Design Mechanism?
Q7: Describe three general methods for passing parameters to the operating system.
a. Pass parameters in registers
b. Registers pass starting addresses of blocks of parameters
c. Parameters can be placed, or pushed, onto the stack by the program, and popped off
the stack by the operating system
Q8: Describe the differences among short-term, medium-term, and long-term
scheduling.
Short-term (CPU scheduler): selects a process from memory and ready to execute,
and allocates the CPU to it.
Medium-term (memory manager): selects processes from the ready (or blocked
queue) and removes them from memory, then returns them later to continue running.
Long-term (job scheduler): determines which jobs are brought into the system for
processing.
Q9: Describe the actions taken by the kernel to context-switch between two processes.
The PCB of the current process must be saved. This information includes the values of:
(1) process state (2) program counter, (3) CPU registers, (4) scheduling information (5)
memory management information, (6) I/O status information.
The information is stored in the PCB of the process. We then restore the PCB of the
process that is to run next, and gives control to this process.
Q10: What is a process? What is a PCB? Which scheduler must work very fast in
order not to waste significant CPU time? Which can be slow?
Q13: What is the meaning of the term busy waiting? What other kinds of waiting
are there in an operating system? Can busy waiting be avoided altogether?
Explain your answer.
Busy waiting means that a process is waiting for a condition to be satisfied in a close
loop without leaving the processor. A process could wait by leaving the processor, and
block on a condition and wait to be awakened at some appropriate time in the future.
Busy waiting can be avoided but occurs the overhead associated with putting a
process to sleep and having to wake it up when the suitable program state is reached.
Q14: What is the definition of the following?
Compile Time: If memory location known a priori, absolute code can be generated.
Load Time: Must generate re-locatable code if memory location is not known at
compile time.
Execution time: Binding delayed until run time if the process can be moved during its
execution from one memory segment to another.
Q15: What is a critical section? What main requirements must a solution to the
critical-section problem satisfy?
The critical section problem is to design a protocol that a system consisting of several
processes can use to cooperate safely. Each process must request permission to enter
its critical section. The critical section may be followed by the exit section.
A solution to the critical section problem must satisfy the following three requirements:
1. Mutual Exclusion: If process Pi is executing in its critical section, then no other
process can be executing in their critical sections.
2. Progress: If no process is executing in its critical section and some processes wish
to enter their critical sections, then only those processes that are no executing in their
remainder section can enter its critical section next, and this selection cannot be
postponed.
3. Bounded Waiting: There exists a bound on the number of times that other
processes are allowed to enter their critical sections after a process has made a request
to enter its critical section and before that request is granted.
- When CPU switches to another process, the system must save the state of the old
process and load the saved state for the new process via a context switch.
- Context of a process represented in the PCB.
- Context-switch time is overhead; the system does no useful work while switching.
Q17: Explain the difference between each of the following: