Starting from:
$35

$29

Problem Set 1 Solution

    1. Match the following descriptions with the corresponding features of the Operating Systems.

        a. An OS sits between the applications that we write and the hardware. It essentially provides a high level view of the system so that programs can be written easily without the programmer having to worry about the nitty-gritty details of the hardware.


        b. In a multiprogramming environment, each process that runs on the OS has its own set of resources and other processes cannot access those resources. The OS controls the access to all resources from internal and external access.


        c. In a multiprogramming environment, the OS allows multiple applications to share resources, protects apps from each other, and improves performance by efficient utilisation of resources.



    2. Select all the options that are true regarding the code that runs in user space and kernel space.

        a. The user code shall allocate or deallocate memory without making a request to the kernel.

        b. The kernel ensures that the user code cannot modify the underlying OS data and data structures.

        c. In order to limit what user software actions may do on a system, the kernel operates in a separate kernel space and the user code operates in user space.

        d. Code running in user space cannot be accessed by the kernel without a system call, in the same way like user space code cannot access the code kernel space without issuing a system call.


    3. Match the following descriptions with the corresponding components of the Operating Systems.

        a. Provides a device driver interface for applications for easy access to any external device without knowing the internal details of the hardware.

    b. Responsible for process creation, deletion, scheduling, synchronisation and inter-process communication.


    c. Mapping files onto secondary storage and manages free space.



        d. Allocating and deallocating free space for processes and keeping track of what space is being used by every process.


    4. How are the parameters passed to and results are returned from a system call?

        a. Parameters can be passed in registers

        b. When there are more parameters than registers, the OS cannot pass them onto the registers without clearing up all the registers

        c. When there are more parameters than the registers, store the parameters in a block and pass the block address as a parameter to a register

        d. Parameters can be pushed on and popped off the stack by the OS

        e. Parameters are copied to a special register, parameter register, and they are always stored in that register

        f. All the options are correct



    5. How does a user application access system code within the OS? The list of steps are given below, but the order is not correct. Choose the correct order which describes the way in which the CPU gets to know what code is running:

        a. Kernel process a trap. The trap handler will index into jump table to find the handler for a specific system call and jump into the code

        b. Control is returned to the user space code following the trap invocation

        c. Mode bit is switched into kernel mode from user mode

        d. Mode bit is switched from kernel mode into user mode

        e. System call is made which places the system call id into a register and the trap instruction is thrown


    6. What are the steps taken to start up a computer?

        a. When device is turned on, read ​ROM​to locate ​Primary bootloader​.
        b. It then finds the ​Master boot record​and loads the ​Secondary bootloader​into ​RAM​.
        c. It then asks the user or automatically loads the ​Kernel​into RAM

    7. Choose the correct answer

        a. A virtual machine executes on a host operating system and a hypervisor provides an API to the actual hardware

        b. The guest OS knows that it is not accessing the actual hardware so that it can perform better

        c. The VM may supply an environment that is different than the actual host hardware

        d. Applications running within the VM have an illusion that they are executing on a real machine


    8. Choose the correct answer

        a. In multitasking, one or more processes are loaded in main memory to execute and only one process at a time is able to get the CPU while all the others are waiting in the ready queue

        b. In multiprogramming, one or more processes are loaded in main memory to execute and only one process at a time is able to get the CPU while all the others are waiting in the ready queue

        c. In multitasking, multiple processes are running concurrently and each process will share the CPU

        d. In multiprogramming, multiple processes are running concurrently and each process will share the CPU

        e. In batch scheduling of multiprogramming, once a process is started, it will control the CPU until its completion regardless of any idle CPU time

        f. In co-operative scheduling, when a process needs to wait for resources, it will give up the CPU and be removed from the ready state


    9. During a ​, the state of the process is saved and written to RAM and the process state for the new process which gets to run is loaded from RAM and the new process starts running

More products