What are the three major activities of an operating system with regard to secondary memory management?

Answer: The three major activities of an operating system in connection with regard to memory management are:

    1. * **Answer:**
      
        * Message - passing model: `In this, the communicating processes exchange messages with one another to transfer information. Messages can be exchanged between the processes either directly or indirectly through a common mail box. Message passing is useful for exchanging smaller amounts of data, because no conflicts need to be avoided. It is also easier to implement than is shared memory for inter computer communication. But the main advantage is it can handle only small amounts of data.`
      
        * Shared - Memory mode: `In this, processes use shared memory creates and shared memory attaches system calls to create and gain access to regions of memory owned by other processes. Two or more processes can exchange information by reading and writing data in the shared areas. Shared memory allows maximum speed and convenience of communication, since it can be done at memory speeds when it takes place within a computer. Problem exist, however, in the areas of protection and synchronization between the processes sharing memory.`
      
      2
    1. * **Answer:**
      
        * Message - passing model: `In this, the communicating processes exchange messages with one another to transfer information. Messages can be exchanged between the processes either directly or indirectly through a common mail box. Message passing is useful for exchanging smaller amounts of data, because no conflicts need to be avoided. It is also easier to implement than is shared memory for inter computer communication. But the main advantage is it can handle only small amounts of data.`
      
        * Shared - Memory mode: `In this, processes use shared memory creates and shared memory attaches system calls to create and gain access to regions of memory owned by other processes. Two or more processes can exchange information by reading and writing data in the shared areas. Shared memory allows maximum speed and convenience of communication, since it can be done at memory speeds when it takes place within a computer. Problem exist, however, in the areas of protection and synchronization between the processes sharing memory.`
      
      3
    1. * **Answer:**
      
        * Message - passing model: `In this, the communicating processes exchange messages with one another to transfer information. Messages can be exchanged between the processes either directly or indirectly through a common mail box. Message passing is useful for exchanging smaller amounts of data, because no conflicts need to be avoided. It is also easier to implement than is shared memory for inter computer communication. But the main advantage is it can handle only small amounts of data.`
      
        * Shared - Memory mode: `In this, processes use shared memory creates and shared memory attaches system calls to create and gain access to regions of memory owned by other processes. Two or more processes can exchange information by reading and writing data in the shared areas. Shared memory allows maximum speed and convenience of communication, since it can be done at memory speeds when it takes place within a computer. Problem exist, however, in the areas of protection and synchronization between the processes sharing memory.`
      
      4

Q 2.4: What are the three major activities of an operating system with regard to secondary-storage management?

  • Answer: Three important activities of operating system with regard to the secondary storage is given as follows:

      1. * **Answer:**
        
          * Message - passing model: `In this, the communicating processes exchange messages with one another to transfer information. Messages can be exchanged between the processes either directly or indirectly through a common mail box. Message passing is useful for exchanging smaller amounts of data, because no conflicts need to be avoided. It is also easier to implement than is shared memory for inter computer communication. But the main advantage is it can handle only small amounts of data.`
        
          * Shared - Memory mode: `In this, processes use shared memory creates and shared memory attaches system calls to create and gain access to regions of memory owned by other processes. Two or more processes can exchange information by reading and writing data in the shared areas. Shared memory allows maximum speed and convenience of communication, since it can be done at memory speeds when it takes place within a computer. Problem exist, however, in the areas of protection and synchronization between the processes sharing memory.`
        
        5
      1. * **Answer:**
        
          * Message - passing model: `In this, the communicating processes exchange messages with one another to transfer information. Messages can be exchanged between the processes either directly or indirectly through a common mail box. Message passing is useful for exchanging smaller amounts of data, because no conflicts need to be avoided. It is also easier to implement than is shared memory for inter computer communication. But the main advantage is it can handle only small amounts of data.`
        
          * Shared - Memory mode: `In this, processes use shared memory creates and shared memory attaches system calls to create and gain access to regions of memory owned by other processes. Two or more processes can exchange information by reading and writing data in the shared areas. Shared memory allows maximum speed and convenience of communication, since it can be done at memory speeds when it takes place within a computer. Problem exist, however, in the areas of protection and synchronization between the processes sharing memory.`
        
        6
      1. * **Answer:**
        
          * Message - passing model: `In this, the communicating processes exchange messages with one another to transfer information. Messages can be exchanged between the processes either directly or indirectly through a common mail box. Message passing is useful for exchanging smaller amounts of data, because no conflicts need to be avoided. It is also easier to implement than is shared memory for inter computer communication. But the main advantage is it can handle only small amounts of data.`
        
          * Shared - Memory mode: `In this, processes use shared memory creates and shared memory attaches system calls to create and gain access to regions of memory owned by other processes. Two or more processes can exchange information by reading and writing data in the shared areas. Shared memory allows maximum speed and convenience of communication, since it can be done at memory speeds when it takes place within a computer. Problem exist, however, in the areas of protection and synchronization between the processes sharing memory.`
        
        7

