MIDTERM REPLACEMENT ASSIFNMENT
THEORY CONCEPT ANALYSIS
OPERATING SYSTEM
The Lecturer:
Alfian Ardhiansyah S.Pd., M.Pd.
Budi Sunarko S.T., M.T., Ph.D.
Arranged by:
Adelia Agatha Ramandani (2305090022)
INFORMATICS AND COMPUTER ENGINEERING EDUCATION
FACULTY OF ENGINEERING
SEMARANG STATE UNIVERSITY
JUNE 2025
1. Key Roles and Functions of Operating
Systems Introduction
An operating system is the core of a computer system. Without an operating system, users cannot
interact with computer hardware efficiently. The operating system acts as an intermediary between the
user and the hardware, and provides essential services that allow applications to run, resources to be
allocated, and security to be maintained. Its function is vital in realizing a stable and efficient
computing environment.
A. Definition of Operating System
According to Silberschatz et al. (2018), an operating system is software that is tasked with organizing
all computer resources, both hardware and other software, and providing an interface for users to run
applications and access data.
In practice, an operating system allows a computer to:
• Running the application program,
• Manage hardware resources,
• Provides security and protection,
• Supports user interaction via graphical interface (GUI) or command line.
B. Main Functions of Operating System
Here are some important functions of the operating system:
1. Process Management
Every application running on a computer is a process. The OS is in charge of managing the process
lifecycle, such as creation, scheduling, execution, and termination. The OS also handles
synchronization between processes, deadlock handling, and inter-process communication (IPC).
2. Memory Management
The OS manages how memory is allocated and used by running processes. This includes dynamic
allocation, cache management, and virtual memory execution for efficient RAM usage.
3. File Management
This function includes storing, retrieving, and organizing files in the storage system. The OS provides
a directory hierarchy system, access control, and handling of file metadata (such as size, date, access
rights).
4. I/O Device Management
The OS manages the communication between hardware devices (printer, hard disk, mouse, etc.) and
applications. This is done through device drivers and I/O queues, as well as buffer management.
5. Security and Protection System Management
Operating systems provide various security mechanisms, including user authentication, access control,
and protection of memory and files from unauthorized access.
6. User Interface
Operating systems provide text-based (CLI) and graphical (GUI) interfaces for users to easily interact
with the system.
C. Operating System Architecture
Generally, an operating system consists of several layers, including:
• Kernel: The core component that interacts directly with the hardware.
• Shell: User interface (CLI or GUI).
• File System and Drivers: Components that handle device communication and data storage.
D. Implementation Example on a Windows
11 Real System
• Provides a Task Manager feature to monitor processes, memory, and CPU usage.
• It has an NTFS file system and user-friendly device management.
Linux Ubuntu
• It has utilities such as top, htop, free, and vmstat for system monitoring.
• It uses the EXT4 file system and supports many other file system types.
macOS
• Offers Activity Monitor and APFS file system.
• Has high security features such as Gatekeeper and System Integrity Protection (SIP).
E. Illustration of OS Functions
Diagram: The relationship between user, application, OS, and hardware.
F. Conclusion
An operating system is an important component in a computer system that performs many crucial
functions. Without an operating system, hardware is just an inanimate object without instructions.
Various platforms such as Windows, Linux, and macOS have their own unique features, but they
basically perform the same basic OS functions: process management, memory, files, devices, security,
and user interface. An understanding of operating systems allows both users and developers to
optimally utilize computer resources.
Reference
1. Silberschatz, A., Galvin, P. B., & Gagne, G. (2018). Operating System Concepts (10th ed.).
Wiley.
2. Tanenbaum, A. S., & Bos, H. (2015). Modern Operating Systems (4th ed.). Pearson.
3. Microsoft Docs. (n.d.). Windows Operating System Architecture. Retrieved from
https://learn.microsoft.com
4. Ubuntu Documentation. (n.d.). Processes and Memory Management. Retrieved from
https://help.ubuntu.com
2. Process Scheduling: Concepts, Algorithms, and Comparisons
A. What is Process Scheduling?
Imagine you have 5 friends who ask you to buy them different foods, but you only have one
motorcycle. Well, you have to manage who gets served first, which is similar to the operating system's
task in process scheduling. The CPU can only serve one process at a time (unless it's multicore), so
the operating system must be fair and smart in managing who goes first.
Process scheduling is an operating system activity of choosing which processes will be executed by
the CPU at a given time. It is part of process management, which aims to optimize system
performance such as response time, throughput, and CPU efficiency.
B. Scheduling Objectives
• CPU efficiency: Don't let the CPU idle like a group chat admin at midnight.
• High throughput: The more processes completed in a given time, the more productive.
• Fast response time: Especially important in interactive systems.
• Low waiting time: Let the process not wait like queuing for groceries.
• Fairness: All processes get their turn, no one is favored.
C. Types of Scheduling
1. Long-Term Scheduler
• Determines which processes can enter main memory.
• Frequency: Infrequent.
2. Short-Term Scheduler (CPU Scheduler)
• Determine which processes will be CPU-enabled.
• Frequency: Very often.
3. Medium-Term Scheduler
• Temporarily suspend the process (swapping), like pausing a movie due to
buffering.
D. Popular Scheduling Algorithms
Algorithm Characteristics Pros Disadvantages
FCFS (First Come Execution according to Simple Can cause
First Served) arrival queue starvation
SJF (Shortest Job Process with Efficient Need a duration
First) shortest time estimate
first
Priority Scheduling Based on priority Can handle important Vulnerable starvation
processes
Round Robin The process can take a turn Fair and suitable for Many context
in a fixed time time-sharing switching
Multilevel Queue Process divided in Flexible Complex
several queues
E. Windows
Implementation
Example
• Using preemptive multitasking and priority scheduling.
• Important apps can have a higher priority.
Linux
• Using Completely Fair Scheduler (CFS).
• Attempt to be fair based on the CPU time that has been used.
F. Illustration Diagram
Round Robin Scheduling Diagram
Each process gets "quantum time", which is like playing on an internet cafe computer.
G. Queuing System at Padang Rice Stalls
• FCFS: First come, first served.
• SJF: Those who only pack white rice get it first.
• Priority: Police and doctors get the fast track.
• Round Robin: Everyone gets 1 minute to order, then back to the queue again if not finished.
H. Conclusion
Process scheduling is an important strategy in operating systems to maximize performance and
provide an optimal user experience. Each algorithm has its advantages and disadvantages, and modern
systems often combine several methods at once.
Reference
1. Silberschatz, A., Galvin, P. B., & Gagne, G. (2018). Operating System Concepts (10th ed.).
Wiley.
2. Tanenbaum, A. S., & Bos, H. (2015). Modern Operating Systems (4th ed.). Pearson.
3. Kernel.org Documentation: Linux Scheduler Internals.
3. Difference between Process and Thread in Operating System
A. Introduction
In the world of operating systems, process and thread are two terms that are often confused. Many
think that threads are the same as processes, even though they have different roles although they are
interrelated. A simple analogy: processes are the house, threads are the people who live in the house.
Let's get to the bottom of it!
B. What is Process?
A process is a program that is being executed. When you open an application like Google Chrome or
Microsoft Word, the operating system will create a process that contains all the program components:
memory, files, registers, and other execution information.
Process Features:
• Has its own memory space (address space).
• Has a Process Control Block (PCB) as an identity and status manager.
• Cannot directly share data with other processes (unless using inter-process
communication/IPC).
• It can have one or many threads in it.
C. What is Thread?
A thread (or lightweight process) is the smallest unit of execution within a process. Threads within a
process can share memory and resources, but can run independently. This makes execution more
efficient, especially in multitasking applications like browsers.
Thread characteristics:
• Share address space and resources with other threads in the same process.
• More lightweight than process.
• Can be run in parallel on multicore processors.
• Suitable for tasks that need to be done concurrently.
D. Process vs Thread Comparison
Aspects Process Thread
Memory Separate processes Memory sharing in one process
Overhead High (takes more time to make) Low (quick to create and manage)
Communication Difficult, need IPC Easy because of shared memory
Security Safer Vulnerable conflict
because shared memory
Example Word, Excel applications Browser tabs, game rendering tasks
Usage
E. Illustration
Concept Illustration:
Each process has its own space, but threads within a process can chat together and borrow data easily.
F. Real Example in Operating System
1. Google Chrome
Each tab in the Chrome browser can be a single thread or process, depending on the configuration.
This is to ensure that if one tab crashes, the others remain safe.
2. Microsoft Word
One Word process can have multiple threads: one for UI, one for autosave, one for spell checking.
Everything works in parallel without having to create separate processes.
3. Linux and Windows
• Linux supports many threading models, such as POSIX Threads.
• Windows has the Windows Threads API for multithreading management.
G. Office vs Employee Analogy
Imagine you have several branch offices (processes) in different cities. Each office has a team of
employees (thread).
• Between offices, you can't directly share documents, you have to send them via courier (IPC).
• But in one office, all employees can share documents on the same shelf (shared memory).
• If one employee has coffee first, the others can still work. But if an office is flooded, all
employees are affected.
H. When to Choose Thread, When to Choose Process?
• Use threads when there are many small tasks that need to share data and run concurrently,
such as chat, games, animations.
• Use processes when total separation is necessary for security and stability, e.g. financial
applications, or service systems.
I. Conclusion
Processes and threads are two vital elements in an operating system. Processes are large frameworks
that have their own resources, while threads are the actors working within the process. Threads enable
efficient multitasking, but at the risk of coordination and data conflicts. In practice, modern systems
rely on a combination of both to create reliable and responsive systems.
Reference
1. Silberschatz, A., Galvin, P. B., & Gagne, G. (2018). Operating System Concepts. Wiley.
2. Tanenbaum, A. S. (2015). Modern Operating Systems. Pearson.
3. Intel Developer Zone. (n.d.). Multithreading and Performance. Retrieved from
https://www.intel.com