Basic CS [3i Infotech Placement]: Sample Questions 178 - 179 of 243

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 178

Edit

Describe in Detail

Essay▾

What is multi-tasking and multi-processing?

Explanation

Multi-Tasking

  • Allows multiple tasks or processes to share common processing resources of CPU.
  • Same as multiprogramming but in a more general meaning- refers to multiple processes (code execution contexts) running at the same time.
  • Used in modern operating systems when multiple tasks share a common processing resource.
  • At any time, CPU is executing one task, other tasks wait their turn.
  • A task in a multitasking operating system is not a whole application program- refers to a thread of execution when one process is divided into sub tasks.

Multi- Processing

  • Refers to multiple processes running at the same time.
  • Confusing since both multi-programming and multitasking describe multiple processes running at the same time.
  • However, multi-programming refers to the CPU units and not running processes- processes are running concurrently on different logical processors or CPU.
  • Multi-programming hardware provides more than one processor.
  • Multitasking system can time-share the single processor

Question 179

Edit

Describe in Detail

Essay▾

How to do inter-process communication?

Explanation

  • Inter-process communication or IPC allows exchange of data between processes.
  • Provides a set of programming interfaces to help programmer organize the activities among different processes.

Two Types of Inter Process Communication

  • Independent process
    • An independent process is not affected by the execution of other processes.
  • Co-operating process
    • A co-operating process can be affected by other executing processes.
Two Types of Inter Process Communication
  • The communication between these processes allows co-operation between them.

Process Communicates with Each Other Using These Two Ways

  • Shared Memory
  • Message passing
Process Communicates with Each Other Using These Two Ways

Developed by: