Tags » Operating Systems

Q61: Atomicity of semaphore operations

Question 61: What is true about up() and down() operations of semaphore?

  1. The operations up() and down() must have to be atomic.
  2. The operations up() and down() can be made atomic by using the hardware based solution like TSL.
  3. 35 more words
Operating Systems

Creating your own Hello World Operating System.

Last Saturday I created my very own Hello World Operating System(which prints “Hello World” to the screen.)!! :) Creating your own operating system is possible to do from any operating system, but it is much easier on GNU/Linux systems compared to other non-free operating systems .  1,527 more words


Steps to build your Hello World Operating System

Step one :- Retrieving the Source Code.

Create a directory say “src”  and change into it  using the following commands.

# Create a directory from which we will build the toolchain. 1,129 more words


Explanation of the linker.ld file.

/* The bootloader will look at this image and start execution at the symbol
   designated at the entry point. */

/* Tell where the various sections of the object files will be put in the final
   kernel image. 114 more words

Explanation of Kernel.c file

As previously mentioned we decided to start execution at the kmain function.

void kmain()
	// TODO: Kernel here.

If we run the kernel code, it will start executing kmain, return, and then go into an infinite loop as implemented in… 1,179 more words


Explanation of Boot.s

This contains the explanation to the code of the boot.s file that was used to build the Hello World Operating system.

The  most important part is  to create is the multiboot header, as it must be very early in the kernel binary, or the bootloader will fail to recognize us. 720 more words


Q62: Interprocess communication

Question 62: Which of the following is not a way of inter-process communication?

  1. Pipes
  2. Shared memory
  3. Race condition
  4. Semaphore


Solution:  Race condition is a consequence if the IPC is not done correctly. The correct answer is option 3.

Operating Systems