Q 2.5: What is the purpose of the command interpreter? Why is it usually separate from the kernel?

  • Answer:
    * **Answer:**
    
      * Message - passing model: `In this, the communicating processes exchange messages with one another to transfer information. Messages can be exchanged between the processes either directly or indirectly through a common mail box. Message passing is useful for exchanging smaller amounts of data, because no conflicts need to be avoided. It is also easier to implement than is shared memory for inter computer communication. But the main advantage is it can handle only small amounts of data.`
    
      * Shared - Memory mode: `In this, processes use shared memory creates and shared memory attaches system calls to create and gain access to regions of memory owned by other processes. Two or more processes can exchange information by reading and writing data in the shared areas. Shared memory allows maximum speed and convenience of communication, since it can be done at memory speeds when it takes place within a computer. Problem exist, however, in the areas of protection and synchronization between the processes sharing memory.`
    
    8

Q 2.6: What system calls have to be executed by a command interpreter or shell in order to start a new process?

  • Answer:

    • * **Answer:**
      
        * Message - passing model: `In this, the communicating processes exchange messages with one another to transfer information. Messages can be exchanged between the processes either directly or indirectly through a common mail box. Message passing is useful for exchanging smaller amounts of data, because no conflicts need to be avoided. It is also easier to implement than is shared memory for inter computer communication. But the main advantage is it can handle only small amounts of data.`
      
        * Shared - Memory mode: `In this, processes use shared memory creates and shared memory attaches system calls to create and gain access to regions of memory owned by other processes. Two or more processes can exchange information by reading and writing data in the shared areas. Shared memory allows maximum speed and convenience of communication, since it can be done at memory speeds when it takes place within a computer. Problem exist, however, in the areas of protection and synchronization between the processes sharing memory.`
      
      9

    • * **Answer:**
      
        * `Mechanism determines how to do something and policy means what to do. The separation of policy and mechanism is very important for flexibility. In worst-case, each change in policy would require a change in the underlying mechanism. A general mechanism insensitive to change in policy would be more desirable.`
      
        * `Policy may change with respect to time. If the mechanism is separated and policy is independent, it can be used to support a policy decision that I/O intensive programs should have priority over CPU-intensive ones or to support the opposite policy.`
      
      0

**Q 2.7: ** What is the purpose of system programs?

  • Answer:

    • * **Answer:**
      
        * `Mechanism determines how to do something and policy means what to do. The separation of policy and mechanism is very important for flexibility. In worst-case, each change in policy would require a change in the underlying mechanism. A general mechanism insensitive to change in policy would be more desirable.`
      
        * `Policy may change with respect to time. If the mechanism is separated and policy is independent, it can be used to support a policy decision that I/O intensive programs should have priority over CPU-intensive ones or to support the opposite policy.`
      
      1

    • * **Answer:**
      
        * `Mechanism determines how to do something and policy means what to do. The separation of policy and mechanism is very important for flexibility. In worst-case, each change in policy would require a change in the underlying mechanism. A general mechanism insensitive to change in policy would be more desirable.`
      
        * `Policy may change with respect to time. If the mechanism is separated and policy is independent, it can be used to support a policy decision that I/O intensive programs should have priority over CPU-intensive ones or to support the opposite policy.`
      
      2

    • * **Answer:**
      
        * `Mechanism determines how to do something and policy means what to do. The separation of policy and mechanism is very important for flexibility. In worst-case, each change in policy would require a change in the underlying mechanism. A general mechanism insensitive to change in policy would be more desirable.`
      
        * `Policy may change with respect to time. If the mechanism is separated and policy is independent, it can be used to support a policy decision that I/O intensive programs should have priority over CPU-intensive ones or to support the opposite policy.`
      
      3

    • * **Answer:**
      
        * `Mechanism determines how to do something and policy means what to do. The separation of policy and mechanism is very important for flexibility. In worst-case, each change in policy would require a change in the underlying mechanism. A general mechanism insensitive to change in policy would be more desirable.`
      
        * `Policy may change with respect to time. If the mechanism is separated and policy is independent, it can be used to support a policy decision that I/O intensive programs should have priority over CPU-intensive ones or to support the opposite policy.`
      
      4

