36. What Two Advantages & Disadvantages Do Threads Have Over Multiple Processes? Suggest One Application That Would Benefit From The Use Of Threads, & One That Would Not.
Threads are very inexpensive to create and destroy, and they use very little re-sources while they exist. They do use CPU time for instance, but they don't have totally separate memory spaces. Unfortunately, threads must "trust" each other to not damage shared data. For instance, one thread could destroy data that all the other threads rely on, while the same could not happen between processes unless they used a system feature to allow them to share data. Any program that may do more than one task at once could benefit from multitasking.
For instance, a program that reads input, processes it, and out-puts it could have three threads, one for each task. "Single-minded" processes would not benefit from multiple threads; for instance, a program that displays the time of the day.
37. Explain The Terms Time-Sharing & Multi-Programming?
Multi-programming: Multiple programs or jobs are kept in memory and executed together. Job execution scheduling will allow the CPU to be used by one job while the other job is waiting for I/O. This permits almost 100% utilization of CPU and other resources (note that the scheduler is an overhead).
Time-sharing: Allows many users to access the computer directly and on-line and at the same time. Concept relies on the fact that users are idle for the majority of the time. Both compute intensive jobs and interactive service can be provided.
38. What Is Spooling & What Are The Benefits? Is It Useful On A Single-User System?
Spooling refers to queuing jobs on disk and having the system service each job in turn as resources become available. A good example is print job spooling. Spooling is useful on single-user system as it allows the user to submit a job for printing or processing without having to wait for the current job to finish.
39. Why is the process table needed in a timesharing system? Is it also needed in personal computer systems in which only one process exists, that process taking over the entire machine until it is finished?
The process table is needed to store the state of a process that is currently suspended, either ready or blocked. It is not needed in a single process system because the single process is in control of the system and there is no need to "track" it.
40. Differentiate Between A Process & A Program?
A Program or Computer Program essentially provides a sequence instructions (or algorithms if you rather) to the operating system or computer. These computer programs come in an executable form that the Operating System recognizes and can use to directly execute the instructions.
A process invokes or initiates a program. It is an instance of a program that can be multiple and running the same application.
For example: Notepad is one program and can be opened twice. When a user opens 3 notepad, there are 3 instances or processes of notepad running.
41. What Is A PCB? Explain The Structure Of Process Control Block?
42. Define & Differentiate Between Swapping & Spawning?
43. What Is Disk Scheduling? What Are The Different Disk Scheduling Techniques?
44. Give Several Reasons Why Dead Line Scheduling Is Complex?
45. Distinguish Between Scheduling Policy & Scheduling Mechanisms.
46. What Are Schedulers & What Are Types Of Schedulers?
47. Explain The Importance Of Long Term Scheduler, Short Term Scheduler & Medium Term Scheduler?
48. State The Difference Among Short-Term, Medium-Term & Long-Term Scheduling?
49. Explain The Difference Between Response Time & Turnaround Time. These Times Are Both Used To Measure The Effectiveness Of Scheduling Schemes.
50. Define Preemptable Resource & Non Preemptable Resource. Give Examples?
... Return To Operating System FAQ's Index.
... Return To Homepage.