Posts

Showing posts from March, 2017

Installation Guide of Oracle 11gR2 Data Guard

Installation Guide of Oracle 11gR2 Data Guard (11.2.0.1) for Oracle Enterprise Linux 5R4 over VMware Server 2.0.2 This guide requires the existence of pre-installed Oracle Enterprise Linux EL 5 U4. This guide requires the existence of pre-installed Oracle Database 11gR2. Creation of profile for user Oracle on both nodes cd vi .bash_profile add the following lines: export ORACLE_SID=prod export ORACLE_BASE=/home/oracle/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export TNS_ADMIN=$ORACLE_HOME/network/admin export PATH= $ORACLE_HOME/bin :$PATH Execute profile . .bash_profile In standby system ORACLE_SID will be dg Creation of database with dbca (database creator assistant) Before starting dbca we create a listener with network configuration assistant: [oracle@prod ~]$ netca You should follow the default steps Now run dbca (database configuration assistant) [oracle@prod ~]$ dbca Choose Create a Database and click Next. We will choose a ...

Producer Consumer- Operating Systems

In this project we are going to resolve the producer-consumer problem with limited buffer using threads. The produces produces an object and adds it to buffer while the customer consumes it, then removes it from the buffer. The problem arises in the fact that the producer and the consumer should not be allowed to access the shared buffer at the same time, as this will generate problems. Solving this problem can be implemented in different ways in this case will use pthreads. For this solution, we will need two traffic lights, counter for empty, full and a mutex lock. Producer and consumer will be executed as two independent threads. Buffer shall be a fixed-size array type buffer_item (defined using typedef). He will be manipulated as a circular row using two functions for adding and removing objects. Both thread will alternate between a time when they will manipulate the buffer and a time where they are in "sleep". As an output the program will have messages that appear whe...