**Q 2.8: ** What is the main advantage of the layered approach to system design? What are the disadvantages of the layered approach?

  • Answer:

    • * **Answer:**
      
        * `Mechanism determines how to do something and policy means what to do. The separation of policy and mechanism is very important for flexibility. In worst-case, each change in policy would require a change in the underlying mechanism. A general mechanism insensitive to change in policy would be more desirable.`
      
        * `Policy may change with respect to time. If the mechanism is separated and policy is independent, it can be used to support a policy decision that I/O intensive programs should have priority over CPU-intensive ones or to support the opposite policy.`
      
      5

    • Some of the disadvantages or difficulties with layered approach are:

      1. * **Answer:**
        
          * `Mechanism determines how to do something and policy means what to do. The separation of policy and mechanism is very important for flexibility. In worst-case, each change in policy would require a change in the underlying mechanism. A general mechanism insensitive to change in policy would be more desirable.`
        
          * `Policy may change with respect to time. If the mechanism is separated and policy is independent, it can be used to support a policy decision that I/O intensive programs should have priority over CPU-intensive ones or to support the opposite policy.`
        
        6

      2. * **Answer:**
        
          * `Mechanism determines how to do something and policy means what to do. The separation of policy and mechanism is very important for flexibility. In worst-case, each change in policy would require a change in the underlying mechanism. A general mechanism insensitive to change in policy would be more desirable.`
        
          * `Policy may change with respect to time. If the mechanism is separated and policy is independent, it can be used to support a policy decision that I/O intensive programs should have priority over CPU-intensive ones or to support the opposite policy.`
        
        7

