Operating Systems, End Term
Consider the code segment (for xv6) given below.
1 #define UART_BASE 0xA0004000 2 void init_uart(){ 3 u16 *baud_reg = (u16*)UART_BASE; 4 *baud_reg = 0x7D; 5 } 6 u32 read_uart(){ 7 u32 *rx_reg = (u32*)(UART_BASE + 8); 8 u8 *status_reg = (u8*)(UART_BASE + 12); 9 while((*status_reg & 0x4) == 0);10 return *rx_reg;11 }What is the base address and the end address of the RX register?
Consider the code segment (for xv6) given below. 1 #define UART_BASE 0xA0004000 2 void init_uart(){ 3 u16 *baud_reg = (u16*)UART_BASE; 4 *baud_reg = 0x7D; 5 } 6 u32 read_uart(){ 7 u32 *rx_reg = (u32*)(UART_BASE + 8); 8 u8 *status_reg = (u8*)(UART_BASE + 12); 9 while((*status_reg & 0x4) == 0); 10 return *rx_reg; 11 } What is the base address and the end address of the *RX register*? If the memory map of the interrupt controller starts from the offset 0x20000000 and has an address range 128 bytes in a 32-bit addressing scheme then what will be the final address in the memory map? Assume that process A (parent) is (voluntarily) trying to create a daemon process B (child). **Statement 1:** exit system call must be called by process A.\ **Statement 2:** wait system call must be called by process B. Choose the correct answer from below.