8월, 2016의 게시물 표시

react native gps foreground service - android, kotlin (1)

react native 에서 gps 트래킹을 해야한다. 앱이 백그라운드에 있어도 동작하도록 네이티브 모듈을 만드는 것만 해도 많이 안하다보니 까다로운데 gps + 서비스 동작을 해야한다니. 기본으로 돌아가기로 했다. 일단 안드로이드 앱에서 GPS 트래킹하는 코드부터 시도해보았다. ### MainActivity.kt ``` package com.example.gpstracker import android.annotation.SuppressLint import android.content.Context import android.content.pm.PackageManager import android.location.LocationListener import android.location.LocationManager import android.os.Bundle import android.util.Log import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material3.Button import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.core.app.ActivityCompat import com.example.gpstracker.ui.theme.GpsTrackerTheme val T

Operating System Concept

6.1 A CPU -scheduling algorithm determines an order for the execution of its scheduled processes. Given n processes to be scheduled on one processor, how many different schedules are possible? Give a formula in terms of n. 처리상태->준비상태 (타이머 인터럽트 등) 처리상태->블록상태 (i/o요청이나 wait() 등) 블록상태->준비상태 (i/o의 완료 등) 프로세스 종료 6.2 Explain the difference between preemptive and nonpreemptive scheduling. 선점형 스케줄링의 경우 프로세스가 끝나지 않더라도 강제적으로 cpu 점유를 뺏어 다른 프로세스에게 할당해주지만 비선점형 스케줄링의 경우 cpu 를 사용하고 있는 프로세스가 끝날 때까지 그 프로세스에게 cpu를 사용하게 해준 후 끝나면 다음 프로세스에게 cpu를 할당해준다. 6.3 Suppose that the following processes arrive for execution at the times indicated. Each process will run for the amount of time listed. In answering the questions, use nonpreemptive scheduling, and base all decisions on the information you have at the time the decision must be made. Process Arrival Time Burst Time P 1 0.0 8 P 2 0.4 4 P 3 1.0 1 a. What is the average turnaround time for these processes wi

이 블로그의 인기 게시물

Operating System Concept

카카오 내비 리엑트 네이티브 모듈 만들기 ft.코틀린

Operating System Concepts 9th