**Q 2.9: ** List five services provided by an operating system, and explain how each creates convenience for users. In which cases would it be impossible for user-level programs to provide these services? Explain your answer.

  • Answer:

  • * **Answer:**
    
      * `Mechanism determines how to do something and policy means what to do. The separation of policy and mechanism is very important for flexibility. In worst-case, each change in policy would require a change in the underlying mechanism. A general mechanism insensitive to change in policy would be more desirable.`
    
      * `Policy may change with respect to time. If the mechanism is separated and policy is independent, it can be used to support a policy decision that I/O intensive programs should have priority over CPU-intensive ones or to support the opposite policy.`
    
    8

    1. * **Answer:**
      
        * `Mechanism determines how to do something and policy means what to do. The separation of policy and mechanism is very important for flexibility. In worst-case, each change in policy would require a change in the underlying mechanism. A general mechanism insensitive to change in policy would be more desirable.`
      
        * `Policy may change with respect to time. If the mechanism is separated and policy is independent, it can be used to support a policy decision that I/O intensive programs should have priority over CPU-intensive ones or to support the opposite policy.`
      
      9
    2. * **Answer:**
      
        * **Part 1:** `The backing - store driver would normally be above the CPU scheduler, because the driver may need to wait for I/O and CPU can be rescheduled during this time. However on large system, the CPU scheduler may have more information about all the active processes that can fit in memory. Therefore, this information may need to be swapped in and out of memory, requiring the backing-store driver routine to be be below the CPU schedule.`
      
        * **Part 2:** `When a user program executes and I/O operation, it executes an I/O operation, it executes a system call that is trapped to the I/O layer, which calls the memory management layer, which in turn calls the CPU -scheduling layer, which is then passed to hardware. At each layer parameter may be modified, data may need to be passed and so on. Each layer adds overhead to system call, the net result is a system call that takes longer than does one on a non layered system.`
      
        `The layers are designed, providing most of the advantages of modularized code while avoiding difficult problems of layer definition and interaction.`
      
      **Q 2.22:** What are the advantages of using loadable kernel modules?
      
        * **Answer:** `An OS has been developed called Mach that modularized the kernel using the microkernel approach. This method structures the OS by removing all non-essential components from the kernel and implemnting them as system and user-level program. Micro kernel provides minimal process and memory management with communication facility. The communication is done indirectly via the method called Message passing.`
      
        `All new services are added to user space and consequently do not require modification of the kernel. Micro kernel provides more security and reliability, since most services are running as user rather than kernel.`
      
      0
    3. * **Answer:**
      
        * **Part 1:** `The backing - store driver would normally be above the CPU scheduler, because the driver may need to wait for I/O and CPU can be rescheduled during this time. However on large system, the CPU scheduler may have more information about all the active processes that can fit in memory. Therefore, this information may need to be swapped in and out of memory, requiring the backing-store driver routine to be be below the CPU schedule.`
      
        * **Part 2:** `When a user program executes and I/O operation, it executes an I/O operation, it executes a system call that is trapped to the I/O layer, which calls the memory management layer, which in turn calls the CPU -scheduling layer, which is then passed to hardware. At each layer parameter may be modified, data may need to be passed and so on. Each layer adds overhead to system call, the net result is a system call that takes longer than does one on a non layered system.`
      
        `The layers are designed, providing most of the advantages of modularized code while avoiding difficult problems of layer definition and interaction.`
      
      **Q 2.22:** What are the advantages of using loadable kernel modules?
      
        * **Answer:** `An OS has been developed called Mach that modularized the kernel using the microkernel approach. This method structures the OS by removing all non-essential components from the kernel and implemnting them as system and user-level program. Micro kernel provides minimal process and memory management with communication facility. The communication is done indirectly via the method called Message passing.`
      
        `All new services are added to user space and consequently do not require modification of the kernel. Micro kernel provides more security and reliability, since most services are running as user rather than kernel.`
      
      1
    4. * **Answer:**
      
        * **Part 1:** `The backing - store driver would normally be above the CPU scheduler, because the driver may need to wait for I/O and CPU can be rescheduled during this time. However on large system, the CPU scheduler may have more information about all the active processes that can fit in memory. Therefore, this information may need to be swapped in and out of memory, requiring the backing-store driver routine to be be below the CPU schedule.`
      
        * **Part 2:** `When a user program executes and I/O operation, it executes an I/O operation, it executes a system call that is trapped to the I/O layer, which calls the memory management layer, which in turn calls the CPU -scheduling layer, which is then passed to hardware. At each layer parameter may be modified, data may need to be passed and so on. Each layer adds overhead to system call, the net result is a system call that takes longer than does one on a non layered system.`
      
        `The layers are designed, providing most of the advantages of modularized code while avoiding difficult problems of layer definition and interaction.`
      
      **Q 2.22:** What are the advantages of using loadable kernel modules?
      
        * **Answer:** `An OS has been developed called Mach that modularized the kernel using the microkernel approach. This method structures the OS by removing all non-essential components from the kernel and implemnting them as system and user-level program. Micro kernel provides minimal process and memory management with communication facility. The communication is done indirectly via the method called Message passing.`
      
        `All new services are added to user space and consequently do not require modification of the kernel. Micro kernel provides more security and reliability, since most services are running as user rather than kernel.`
      
      2
    5. * **Answer:**
      
        * **Part 1:** `The backing - store driver would normally be above the CPU scheduler, because the driver may need to wait for I/O and CPU can be rescheduled during this time. However on large system, the CPU scheduler may have more information about all the active processes that can fit in memory. Therefore, this information may need to be swapped in and out of memory, requiring the backing-store driver routine to be be below the CPU schedule.`
      
        * **Part 2:** `When a user program executes and I/O operation, it executes an I/O operation, it executes a system call that is trapped to the I/O layer, which calls the memory management layer, which in turn calls the CPU -scheduling layer, which is then passed to hardware. At each layer parameter may be modified, data may need to be passed and so on. Each layer adds overhead to system call, the net result is a system call that takes longer than does one on a non layered system.`
      
        `The layers are designed, providing most of the advantages of modularized code while avoiding difficult problems of layer definition and interaction.`
      
      **Q 2.22:** What are the advantages of using loadable kernel modules?
      
        * **Answer:** `An OS has been developed called Mach that modularized the kernel using the microkernel approach. This method structures the OS by removing all non-essential components from the kernel and implemnting them as system and user-level program. Micro kernel provides minimal process and memory management with communication facility. The communication is done indirectly via the method called Message passing.`
      
        `All new services are added to user space and consequently do not require modification of the kernel. Micro kernel provides more security and reliability, since most services are running as user rather than kernel.`
      
      3
    • Program Exection:

      • * **Answer:**
        
          * **Part 1:** `The backing - store driver would normally be above the CPU scheduler, because the driver may need to wait for I/O and CPU can be rescheduled during this time. However on large system, the CPU scheduler may have more information about all the active processes that can fit in memory. Therefore, this information may need to be swapped in and out of memory, requiring the backing-store driver routine to be be below the CPU schedule.`
        
          * **Part 2:** `When a user program executes and I/O operation, it executes an I/O operation, it executes a system call that is trapped to the I/O layer, which calls the memory management layer, which in turn calls the CPU -scheduling layer, which is then passed to hardware. At each layer parameter may be modified, data may need to be passed and so on. Each layer adds overhead to system call, the net result is a system call that takes longer than does one on a non layered system.`
        
          `The layers are designed, providing most of the advantages of modularized code while avoiding difficult problems of layer definition and interaction.`
        
        **Q 2.22:** What are the advantages of using loadable kernel modules?
        
          * **Answer:** `An OS has been developed called Mach that modularized the kernel using the microkernel approach. This method structures the OS by removing all non-essential components from the kernel and implemnting them as system and user-level program. Micro kernel provides minimal process and memory management with communication facility. The communication is done indirectly via the method called Message passing.`
        
          `All new services are added to user space and consequently do not require modification of the kernel. Micro kernel provides more security and reliability, since most services are running as user rather than kernel.`
        
        4

      • * **Answer:**
        
          * **Part 1:** `The backing - store driver would normally be above the CPU scheduler, because the driver may need to wait for I/O and CPU can be rescheduled during this time. However on large system, the CPU scheduler may have more information about all the active processes that can fit in memory. Therefore, this information may need to be swapped in and out of memory, requiring the backing-store driver routine to be be below the CPU schedule.`
        
          * **Part 2:** `When a user program executes and I/O operation, it executes an I/O operation, it executes a system call that is trapped to the I/O layer, which calls the memory management layer, which in turn calls the CPU -scheduling layer, which is then passed to hardware. At each layer parameter may be modified, data may need to be passed and so on. Each layer adds overhead to system call, the net result is a system call that takes longer than does one on a non layered system.`
        
          `The layers are designed, providing most of the advantages of modularized code while avoiding difficult problems of layer definition and interaction.`
        
        **Q 2.22:** What are the advantages of using loadable kernel modules?
        
          * **Answer:** `An OS has been developed called Mach that modularized the kernel using the microkernel approach. This method structures the OS by removing all non-essential components from the kernel and implemnting them as system and user-level program. Micro kernel provides minimal process and memory management with communication facility. The communication is done indirectly via the method called Message passing.`
        
          `All new services are added to user space and consequently do not require modification of the kernel. Micro kernel provides more security and reliability, since most services are running as user rather than kernel.`
        
        5

    • I/O Operations:

      • * **Answer:**
        
          * **Part 1:** `The backing - store driver would normally be above the CPU scheduler, because the driver may need to wait for I/O and CPU can be rescheduled during this time. However on large system, the CPU scheduler may have more information about all the active processes that can fit in memory. Therefore, this information may need to be swapped in and out of memory, requiring the backing-store driver routine to be be below the CPU schedule.`
        
          * **Part 2:** `When a user program executes and I/O operation, it executes an I/O operation, it executes a system call that is trapped to the I/O layer, which calls the memory management layer, which in turn calls the CPU -scheduling layer, which is then passed to hardware. At each layer parameter may be modified, data may need to be passed and so on. Each layer adds overhead to system call, the net result is a system call that takes longer than does one on a non layered system.`
        
          `The layers are designed, providing most of the advantages of modularized code while avoiding difficult problems of layer definition and interaction.`
        
        **Q 2.22:** What are the advantages of using loadable kernel modules?
        
          * **Answer:** `An OS has been developed called Mach that modularized the kernel using the microkernel approach. This method structures the OS by removing all non-essential components from the kernel and implemnting them as system and user-level program. Micro kernel provides minimal process and memory management with communication facility. The communication is done indirectly via the method called Message passing.`
        
          `All new services are added to user space and consequently do not require modification of the kernel. Micro kernel provides more security and reliability, since most services are running as user rather than kernel.`
        
        6

      • * **Answer:**
        
          * **Part 1:** `The backing - store driver would normally be above the CPU scheduler, because the driver may need to wait for I/O and CPU can be rescheduled during this time. However on large system, the CPU scheduler may have more information about all the active processes that can fit in memory. Therefore, this information may need to be swapped in and out of memory, requiring the backing-store driver routine to be be below the CPU schedule.`
        
          * **Part 2:** `When a user program executes and I/O operation, it executes an I/O operation, it executes a system call that is trapped to the I/O layer, which calls the memory management layer, which in turn calls the CPU -scheduling layer, which is then passed to hardware. At each layer parameter may be modified, data may need to be passed and so on. Each layer adds overhead to system call, the net result is a system call that takes longer than does one on a non layered system.`
        
          `The layers are designed, providing most of the advantages of modularized code while avoiding difficult problems of layer definition and interaction.`
        
        **Q 2.22:** What are the advantages of using loadable kernel modules?
        
          * **Answer:** `An OS has been developed called Mach that modularized the kernel using the microkernel approach. This method structures the OS by removing all non-essential components from the kernel and implemnting them as system and user-level program. Micro kernel provides minimal process and memory management with communication facility. The communication is done indirectly via the method called Message passing.`
        
          `All new services are added to user space and consequently do not require modification of the kernel. Micro kernel provides more security and reliability, since most services are running as user rather than kernel.`
        
        7

      • * **Answer:**
        
          * **Part 1:** `The backing - store driver would normally be above the CPU scheduler, because the driver may need to wait for I/O and CPU can be rescheduled during this time. However on large system, the CPU scheduler may have more information about all the active processes that can fit in memory. Therefore, this information may need to be swapped in and out of memory, requiring the backing-store driver routine to be be below the CPU schedule.`
        
          * **Part 2:** `When a user program executes and I/O operation, it executes an I/O operation, it executes a system call that is trapped to the I/O layer, which calls the memory management layer, which in turn calls the CPU -scheduling layer, which is then passed to hardware. At each layer parameter may be modified, data may need to be passed and so on. Each layer adds overhead to system call, the net result is a system call that takes longer than does one on a non layered system.`
        
          `The layers are designed, providing most of the advantages of modularized code while avoiding difficult problems of layer definition and interaction.`
        
        **Q 2.22:** What are the advantages of using loadable kernel modules?
        
          * **Answer:** `An OS has been developed called Mach that modularized the kernel using the microkernel approach. This method structures the OS by removing all non-essential components from the kernel and implemnting them as system and user-level program. Micro kernel provides minimal process and memory management with communication facility. The communication is done indirectly via the method called Message passing.`
        
          `All new services are added to user space and consequently do not require modification of the kernel. Micro kernel provides more security and reliability, since most services are running as user rather than kernel.`
        
        8

    • File-system manipulation:

      • * **Answer:**
        
          * **Part 1:** `The backing - store driver would normally be above the CPU scheduler, because the driver may need to wait for I/O and CPU can be rescheduled during this time. However on large system, the CPU scheduler may have more information about all the active processes that can fit in memory. Therefore, this information may need to be swapped in and out of memory, requiring the backing-store driver routine to be be below the CPU schedule.`
        
          * **Part 2:** `When a user program executes and I/O operation, it executes an I/O operation, it executes a system call that is trapped to the I/O layer, which calls the memory management layer, which in turn calls the CPU -scheduling layer, which is then passed to hardware. At each layer parameter may be modified, data may need to be passed and so on. Each layer adds overhead to system call, the net result is a system call that takes longer than does one on a non layered system.`
        
          `The layers are designed, providing most of the advantages of modularized code while avoiding difficult problems of layer definition and interaction.`
        
        **Q 2.22:** What are the advantages of using loadable kernel modules?
        
          * **Answer:** `An OS has been developed called Mach that modularized the kernel using the microkernel approach. This method structures the OS by removing all non-essential components from the kernel and implemnting them as system and user-level program. Micro kernel provides minimal process and memory management with communication facility. The communication is done indirectly via the method called Message passing.`
        
          `All new services are added to user space and consequently do not require modification of the kernel. Micro kernel provides more security and reliability, since most services are running as user rather than kernel.`
        
        9

      • A system call is a program that request a service from kernel of operating system. This may include services like accessing hard disk, executing and creating new processes and defines communication with kernel services like scheduling. These calls provide an interface between operating systems and a process.0

      • A system call is a program that request a service from kernel of operating system. This may include services like accessing hard disk, executing and creating new processes and defines communication with kernel services like scheduling. These calls provide an interface between operating systems and a process.1

    • Communications:

      • A system call is a program that request a service from kernel of operating system. This may include services like accessing hard disk, executing and creating new processes and defines communication with kernel services like scheduling. These calls provide an interface between operating systems and a process.2

      • A system call is a program that request a service from kernel of operating system. This may include services like accessing hard disk, executing and creating new processes and defines communication with kernel services like scheduling. These calls provide an interface between operating systems and a process.3

