Self Studies

Operating System Test 1

Result Self Studies

Operating System Test 1
  • Score

    -

    out of -
  • Rank

    -

    out of -
TIME Taken - -
Self Studies

SHARING IS CARING

If our Website helped you a little, then kindly spread our voice using Social Networks. Spread our word to your readers, friends, teachers, students & all those close ones who deserve to know what you know now.

Self Studies Self Studies
Weekly Quiz Competition
  • Question 1
    1 / -0
    In the disk, swap space is used to _______
    Solution

    Concept:

    Swap space is a space on a hard disk used as virtual memory extension of RAM.

    Explanation:

    Swap space is used in various ways by different operating systems, depending on the memory management algorithms in use. Systems that implement swapping may use swap space to hold an entire process image, including the code and data segments.

    Swap space can reside in one of two places: it can be carved out of the normal file system or it can be in a separate disk partition.

    Swap space is used to save the process data. Operating system that offer virtual memory commonly use the mapping interface for kernel services. For instance, to execute program, operating system maps the executable into memory and then transfers control to the entry address of the executable. The mapping interface is commonly used for kernel access to swap space on disk.
  • Question 2
    1 / -0

    Which of the following statements are True?

    I. In many-to-one model, the entire process will block if a thread makes a blocking system call.

    II. Many-to-one model provides more concurrency than one-to-one model.

    III. In many-to-one model, the overhead of creating kernel threads can burden the performance of an application.

    Solution

    I. True: The many-to-one model maps many user-level threads to one kernel thread. Thread management is done by the thread library in user space, so it is efficient. However, the entire process will block if a thread makes a blocking system call. Also, because only one thread can access the kernel at a time, multiple threads are unable to run in parallel on multicore systems.

    II. False: The one-to-one model maps each user thread to a kernel thread. It provides more concurrency than the many-to-one model by allowing another thread to run when a thread makes a blocking system call.

    III. False: In one-to-one model creating a user thread requires creating the corresponding kernel thread. Because the overhead of creating kernel threads can burden the performance of an application, most implementations of this model restrict the number of threads supported by the system. 
  • Question 3
    1 / -0

    Consider a FAT based file system. On a disk of 750 GB, the FAT file system is stored, the data block size is 25000 bytes. The total overhead in each entry is 10 bytes in size. The maximum size of a file that can be stored on this disk is ________ MB

    Solution

    Data:

    Disk size = 750 GB

    Data block size = 25000 B

    Overhead per entry = 10 B

    Formula: 

    Total number of data disk block = \(\frac{Disk\; size}{Data\; block\; size}\)

    Total space occupied by overhead = over head per entry × number of entries

    Maximum file size = total file system size – space consumed by overhead

    Calculation:

    Total number of data disk block = \(\frac{750 \; GB}{25000\; B}\) = 0.03 x 230

    Space occupied by overhead = 0.03 x 230 x 10 = 0.3 x 230 

    Maximum file size = 750 x 230 – 0.3 x 230

    = 749.7 x 210 MB = 767692.8 MB

  • Question 4
    1 / -0
    Consider the Unix i-node which uses 12 direct DBAs, 1 single indirect, 1 double indirect, 1 triple indirect. The disk block address requires 32 bits and disk block size is 1 KB. What is the maximum file size?
    Solution

    Data:

    In index node of a Unix- style file system,

    Direct Block pointer = 12

    Single Indirect Block pointer = 1

    Double Indirect Block pointer = 1

    Triple Indirect Block pointer = 1

    Disk block address = disk block entries size = 32 bit = 4 B

    Disk Block size = 1 KB

    Calculation:

    Number of entries in a block = \(\frac{{{\rm{Disk\;block\;size}}}}{{{\rm{Disk\;block\;address\;size}}}} = \frac{{1KB}}{{4\;B}} = 256 = {2^8}\)

    File size = (12 direct + 1 single indirect + 1 double indirect + 1 triple-indirect) × 256 B

    File size = (12 × 1 + 1 × 28 + 1 × 28 × 28 + 1 × 28 × 28 × 28)× 1 KB

    File size = (0.0000 + 0.00006 + 0.06250 + 16) GB

    File size = 16.06256 16 GB ≈ 16 GB

  • Question 5
    1 / -0

    Consider the below given code in which integer k is initialize to 0 

    while(k != 11)

    {

    k++;

    if(k%5 == 0)

    continue;

    fork();

    }

    What is the total number of process created?

    Solution

     Value of k inside a while loop

    Condition

    If condition

    fork calling

    1

    1%5 = 1

    False

     called

    2

    2%5 = 2

    False

    called

    3

    3%5 = 3

    False

    called

    4

    4%5 = 4

    False

    called

    5

    5%5 = 0

    True(skip)

    not called

    6

    6%5 = 1

    False

    called

    7

    7%5 = 2

    False

    called

    8

    8%5 = 3

    False

    called

    9

    9%5 = 4

    False

    called

    10

    10%5 = 0

    True(skip)

    not Called

    1111%5 = 1False called
     

    while(11)

    loop terminated

    Doesn't executedDoesn't executed

     

    From the table, it is clear that fork is called 9 times

    Formula:

    If n times fork is called the number of processes created = 2n

    Calculation:

    Since n = 9

    number of processes created = 29 = 512

    number of child processes created = 29 - 1 = 511

Self Studies
User
Question Analysis
  • Correct -

  • Wrong -

  • Skipped -

My Perfomance
  • Score

    -

    out of -
  • Rank

    -

    out of -
Re-Attempt Weekly Quiz Competition
Selfstudy
Selfstudy
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now