search
Log In

Recent questions tagged threads

3 votes
2 answers
1
Degree of concurrency in threads can be arranged in the manner One-to-one > many-to-one > many-to-many One-to-one > many-to-many > many-to-one Many-to-many > many-to-one > one-to-one None of the above answer given is A but according to me answer is B. Someone please confirm
asked Sep 7, 2020 Akanksha Agrawal 401 views
0 votes
2 answers
2
Which two are valid constructions for Thread? Thread(Runnable r, String name) Thread() Thread(int priority) Thread(Runnable r, ThreadGroup g) Thread(Runnable r, int priority) $1$ and $3$ $2$ and $4$ $1$ and $2$ $2$ and $5$
asked Apr 1, 2020 in Operating System Lakshman Patel RJIT 214 views
1 vote
3 answers
4
One of the disadvantages of user level threads compared to Kernel level thread is If a user level thread of a process executes a system call, all threads in that process are blocked. Scheduling is application dependent. Thread switching doesn’t require kernel mode privileges. The library procedures invoked for thread management in user level threads are local procedures.
asked Mar 24, 2020 in Operating System jothee 265 views
0 votes
1 answer
6
0 votes
1 answer
7
If a multithreaded process forks, a problem occurs if the child gets copies of all the parent’s threads. Suppose that one of the original threads was waiting for keyboard input. Now two threads are waiting for keyboard input, one in each process. Does this problem ever occur in single-threaded processes?
asked Oct 24, 2019 in Operating System Lakshman Patel RJIT 126 views
0 votes
0 answers
8
Assume that you are trying to download a large $2$-GB file from the Internet. The file is available from a set of mirror servers, each of which can deliver a subset of the file’s bytes; assume that a given request specifies the starting and ending bytes of the file. Explain how you might use threads to improve the download time.
asked Oct 24, 2019 in Operating System Lakshman Patel RJIT 97 views
0 votes
0 answers
10
Consider a system that has two CPUs, each CPU having two threads (hyperthreading). Suppose three programs, $P0, P1,$ and $P2$, are started with run times of $5, 10$ and $20$ msec, respectively. How long will it take to complete the execution of these programs? Assume that all three programs are $100\%$ CPU bound, do not block during execution, and do not change CPUs once assigned.
asked Oct 23, 2019 in Operating System Lakshman Patel RJIT 40 views
2 votes
2 answers
11
Which of the following are NOT shared by the threads of the same process? Stack Registers Address space Message queue a and d b and c a and b a, b and c
asked Jul 2, 2019 in Operating System Arjun 726 views
1 vote
1 answer
12
Given that a computer system has only 3 process.1st process is single threaded, 2nd process is two threaded and 3rd process is 4 threaded.So total how many number of page tables will be managed by the operating system?
asked Jun 4, 2019 in Operating System Sourajit25 265 views
0 votes
0 answers
13
User level threads doesnot require context switching- This is a true statement (Because OS cannot recognize user level threads) Can somebody elaborate more on it?? This given answer is wrong I think:https://gateoverflow.in/290648/made_easy_test_series Plz check
asked May 19, 2019 in Operating System srestha 207 views
0 votes
2 answers
14
A system provides support for user-level and kernel-level threads. The mapping in this system is one to one (there is a corresponding kernel thread for each user thread). Does a multithreaded process consist of $(a)$ a working set for the entire process or $(b)$ a working set for each thread ? Explain
asked Mar 22, 2019 in Operating System akash.dinkar12 192 views
0 votes
3 answers
15
Consider the following code segment: pid t pid; pid = fork(); if (pid == 0) { /* child process */ fork(); thread create( . . .); } fork(); a. How many unique processes are created? b. How many unique threads are created?
asked Mar 19, 2019 in Operating System akash.dinkar12 278 views
0 votes
0 answers
16
A system with two dual-core processors has four processors available for scheduling. A CPU-intensive application is running on this system. All input is performed at program start-up, when a single file must be opened. Similarly, all output is performed just before the ... the input and output ? Explain. How many threads will you create for the CPU-intensive portion of the application ? Explain.
asked Mar 19, 2019 in Operating System akash.dinkar12 143 views
0 votes
1 answer
17
Using Amdahl’s Law, calculate the speedup gain of an application that has a 60 percent parallel component for (a) two processing cores and (b) four processing cores.
asked Mar 19, 2019 in Operating System akash.dinkar12 431 views
0 votes
1 answer
18
1 vote
2 answers
19
Can a multithreaded solution using multiple user-level threads achieve better performance on a multiprocessor system than on a single processor system ? Explain.
asked Mar 19, 2019 in Operating System akash.dinkar12 94 views
1 vote
1 answer
20
Which of the following components of program state are shared across threads in a multithreaded process ? a. Register values b. Heap memory c. Global variables d. Stack memory
asked Mar 19, 2019 in Operating System akash.dinkar12 398 views
0 votes
0 answers
21
Under what circumstances does a multithreaded solution using multiple kernel threads provide better performance than a single-threaded solution on a single-processor system ?
asked Mar 19, 2019 in Operating System akash.dinkar12 51 views
0 votes
0 answers
22
0 votes
0 answers
23
Assume that an operating system maps user-level threads to the kernel using the many-to-many model and that the mapping is done through LWPs(Light Weight Processes). Furthermore, the system allows developers to create real-time threads for use in real-time systems. Is it necessary to bind a real-time thread to an LWP(Light Weight Process) ?Explain.
asked Mar 19, 2019 in Operating System akash.dinkar12 60 views
0 votes
0 answers
24
...