Q 2.15: What are the five major activities of an operating system with regard to file management?

* **Answer:**

  * `Creation and deletion of files.`
  * `Creation and deletion of directories.`
  * `Supporting primitives for manipulating files and directories.`
  * `Mapping the files onto secondary storage.`
  * `Backing up files on nonvolatile storage media.`

Q 2.18: What are the two models of interprocess communication? What are the strengths and weaknesses of the two approaches?

* **Answer:**

  * Message - passing model: `In this, the communicating processes exchange messages with one another to transfer information. Messages can be exchanged between the processes either directly or indirectly through a common mail box. Message passing is useful for exchanging smaller amounts of data, because no conflicts need to be avoided. It is also easier to implement than is shared memory for inter computer communication. But the main advantage is it can handle only small amounts of data.`

  * Shared - Memory mode: `In this, processes use shared memory creates and shared memory attaches system calls to create and gain access to regions of memory owned by other processes. Two or more processes can exchange information by reading and writing data in the shared areas. Shared memory allows maximum speed and convenience of communication, since it can be done at memory speeds when it takes place within a computer. Problem exist, however, in the areas of protection and synchronization between the processes sharing memory.`

Q 2.19: Why is the separation of mechanism and policy desirable?

* **Answer:**

  * `Mechanism determines how to do something and policy means what to do. The separation of policy and mechanism is very important for flexibility. In worst-case, each change in policy would require a change in the underlying mechanism. A general mechanism insensitive to change in policy would be more desirable.`

  * `Policy may change with respect to time. If the mechanism is separated and policy is independent, it can be used to support a policy decision that I/O intensive programs should have priority over CPU-intensive ones or to support the opposite policy.`

Q 2.21: What is the main advantage of the microkernel approach to system design? How do user programs and system services interact in a microkernel architecture? What are the disadvantages of using the microkernel approach?

What are the three major activities of OS in memory management?

Answer: The three major activities of an operating system in connection with regard to memory management are:.
Keep track of which parts of memory are currently being used and by whom..
Decide which processes are to be loaded into memory when memory space becomes available..
Allocate and de allocate memory space as needed..

Which of the following is a major activities of an operating system in regard to secondary storage management?

The main activity that is performed in secondary storage management is disk scheduling.

What are main tasks of an operating system during memory management?

The memory management function keeps track of the status of each memory location, either allocated or free. It determines how memory is allocated among competing processes, deciding which gets memory, when they receive it, and how much they are allowed.

What is secondary memory management in OS?

Secondary memory is computer memory that is non-volatile, persistent and not immediately accessible by a computer or processor. It allows users to store data and information that can be retrieved, transmitted, and used by apps and services quickly and easily. Secondary storage is another name for secondary memory.