1. Design, develop and execute a program using any
thread library to create the number of threads specified by the user; each
thread independently generates a random integer as an upper limit, and then
computes and prints the number of primes less than or equal to that upper limit
along with that upper limit.
INTRODUCTION
A process defines a Customized
Computations framework in which a program executes. In traditional operating system the basic
unit of CPU utilization is a process. Each process has its own program counter,
its own register states, its own stack, and its own address space. Now a days,
in operating system , the basic unit of CPU utilization is thread and a process may consist of one or more threads.
PROCESS
AND PROCESS CONTROL BLOCK
A process is a program
in execution or an instance of a program running on a computer. Two essential
elements of process are program code and a set of data associated with that
code. At any given point of time while the program is executing, the process
can be uniquely characterized by a number of elements including the following,
Image credit |
State:
if the process is currently executing it space is in the running state
Priority:
priority level relative to other processes.
Program
counter: the address of the next instruction in the program
to be executed.
Memory
pointers: includes pointers to the program court and data
associated with the process plus any memory blocks shared with other processes.
Context
data:
these are the data that are presenting registers in the processor while the
process is executing.
I/O
status information: includes outstanding I/O requests, I/O
devices’ assigned to the process, list of files in use by process and so on.
Accounting
Information: May include the amount of processor
time and clock time used, time limits, account numbers and so on.
The above is sample. Click on Download to get the complete
resources
help me out in 3rd problem
ReplyDeletein manual haven given tht code for consumper
please reply me with the code of Consumer.java
please...
it is present in the code. look for the line: class consumer extends .......
DeleteHey can you please mail me the programs. Ours is 2014 scheme so the programs are different for us.
ReplyDeleteMy email id is: supersaiyan391@gmail.com
Please do reply even if you dont get the programs.
Hey I'm working. Its very difficult for me to get those resources. Thats why I'm saying to the readers to share the new resources to my mail id so that I can include them here.
Delete