Академический Документы
Профессиональный Документы
Культура Документы
REPORT - I
INTRODUCTION :
Parrot Linux is a Linux distribution based on Debian with a
focus on computer security. It is designed for penetration
testing, vulnerability assessment and mitigation, computer
forensics and anonymous web browsing. It is developed by the
Frozenbox team.
Goals of Parrot :
ParrotSec is intended to provide a suite of penetration testing
tools to be used for attack mitigation, security research,
forensics, and vulnerability assessment.
Editions in Parrot OS
1.Parrot Home
2.Parrot Studio
3.Parrot ARM
Parrot Studio :
Designed for students, producers, video editing and all related
professional multi-media creation. This edition's goals are
to provide a reliable workstation for a multi-purpose
computing.
Parrot Home :
The distribution has the same look and feel of a regular Parrot
environment and includes all the basic programs for daily work.
Parrot Home also includes programs to chat privately with
people, encrypt documents with the highest cryptographic
standards or surf the net in a completely anonymous and
secure way. The system can also be used as a starting point to
build a very customized pentesting platform with only the tools
you need, or you can use it to build your professional
workstation by taking advantage of all the latest and most
powerful technologies of Debian without hassle
Process states :
The states that a Process enters in working from start till end
are known as Process states. These are listed below as:
Created-Process is newly created by system call, is not ready to
run User running-Process is running in user mode which means
it is a user process. Kernel Running-Indicates process is a kernel
process running in kernel mode. Zombie- Process does not
exist/ is terminated. Preempted- When process runs from
kernel to user mode, it is said to be preempted. Ready to run in
memory- It indicated that process has reached a state where it
is ready to run in memory and is waiting for kernel to schedule
it. Ready to run, swapped– Process is ready to run but no
empty main memory is present Sleep, swapped- Process has
been swapped to secondary storage and is at a blocked state.
Asleep in memory- Process is in memory(not swapped to
secondary storage) but is in blocked state.
Operations on Process :
Process Creation:
possible for the parent to run for a while, and then wait
system resources.
process interrupts.
● A parent may kill its children if the task assigned to
child terminates.
● If the parent exits, the system may or may not allow the
When a process ends, all of its system resources are freed up,
open files flushed and closed, etc. The process termination
status and execution times are returned to the parent if the
parent is waiting for the child to terminate, or eventually
returned to init if the process already became an orphan.
The processes which are trying to terminate but cannot do so
because their parent is not waiting for them are termed
zombies. These are eventually inherited by init as orphans and
killed off.
Different types of queues in Parrot OS :
The scheduler of parrot OS maintains a run queue and wait
queue like typical schedulers. Only the head of the run queue
may enter synchronization next. Once the synchronization call
is executed, PARROT updates the queues accordingly. For
instance, for pthread create, PARROT appends the new thread
to the tail of the run queue and rotates the head to the tail. By
maintaining its own queues, PARROT avoids nondeterminism in
the OS scheduler and the Pthreads library. The get turn
function waits until the calling thread becomes the head of the
run queue, i.e., the thread gets a “turn” to do a
synchronization. The put turn function rotates the calling
thread from the head to the tail of the run queue, i.e., the
thread gives up a turn. It records the address the thread is
waiting for and the timeout, and moves the calling thread to
the tail of the wait queue. The thread is moved to the tail of
the run queue when another thread wakes it up via signal or
broadcast or the timeout has expired. The signal(void *addr)
function appends the first thread waiting for addr to the run
queue. The broadcast(void *addr) function appends all threads
waiting for addr to the run queue in order. The lazy updates
simplify the implementation of this optimization by maintaining
the invariant that only the head of the run queue can modify
the run and wait queues.
time, but relative logical time that counts the number of turns
executed since the beginning of
current execution.
In each call to the get turn function, PARROT increments this
logical time and checks for
timeouts. (If all threads block, PARROT keeps the logic time
advancing with an idle thread; see
§4.5.) The wait function takes a relative timeout argument. If
current logical time is tl , a timeout
of 10 means waking up the thread at logical time tl +10. A
wait(NULL, timeout) call is a logical
sleep, and a wait(addr, 0) call never times out. The last two
functions in Table 1 support
performance critical sections and network operations. They set
the calling thread’s execution
mode to non deterministic or deterministic. PARROT always
schedules synchronizations of
deterministic threads using round-robin, but it lets the OS
scheduler schedule nondeterministic
threads. Implementation-wise, the nondet begin function
marks the calling thread as
nondeterministic and simply returns. This thread will be lazily
removed from the run queue by
the thread that next tries to pass the turn to it. The nondet end
function marks the calling thread
as deterministic and appends it to an additional queue. This
thread will be lazily appended to the
run queue by the next thread getting the turn.
int wrap cond wait(pthread cond t *cv,pthread mutex t *mu){
scheduler.get turn();
pthread mutex unlock(mu);
scheduler.signal(mu);
scheduler.wait(cv, 0);
while(pthread mutex trylock(mu))
scheduler.wait(mu, 0);
scheduler.put turn();
return 0; /* error handling is omitted for clarity. */
}
{
scheduler.get turn();
pthread mutex unlock(mu);
scheduler.signal(mu);
scheduler.wait(cv, 0);
while(pthread mutex trylock(mu))
scheduler.wait(mu, 0);
scheduler.put turn();
return 0;
/* error handling is omitted for clarity. */
}
Mapping between user level threads and
kernel level threads in PARROT :
A thread library provides programmers with an API for creating
and managing threads. Support for threads must be provided
either at the user level or by the kernel.
● Kernel level threads are supported and managed directly
by the operating system.
● User level threads are supported above the kernel in user
space and are managed without kernel support.
Parrot Architecture
REPORT - II
Synchronization in Parrot OS
Team Members :
- B.chaitanya harsha- 17BCE7093
HIMA VAMSI– 17BCD7082
K.yaswanth - 17BCE7170
B.yaswanth krishna– 17BCE7034
Sai ram -17BCE702
CONTRIBUTION:
Report - I
1,5,11 – B.Chaitanya harsha- 17BCE7093
3,2,6- Hima vamsi – 17BCD7082
4,12 - Sai ram– 17BCE7027
7,10 - yaswanth krishna – 17BCE7034
8,9 - K. Yaswanth- 17BCE7170
Report - II
Synchronization -
- B.chaitanya harsha- 17BCE7093
HIMA VAMSI– 17BCD7082
Deadlock -
K.yaswanth - 17BCE7170
B.yaswanth krishna– 17BCE7034
Sai ram -17BCE702