thread
-
Program, Process, and ThreadDevOps/OS 2020. 9. 19. 23:43
1. Overview 1.1 Program A program is a set of instructions and associated data that resides on the disk and is loaded by the operating system to perform some task. An executable file or a python script file are examples of programs. In order to run a program, the operating system's kernel is first asked to create a new process, which is an environment in which a program executes. A program is an..
-
Relationship of Thread, Process, OS, and MemoryModeling/Architecture 2020. 2. 4. 15:13
1. Overview When we turn on our computer a special program called the operating system is loaded from the disk into the memory. The operating system takes over and provides an abstraction for us the application developers and helps us interact with the hardware and the CPU so we can focus on developing our apps. All our applications such as the text editor a web browser or a music player reside ..
-
CallableStaticPL/JAVA 2019. 8. 21. 22:39
1. Overview Whereas Runnable object can not return a result, Callable return a result and throw a checked exception in spite of being executed inside a thread likewise. 2. Description 2.1 Callable Callable interface has a single method call() which is meant to contain the code is executed by a thread. Callable callable = new Callable() { @Override public String call() throws Exception { // Perfo..
-
Executors Framework and Thread PoolsStaticPL/JAVA 2019. 8. 21. 20:39
1. Overview Naive Thread management by extending the Thread class or implementing the Runnable interface has a problem when an application requires creating 20 or 30 threads for running tasks concurrently. Executors Framework is creating and managing threads for a production-ready application like hundreds, if not thousands of threads running simultaneously. 2. Description 2.1 Executor Functiona..
-
ThreadlocalStaticPL/JAVA 2019. 8. 19. 22:28
1. Overview Clarify what Threadlocal is and how and when to use it. 2. Introduction Threadlocal has the ability to store data individually for the current thread. Thus, even if multiple threads are executing the same code, and the code has a reference to a Threadlocal variable, there's no need to synchronize that variable because multiple threads cannot see each other's Threadlocal variables. 3...
-
Thread and RunnableStaticPL/JAVA 2019. 8. 18. 20:33
1. Overview Summarize Thread in JAVA. Thread class provides constructors and methods to create and perform operations on a thread. It is derived from Object class and implements the Runnable interface. Threads can be created by using two mechanisms : Extending the Thread class Implementing the Runnable Interface 2. The life cycle of Threads 2.1 NEW Thread instance newly created, have not started..