Helsingin yliopisto TIETOJENKÄSITTELYTIETEEN LAITOS
Matemaattis-luonnontieteellinen tiedekunta

 
PL 26 (Teollisuuskatu 23)
00014 HELSINGIN YLIOPISTO
 

581331 Käyttöjärjestelmät II / Questions asked in former Exams

  1. KERNEL

    The implementation of an Operating System can be based on monolithic kernel or on a microkernel. What are the differences between these two approaches? Point out the benefits and disadvantages of these solutions.

  2. MICROKERNEL

    Explain the structure and the functionality of a microkernel-based operating system. What are the essential core system functions that should always be implemented in the microkernel? Give the reasons. List and explain the advantages and disadvantages of microkernel-based implementation.

  3. MULTIPROCESSORS

    a) What are the differences between the host-slave and the SMP multiprocessor systems? Are there any differences in the way the OS is programmed? Advantages / disadvantages?

    b) How are the caches kept coherent in multiprocessor systems?

  4. THREADS

    Many current systems give the possibility to use both conventional processes and more modern threads. How does the thread differ from a process? Give some arguments why to use threads.

    Threads can be implemented with library routines (so called user level threads) or they can be implemented in the kernel (so called kernel level threads). Explain the benefits and disadvantages of these solutions.

  5. THREADS

    Three concurrent processes exist in a system, as described in the following table:

    Process Threads inside the process
      P1	T11, T12, T13
      P2	T21, T22
      P3	T31
    

    Suppose that the system uses preemptive, round-robin sceduling, and that T11 is running when the scheduling quantum expires. Indicate which threads might possibly be executing at the beginning of the next quantum

    a) if the threads are implemented entirely at the user level
    b) if the threads are supported by the OS.

    Suppose that thread T11 transits into Blocked-state before the quantum expires. Indicate which threads might possibly be executing next

    c) if the threads are implemented entirely at the user level
    d) if the threads are supported by the OS.

  6. SCHEDULING

    a) How does the non-preemptive scheduling and the preemptive scheduling differentiate?

    b) Explain the ideas of the Virtual Round-Robin scheduling algorithm. What is the benefit of the Virtual RR compared to the ordinary RR-scheduling?

    c) Classify the scheduling algorithms discussed in the course according to the suitability for scheduling batch jobs and for interactive processes. Give the reasons.

  7. MEMORY MANAGEMENT

    a) What is the difference between global and local memory management algorithms?

    b) Explain how does the clock-algorithm operate. What will be the target page frame for a new page, if the clock algoritm is used in the situation given in the table below (the process has only 4 page frames). The times are clock-ticks from the beginning of the process.

    Page# Page_frame # Time_loaded Time_referenced R-bit M-bit
     2 	 0 	       65 	   121           0     1
     1 	 1 	      110          120 	         0     0
     0	 2 	       33 	   122	         1     1
     3 	 3 	       25 	   123           1     0
    

    c) The execution continues and generates the following page reference string

       4, 0, 0, 0, 2, 4, 2, 1, 0, 3, 2 
    

    How many page faults would occur if the working set policy were used with a window size 4 instead of the fixed allocation? Show clearly when each page fault would occur.

  8. MEMORY MANAGEMENT

    A process is assigned a fixed allocation of four page frames in main memory. The page reference string is as follows

       1, 0, 0, 2, 2, 1, 5, 4, 5, 0, 1, 2, 0, 3, 0, 1 
    

    a) How many page faults occur, when LRU-algorithm is used? Show clearly which pages are in memory in each phase and which pages cause a page fault.

    b) Explain the key idea behind the working set policy. How many page faults occur, if working set policy is used with the window size 4. Show clearly which pages belong to the working set in each phase and which pages cause the page faults.

  9. MEMORY MANAGEMENT

    a) A process is assigned a fixed allocation of three page frames in memory. The page reference string for a process is

        8 4 1 3 9 8 2 6 8 4 5 1 5 4 2 7 2 1 8	
    

    How many page faults occur, when the replacement algorithm is

    1) FIFO 2) OPT 3) LRU?

    Show clearly which pages are in memory in each phase and which pages cause a page fault.

    b) How many page fault occur, when the working set policy is used and the window size of 4? Show clearly which pages belong to the working set in each phase and which pages cause a page fault.

  10. FILE MANAGEMENT

    The usage of files and the implementation of the file management is split into four levels: application program, device-independent software, device-dependent software and hardware. Describe the functionality of a file system by explaining the duties and functionality of each level. Try to proceed in logical order (first ..., then ...).

  11. USING A FILE

    An application contains the following sentences

        fd = open("puppu.txt", O_RDONLY);
        if (fd < 0) exit(0);
        n_read = read(fd, buf, 80);
        if (n_read > 0)
    	...;
    

    First, the file named "puppu.txt" is opened for reading. If the opening does not succeed, the exit() is called and the process is ended. If the opening succeeds, then maximum 80 bytes is read from the file into the variable buf. The function read() returns the number of bytes actually readed.

    Describe how the OS finds the specified file, decides if the opening succeeds, and how the bytes are transfered from the disk into the variable buf. Make yourself the assumptions needed.

  12. DISK SCHEDULING

    What is the advantage of rescheduling disk requests? In which part of the OS is it done?

    Assume that a disk consists of 1024 tracks and the disk head is positioned over track 100. The sequence of disk track requests is 27, 129, 110, 186, 147, 41, 10, 64 and 120. What is the average number of tracks traversed by the disk head if the scheduling algorithm is a) SSTF or b) SCAN. Which one is better? Give your arguments!

    How does N-step-SCAN and FSCAN differ from the basic SCAN-algorithm? What is the reason for the changes?

  13. DISK SCHEDULING

    Suppose that a disk consists of 200 cylinders, numbered 0 to 199. The disk head is currently positioned at track 143. It takes 0.1 ms to travel from one track to the next. How long will it take to satisfy the following requests

    	86, 147, 91, 177, 94, 150, 102, 175, 130
    

    if the algorithm used is

    a) FIFO b) SSTF c) SCAN d) C-SCAN?

    e) How does the N-step-SCAN differ from the basic SCAN-algorithm? What is the reason for this change?

    f) In which part of the OS is the rescheduling done?

  14. SECURITY

    a) What does it mean if the OS uses salting in password protection? What are the advantages and disadvantages of salting?

    b) Compare access control lists to capability tickets.

    c) Explain the terms "Trojan horse" and "backdoor".

  15. ACCESS CONTROL LISTS vs. CAPABILITY TICKETS

    Compare access control lists against capability tickets.

Stydying - it is an Attitude, not a state of affairs.

Page created 20.1.2003, Auvo Häkkinen